Package org.apache.iceberg.hive
Class HiveCatalog
- java.lang.Object
-
- org.apache.iceberg.BaseMetastoreCatalog
-
- org.apache.iceberg.view.BaseMetastoreViewCatalog
-
- org.apache.iceberg.hive.HiveCatalog
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,org.apache.hadoop.conf.Configurable,org.apache.iceberg.catalog.Catalog,org.apache.iceberg.catalog.SupportsNamespaces,org.apache.iceberg.catalog.ViewCatalog
public class HiveCatalog extends org.apache.iceberg.view.BaseMetastoreViewCatalog implements org.apache.iceberg.catalog.SupportsNamespaces, org.apache.hadoop.conf.Configurable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.iceberg.view.BaseMetastoreViewCatalog
org.apache.iceberg.view.BaseMetastoreViewCatalog.BaseMetastoreViewCatalogTableBuilder, org.apache.iceberg.view.BaseMetastoreViewCatalog.BaseViewBuilder
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringHMS_DB_OWNERstatic java.lang.StringHMS_DB_OWNER_TYPEstatic java.lang.StringHMS_TABLE_OWNERstatic java.lang.StringLIST_ALL_TABLESstatic java.lang.StringLIST_ALL_TABLES_DEFAULT
-
Constructor Summary
Constructors Constructor Description HiveCatalog()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.iceberg.catalog.Catalog.TableBuilderbuildTable(org.apache.iceberg.catalog.TableIdentifier identifier, org.apache.iceberg.Schema schema)org.apache.iceberg.view.ViewBuilderbuildView(org.apache.iceberg.catalog.TableIdentifier identifier)voidclose()voidcreateNamespace(org.apache.iceberg.catalog.Namespace namespace, java.util.Map<java.lang.String,java.lang.String> meta)protected java.lang.StringdefaultWarehouseLocation(org.apache.iceberg.catalog.TableIdentifier tableIdentifier)booleandropNamespace(org.apache.iceberg.catalog.Namespace namespace)booleandropTable(org.apache.iceberg.catalog.TableIdentifier identifier, boolean purge)booleandropView(org.apache.iceberg.catalog.TableIdentifier identifier)org.apache.hadoop.conf.ConfigurationgetConf()voidinitialize(java.lang.String inputName, java.util.Map<java.lang.String,java.lang.String> properties)protected booleanisValidIdentifier(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.List<org.apache.iceberg.catalog.TableIdentifier>listViews(org.apache.iceberg.catalog.Namespace namespace)java.util.Map<java.lang.String,java.lang.String>loadNamespaceMetadata(org.apache.iceberg.catalog.Namespace namespace)java.lang.Stringname()org.apache.iceberg.TableOperationsnewTableOps(org.apache.iceberg.catalog.TableIdentifier tableIdentifier)protected org.apache.iceberg.view.ViewOperationsnewViewOps(org.apache.iceberg.catalog.TableIdentifier identifier)protected java.util.Map<java.lang.String,java.lang.String>properties()booleanremoveProperties(org.apache.iceberg.catalog.Namespace namespace, java.util.Set<java.lang.String> properties)voidrenameTable(org.apache.iceberg.catalog.TableIdentifier from, org.apache.iceberg.catalog.TableIdentifier originalTo)voidrenameView(org.apache.iceberg.catalog.TableIdentifier from, org.apache.iceberg.catalog.TableIdentifier to)voidsetConf(org.apache.hadoop.conf.Configuration conf)booleansetProperties(org.apache.iceberg.catalog.Namespace namespace, java.util.Map<java.lang.String,java.lang.String> properties)java.lang.StringtoString()-
Methods inherited from class org.apache.iceberg.BaseMetastoreCatalog
fullTableName, loadTable, metricsReporter, registerTable
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.iceberg.catalog.Catalog
createTable, createTable, createTable, createTable, dropTable, invalidateTable, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, tableExists
-
-
-
-
Field Detail
-
LIST_ALL_TABLES
public static final java.lang.String LIST_ALL_TABLES
- See Also:
- Constant Field Values
-
LIST_ALL_TABLES_DEFAULT
public static final java.lang.String LIST_ALL_TABLES_DEFAULT
- See Also:
- Constant Field Values
-
HMS_TABLE_OWNER
public static final java.lang.String HMS_TABLE_OWNER
- See Also:
- Constant Field Values
-
HMS_DB_OWNER
public static final java.lang.String HMS_DB_OWNER
- See Also:
- Constant Field Values
-
HMS_DB_OWNER_TYPE
public static final java.lang.String HMS_DB_OWNER_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
public void initialize(java.lang.String inputName, java.util.Map<java.lang.String,java.lang.String> properties)- Specified by:
initializein interfaceorg.apache.iceberg.catalog.Catalog- Specified by:
initializein interfaceorg.apache.iceberg.catalog.ViewCatalog- Overrides:
initializein classorg.apache.iceberg.view.BaseMetastoreViewCatalog
-
buildTable
public org.apache.iceberg.catalog.Catalog.TableBuilder buildTable(org.apache.iceberg.catalog.TableIdentifier identifier, org.apache.iceberg.Schema schema)- Specified by:
buildTablein interfaceorg.apache.iceberg.catalog.Catalog- Overrides:
buildTablein classorg.apache.iceberg.view.BaseMetastoreViewCatalog
-
buildView
public org.apache.iceberg.view.ViewBuilder buildView(org.apache.iceberg.catalog.TableIdentifier identifier)
- Specified by:
buildViewin interfaceorg.apache.iceberg.catalog.ViewCatalog- Overrides:
buildViewin classorg.apache.iceberg.view.BaseMetastoreViewCatalog
-
listTables
public java.util.List<org.apache.iceberg.catalog.TableIdentifier> listTables(org.apache.iceberg.catalog.Namespace namespace)
- Specified by:
listTablesin interfaceorg.apache.iceberg.catalog.Catalog
-
listViews
public java.util.List<org.apache.iceberg.catalog.TableIdentifier> listViews(org.apache.iceberg.catalog.Namespace namespace)
- Specified by:
listViewsin interfaceorg.apache.iceberg.catalog.ViewCatalog
-
name
public java.lang.String name()
- Specified by:
namein interfaceorg.apache.iceberg.catalog.Catalog- Specified by:
namein interfaceorg.apache.iceberg.catalog.ViewCatalog- Overrides:
namein classorg.apache.iceberg.view.BaseMetastoreViewCatalog
-
dropTable
public boolean dropTable(org.apache.iceberg.catalog.TableIdentifier identifier, boolean purge)- Specified by:
dropTablein interfaceorg.apache.iceberg.catalog.Catalog
-
dropView
public boolean dropView(org.apache.iceberg.catalog.TableIdentifier identifier)
- Specified by:
dropViewin interfaceorg.apache.iceberg.catalog.ViewCatalog
-
renameTable
public void renameTable(org.apache.iceberg.catalog.TableIdentifier from, org.apache.iceberg.catalog.TableIdentifier originalTo)- Specified by:
renameTablein interfaceorg.apache.iceberg.catalog.Catalog
-
renameView
public void renameView(org.apache.iceberg.catalog.TableIdentifier from, org.apache.iceberg.catalog.TableIdentifier to)- Specified by:
renameViewin interfaceorg.apache.iceberg.catalog.ViewCatalog
-
createNamespace
public void createNamespace(org.apache.iceberg.catalog.Namespace namespace, java.util.Map<java.lang.String,java.lang.String> meta)- Specified by:
createNamespacein interfaceorg.apache.iceberg.catalog.SupportsNamespaces
-
listNamespaces
public java.util.List<org.apache.iceberg.catalog.Namespace> listNamespaces(org.apache.iceberg.catalog.Namespace namespace)
- Specified by:
listNamespacesin interfaceorg.apache.iceberg.catalog.SupportsNamespaces
-
dropNamespace
public boolean dropNamespace(org.apache.iceberg.catalog.Namespace namespace)
- Specified by:
dropNamespacein interfaceorg.apache.iceberg.catalog.SupportsNamespaces
-
setProperties
public boolean setProperties(org.apache.iceberg.catalog.Namespace namespace, java.util.Map<java.lang.String,java.lang.String> properties)- Specified by:
setPropertiesin interfaceorg.apache.iceberg.catalog.SupportsNamespaces
-
removeProperties
public boolean removeProperties(org.apache.iceberg.catalog.Namespace namespace, java.util.Set<java.lang.String> properties)- Specified by:
removePropertiesin interfaceorg.apache.iceberg.catalog.SupportsNamespaces
-
loadNamespaceMetadata
public java.util.Map<java.lang.String,java.lang.String> loadNamespaceMetadata(org.apache.iceberg.catalog.Namespace namespace)
- Specified by:
loadNamespaceMetadatain interfaceorg.apache.iceberg.catalog.SupportsNamespaces
-
isValidIdentifier
protected boolean isValidIdentifier(org.apache.iceberg.catalog.TableIdentifier tableIdentifier)
- Overrides:
isValidIdentifierin classorg.apache.iceberg.BaseMetastoreCatalog
-
newTableOps
public org.apache.iceberg.TableOperations newTableOps(org.apache.iceberg.catalog.TableIdentifier tableIdentifier)
- Specified by:
newTableOpsin classorg.apache.iceberg.BaseMetastoreCatalog
-
newViewOps
protected org.apache.iceberg.view.ViewOperations newViewOps(org.apache.iceberg.catalog.TableIdentifier identifier)
- Specified by:
newViewOpsin classorg.apache.iceberg.view.BaseMetastoreViewCatalog
-
defaultWarehouseLocation
protected java.lang.String defaultWarehouseLocation(org.apache.iceberg.catalog.TableIdentifier tableIdentifier)
- Specified by:
defaultWarehouseLocationin classorg.apache.iceberg.BaseMetastoreCatalog
-
toString
public java.lang.String toString()
- Overrides:
toStringin classorg.apache.iceberg.BaseMetastoreCatalog
-
setConf
public void setConf(org.apache.hadoop.conf.Configuration conf)
- Specified by:
setConfin interfaceorg.apache.hadoop.conf.Configurable
-
getConf
public org.apache.hadoop.conf.Configuration getConf()
- Specified by:
getConfin interfaceorg.apache.hadoop.conf.Configurable
-
properties
protected java.util.Map<java.lang.String,java.lang.String> properties()
- Overrides:
propertiesin classorg.apache.iceberg.BaseMetastoreCatalog
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classorg.apache.iceberg.BaseMetastoreCatalog- Throws:
java.io.IOException
-
-