public static class HiveTableSource.HiveContinuousPartitionFetcherContext<T extends Comparable<T>> extends HivePartitionFetcherContextBase<org.apache.hadoop.hive.metastore.api.Partition> implements org.apache.flink.table.filesystem.ContinuousPartitionFetcher.Context<org.apache.hadoop.hive.metastore.api.Partition,T>
ContinuousPartitionFetcher.org.apache.flink.table.filesystem.PartitionFetcher.Context.ComparablePartitionValue<P,T extends Comparable<T>>configuration, confWrapper, consumeOrder, defaultPartitionName, fieldNames, fieldTypes, fs, hiveShim, metaStoreClient, partitionKeys, tableLocation, tablePath, tableProps, tableSd| Constructor and Description |
|---|
HiveContinuousPartitionFetcherContext(org.apache.flink.table.catalog.ObjectPath tablePath,
HiveShim hiveShim,
JobConfWrapper confWrapper,
List<String> partitionKeys,
org.apache.flink.table.types.DataType[] fieldTypes,
String[] fieldNames,
org.apache.flink.configuration.Configuration configuration,
String defaultPartitionName) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
T |
getConsumeStartOffset() |
long |
getModificationTime(org.apache.hadoop.hive.metastore.api.Partition partition,
T partitionOffset)
Get the partition modified time.
|
Optional<org.apache.hadoop.hive.metastore.api.Partition> |
getPartition(List<String> partValues) |
org.apache.flink.table.catalog.ObjectPath |
getTablePath() |
org.apache.flink.api.common.typeutils.TypeSerializer<T> |
getTypeSerializer() |
HiveTablePartition |
toHiveTablePartition(org.apache.hadoop.hive.metastore.api.Partition partition)
Convert partition to HiveTablePartition.
|
getComparablePartitionValueList, openpublic HiveContinuousPartitionFetcherContext(org.apache.flink.table.catalog.ObjectPath tablePath,
HiveShim hiveShim,
JobConfWrapper confWrapper,
List<String> partitionKeys,
org.apache.flink.table.types.DataType[] fieldTypes,
String[] fieldNames,
org.apache.flink.configuration.Configuration configuration,
String defaultPartitionName)
public Optional<org.apache.hadoop.hive.metastore.api.Partition> getPartition(List<String> partValues) throws org.apache.thrift.TException
getPartition in interface org.apache.flink.table.filesystem.PartitionFetcher.Context<org.apache.hadoop.hive.metastore.api.Partition>org.apache.thrift.TExceptionpublic org.apache.flink.table.catalog.ObjectPath getTablePath()
getTablePath in interface org.apache.flink.table.filesystem.ContinuousPartitionFetcher.Context<org.apache.hadoop.hive.metastore.api.Partition,T extends Comparable<T>>public long getModificationTime(org.apache.hadoop.hive.metastore.api.Partition partition,
T partitionOffset)
the time is the the folder/file modification time in filesystem when fetched in create-time order, the time is extracted from partition name when fetched in partition-time order, the time is partion create time in metaStore when fetched in partition-name order.
public HiveTablePartition toHiveTablePartition(org.apache.hadoop.hive.metastore.api.Partition partition)
public org.apache.flink.api.common.typeutils.TypeSerializer<T> getTypeSerializer()
getTypeSerializer in interface org.apache.flink.table.filesystem.ContinuousPartitionFetcher.Context<org.apache.hadoop.hive.metastore.api.Partition,T extends Comparable<T>>public T getConsumeStartOffset()
getConsumeStartOffset in interface org.apache.flink.table.filesystem.ContinuousPartitionFetcher.Context<org.apache.hadoop.hive.metastore.api.Partition,T extends Comparable<T>>public void close()
throws Exception
close in interface org.apache.flink.table.filesystem.PartitionFetcher.Context<org.apache.hadoop.hive.metastore.api.Partition>close in class HivePartitionFetcherContextBase<org.apache.hadoop.hive.metastore.api.Partition>ExceptionCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.