public final class Catalogs
extends java.lang.Object
Catalog API.
Catalog resolution happens in this order:
InputFormatConfig.CATALOG_LOADER_CLASS
InputFormatConfig.CATALOG
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
LOCATION |
static java.lang.String |
NAME |
| Modifier and Type | Method and Description |
|---|---|
static Table |
createTable(org.apache.hadoop.conf.Configuration conf,
java.util.Properties props)
Creates an Iceberg table using the catalog specified by the configuration.
|
static boolean |
dropTable(org.apache.hadoop.conf.Configuration conf,
java.util.Properties props)
Drops an Iceberg table using the catalog specified by the configuration.
|
static boolean |
hiveCatalog(org.apache.hadoop.conf.Configuration conf)
Returns true if HiveCatalog is used
|
static Table |
loadTable(org.apache.hadoop.conf.Configuration conf)
Load an Iceberg table using the catalog and table identifier (or table path) specified by the configuration.
|
static Table |
loadTable(org.apache.hadoop.conf.Configuration conf,
java.util.Properties props)
Load an Iceberg table using the catalog specified by the configuration.
|
public static final java.lang.String NAME
public static final java.lang.String LOCATION
public static Table loadTable(org.apache.hadoop.conf.Configuration conf)
conf - a Hadoop confpublic static Table loadTable(org.apache.hadoop.conf.Configuration conf, java.util.Properties props)
The table identifier (NAME) or table path (LOCATION) should be specified by
the controlling properties.
Used by HiveIcebergSerDe and HiveIcebergStorageHandler
conf - a Hadoopprops - the controlling propertiespublic static Table createTable(org.apache.hadoop.conf.Configuration conf, java.util.Properties props)
The properties should contain the following values:
NAME) or table path (LOCATION) is required
InputFormatConfig.TABLE_SCHEMA) is required
InputFormatConfig.PARTITION_SPEC) is optional. Table will be unpartitioned if
not provided
Other properties will be handled over to the Table creation. The controlling properties above will not be propagated.
conf - a Hadoop confprops - the controlling propertiespublic static boolean dropTable(org.apache.hadoop.conf.Configuration conf,
java.util.Properties props)
The table identifier (NAME) or table path (LOCATION) should be specified by
the controlling properties.
conf - a Hadoop confprops - the controlling propertiespublic static boolean hiveCatalog(org.apache.hadoop.conf.Configuration conf)
conf - a Hadoop conf