public class CatalogUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ICEBERG_CATALOG_HADOOP |
static java.lang.String |
ICEBERG_CATALOG_HIVE |
static java.lang.String |
ICEBERG_CATALOG_TYPE |
static java.lang.String |
ICEBERG_CATALOG_TYPE_HADOOP |
static java.lang.String |
ICEBERG_CATALOG_TYPE_HIVE |
| Modifier and Type | Method and Description |
|---|---|
static Catalog |
buildIcebergCatalog(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> options,
org.apache.hadoop.conf.Configuration conf) |
static void |
dropTableData(FileIO io,
TableMetadata metadata)
Drops all data and metadata files referenced by TableMetadata.
|
static Catalog |
loadCatalog(java.lang.String impl,
java.lang.String catalogName,
java.util.Map<java.lang.String,java.lang.String> properties,
org.apache.hadoop.conf.Configuration hadoopConf)
Load a custom catalog implementation.
|
static FileIO |
loadFileIO(java.lang.String impl,
java.util.Map<java.lang.String,java.lang.String> properties,
org.apache.hadoop.conf.Configuration hadoopConf)
Load a custom
FileIO implementation. |
public static final java.lang.String ICEBERG_CATALOG_TYPE
public static final java.lang.String ICEBERG_CATALOG_TYPE_HADOOP
public static final java.lang.String ICEBERG_CATALOG_TYPE_HIVE
public static final java.lang.String ICEBERG_CATALOG_HIVE
public static final java.lang.String ICEBERG_CATALOG_HADOOP
public static void dropTableData(FileIO io, TableMetadata metadata)
This should be called by dropTable implementations to clean up table files once the table has been dropped in the metastore.
io - a FileIO to use for deletesmetadata - the last valid TableMetadata instance for a dropped table.public static Catalog loadCatalog(java.lang.String impl, java.lang.String catalogName, java.util.Map<java.lang.String,java.lang.String> properties, org.apache.hadoop.conf.Configuration hadoopConf)
The catalog must have a no-arg constructor.
If the class implements Configurable,
a Hadoop config will be passed using Configurable.setConf(Configuration).
Catalog.initialize(String catalogName, Map options) is called to complete the initialization.
impl - catalog implementation full class namecatalogName - catalog nameproperties - catalog propertieshadoopConf - hadoop configuration if neededjava.lang.IllegalArgumentException - if no-arg constructor not found or error during initializationpublic static Catalog buildIcebergCatalog(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> options, org.apache.hadoop.conf.Configuration conf)
public static FileIO loadFileIO(java.lang.String impl, java.util.Map<java.lang.String,java.lang.String> properties, org.apache.hadoop.conf.Configuration hadoopConf)
FileIO implementation.
The implementation must have a no-arg constructor.
If the class implements Configurable,
a Hadoop config will be passed using Configurable.setConf(Configuration).
FileIO.initialize(Map properties) is called to complete the initialization.
impl - full class name of a custom FileIO implementationhadoopConf - hadoop configurationjava.lang.IllegalArgumentException - if class path not found or
right constructor not found or
the loaded class cannot be casted to the given interface type