public class HoodieCatalogUtil extends Object
| Constructor and Description |
|---|
HoodieCatalogUtil() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.hadoop.hive.conf.HiveConf |
createHiveConf(String hiveConfDir)
Returns a new
HiveConf. |
static List<String> |
getOrderedPartitionValues(String catalogName,
org.apache.hadoop.hive.conf.HiveConf hiveConf,
org.apache.flink.table.catalog.CatalogPartitionSpec partitionSpec,
List<String> partitionKeys,
org.apache.flink.table.catalog.ObjectPath tablePath)
Returns a list of ordered partition values by re-arranging them based on the given list of
partition keys.
|
static List<String> |
getPartitionKeys(org.apache.flink.table.catalog.CatalogTable table)
Returns the partition key list with given table.
|
static String |
inferPartitionPath(boolean hiveStylePartitioning,
org.apache.flink.table.catalog.CatalogPartitionSpec catalogPartitionSpec)
Returns the partition path with given
CatalogPartitionSpec. |
static boolean |
isEmbeddedMetastore(org.apache.hadoop.hive.conf.HiveConf hiveConf)
Check whether the hive.metastore.uris is empty
|
public static org.apache.hadoop.hive.conf.HiveConf createHiveConf(@Nullable String hiveConfDir)
HiveConf.hiveConfDir - Hive conf directory path.public static boolean isEmbeddedMetastore(org.apache.hadoop.hive.conf.HiveConf hiveConf)
public static List<String> getPartitionKeys(org.apache.flink.table.catalog.CatalogTable table)
public static String inferPartitionPath(boolean hiveStylePartitioning, org.apache.flink.table.catalog.CatalogPartitionSpec catalogPartitionSpec)
CatalogPartitionSpec.@VisibleForTesting public static List<String> getOrderedPartitionValues(String catalogName, org.apache.hadoop.hive.conf.HiveConf hiveConf, org.apache.flink.table.catalog.CatalogPartitionSpec partitionSpec, List<String> partitionKeys, org.apache.flink.table.catalog.ObjectPath tablePath) throws org.apache.flink.table.catalog.exceptions.PartitionSpecInvalidException
partitionSpec - The partition specpartitionKeys - The partition keystablePath - The table pathorg.apache.flink.table.catalog.exceptions.PartitionSpecInvalidException - thrown if partitionSpec and partitionKeys have
different sizes, or any key in partitionKeys doesn't exist in partitionSpec.Copyright © 2023 The Apache Software Foundation. All rights reserved.