public class GlueCatalog
extends org.apache.iceberg.BaseMetastoreCatalog
implements java.io.Closeable, org.apache.iceberg.catalog.SupportsNamespaces, org.apache.iceberg.hadoop.Configurable<org.apache.hadoop.conf.Configuration>
| Constructor and Description |
|---|
GlueCatalog()
No-arg constructor to load the catalog dynamically.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
createNamespace(org.apache.iceberg.catalog.Namespace namespace,
java.util.Map<java.lang.String,java.lang.String> metadata) |
protected java.lang.String |
defaultWarehouseLocation(org.apache.iceberg.catalog.TableIdentifier tableIdentifier)
This method produces the same result as using a HiveCatalog.
|
boolean |
dropNamespace(org.apache.iceberg.catalog.Namespace namespace) |
boolean |
dropTable(org.apache.iceberg.catalog.TableIdentifier identifier,
boolean purge) |
void |
initialize(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> properties) |
protected boolean |
isValidIdentifier(org.apache.iceberg.catalog.TableIdentifier tableIdentifier) |
java.util.List<org.apache.iceberg.catalog.Namespace> |
listNamespaces(org.apache.iceberg.catalog.Namespace namespace) |
java.util.List<org.apache.iceberg.catalog.TableIdentifier> |
listTables(org.apache.iceberg.catalog.Namespace namespace) |
java.util.Map<java.lang.String,java.lang.String> |
loadNamespaceMetadata(org.apache.iceberg.catalog.Namespace namespace) |
java.lang.String |
name() |
protected org.apache.iceberg.TableOperations |
newTableOps(org.apache.iceberg.catalog.TableIdentifier tableIdentifier) |
protected java.util.Map<java.lang.String,java.lang.String> |
properties() |
boolean |
removeProperties(org.apache.iceberg.catalog.Namespace namespace,
java.util.Set<java.lang.String> properties) |
void |
renameTable(org.apache.iceberg.catalog.TableIdentifier from,
org.apache.iceberg.catalog.TableIdentifier to)
Rename table in Glue is a drop table and create table.
|
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
boolean |
setProperties(org.apache.iceberg.catalog.Namespace namespace,
java.util.Map<java.lang.String,java.lang.String> properties) |
buildTable, fullTableName, loadTable, registerTable, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateNamespace, listNamespaces, namespaceExistscreateTable, createTable, createTable, createTable, dropTable, invalidateTable, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, tableExistspublic GlueCatalog()
All fields are initialized by calling initialize(String, Map) later.
public void initialize(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> properties)
initialize in interface org.apache.iceberg.catalog.Catalogprotected org.apache.iceberg.TableOperations newTableOps(org.apache.iceberg.catalog.TableIdentifier tableIdentifier)
newTableOps in class org.apache.iceberg.BaseMetastoreCatalogprotected java.lang.String defaultWarehouseLocation(org.apache.iceberg.catalog.TableIdentifier tableIdentifier)
defaultWarehouseLocation in class org.apache.iceberg.BaseMetastoreCatalogtableIdentifier - table idpublic java.util.List<org.apache.iceberg.catalog.TableIdentifier> listTables(org.apache.iceberg.catalog.Namespace namespace)
listTables in interface org.apache.iceberg.catalog.Catalogpublic boolean dropTable(org.apache.iceberg.catalog.TableIdentifier identifier,
boolean purge)
dropTable in interface org.apache.iceberg.catalog.Catalogpublic void renameTable(org.apache.iceberg.catalog.TableIdentifier from,
org.apache.iceberg.catalog.TableIdentifier to)
renameTable in interface org.apache.iceberg.catalog.Catalogfrom - identifier of the table to renameto - new table namepublic void createNamespace(org.apache.iceberg.catalog.Namespace namespace,
java.util.Map<java.lang.String,java.lang.String> metadata)
createNamespace in interface org.apache.iceberg.catalog.SupportsNamespacespublic java.util.List<org.apache.iceberg.catalog.Namespace> listNamespaces(org.apache.iceberg.catalog.Namespace namespace)
throws org.apache.iceberg.exceptions.NoSuchNamespaceException
listNamespaces in interface org.apache.iceberg.catalog.SupportsNamespacesorg.apache.iceberg.exceptions.NoSuchNamespaceExceptionpublic java.util.Map<java.lang.String,java.lang.String> loadNamespaceMetadata(org.apache.iceberg.catalog.Namespace namespace)
throws org.apache.iceberg.exceptions.NoSuchNamespaceException
loadNamespaceMetadata in interface org.apache.iceberg.catalog.SupportsNamespacesorg.apache.iceberg.exceptions.NoSuchNamespaceExceptionpublic boolean dropNamespace(org.apache.iceberg.catalog.Namespace namespace)
throws org.apache.iceberg.exceptions.NamespaceNotEmptyException
dropNamespace in interface org.apache.iceberg.catalog.SupportsNamespacesorg.apache.iceberg.exceptions.NamespaceNotEmptyExceptionpublic boolean setProperties(org.apache.iceberg.catalog.Namespace namespace,
java.util.Map<java.lang.String,java.lang.String> properties)
throws org.apache.iceberg.exceptions.NoSuchNamespaceException
setProperties in interface org.apache.iceberg.catalog.SupportsNamespacesorg.apache.iceberg.exceptions.NoSuchNamespaceExceptionpublic boolean removeProperties(org.apache.iceberg.catalog.Namespace namespace,
java.util.Set<java.lang.String> properties)
throws org.apache.iceberg.exceptions.NoSuchNamespaceException
removeProperties in interface org.apache.iceberg.catalog.SupportsNamespacesorg.apache.iceberg.exceptions.NoSuchNamespaceExceptionprotected boolean isValidIdentifier(org.apache.iceberg.catalog.TableIdentifier tableIdentifier)
isValidIdentifier in class org.apache.iceberg.BaseMetastoreCatalogpublic java.lang.String name()
name in interface org.apache.iceberg.catalog.Catalogpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic void setConf(org.apache.hadoop.conf.Configuration conf)
setConf in interface org.apache.iceberg.hadoop.Configurable<org.apache.hadoop.conf.Configuration>protected java.util.Map<java.lang.String,java.lang.String> properties()
properties in class org.apache.iceberg.BaseMetastoreCatalog