public static class HiveTableSource.HiveContinuousPartitionFetcherContext<T extends Comparable<T>> extends HivePartitionFetcherContextBase<org.apache.hadoop.hive.metastore.api.Partition> implements ContinuousPartitionFetcher.Context<org.apache.hadoop.hive.metastore.api.Partition,T>
ContinuousPartitionFetcher
.PartitionFetcher.Context.ComparablePartitionValue<P,T extends Comparable<T>>
configuration, confWrapper, consumeOrder, defaultPartitionName, fieldNames, fieldTypes, hiveShim, metaStoreClient, partitionKeys, tableLocation, tablePath, tableProps, tableSd
Constructor and Description |
---|
HiveContinuousPartitionFetcherContext(ObjectPath tablePath,
HiveShim hiveShim,
JobConfWrapper confWrapper,
List<String> partitionKeys,
DataType[] fieldTypes,
String[] fieldNames,
Configuration configuration,
String defaultPartitionName) |
Modifier and Type | Method and Description |
---|---|
void |
close()
close the resources of the Context, this method should call when the context do not need
any more.
|
T |
getConsumeStartOffset()
Get the partition consume start offset.
|
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)
Get partition by file partition values.
|
ObjectPath |
getTablePath()
The table full path.
|
TypeSerializer<T> |
getTypeSerializer()
Get the Serializer of partition order.
|
HiveTablePartition |
toHiveTablePartition(org.apache.hadoop.hive.metastore.api.Partition partition)
Convert partition to HiveTablePartition.
|
getComparablePartitionValueList, open
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getComparablePartitionValueList, open
public HiveContinuousPartitionFetcherContext(ObjectPath tablePath, HiveShim hiveShim, JobConfWrapper confWrapper, List<String> partitionKeys, DataType[] fieldTypes, String[] fieldNames, Configuration configuration, String defaultPartitionName)
public Optional<org.apache.hadoop.hive.metastore.api.Partition> getPartition(List<String> partValues) throws org.apache.thrift.TException
PartitionFetcher.Context
getPartition
in interface PartitionFetcher.Context<org.apache.hadoop.hive.metastore.api.Partition>
org.apache.thrift.TException
public ObjectPath getTablePath()
ContinuousPartitionFetcher.Context
getTablePath
in interface 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 TypeSerializer<T> getTypeSerializer()
ContinuousPartitionFetcher.Context
getTypeSerializer
in interface ContinuousPartitionFetcher.Context<org.apache.hadoop.hive.metastore.api.Partition,T extends Comparable<T>>
public T getConsumeStartOffset()
ContinuousPartitionFetcher.Context
getConsumeStartOffset
in interface ContinuousPartitionFetcher.Context<org.apache.hadoop.hive.metastore.api.Partition,T extends Comparable<T>>
public void close() throws Exception
PartitionFetcher.Context
close
in interface PartitionFetcher.Context<org.apache.hadoop.hive.metastore.api.Partition>
close
in class HivePartitionFetcherContextBase<org.apache.hadoop.hive.metastore.api.Partition>
Exception
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.