public abstract class HivePartitionFetcherContextBase<P> extends Object implements HivePartitionContext<P>
PartitionFetcher.Context.ComparablePartitionValue<P,T extends Comparable<T>>
Modifier and Type | Field and Description |
---|---|
protected Configuration |
configuration |
protected JobConfWrapper |
confWrapper |
protected String |
defaultPartitionName |
protected HiveShim |
hiveShim |
protected HiveMetastoreClientWrapper |
metaStoreClient |
protected List<String> |
partitionKeys |
protected HiveOptions.PartitionOrder |
partitionOrder |
protected org.apache.hadoop.fs.Path |
tableLocation |
protected ObjectPath |
tablePath |
protected Properties |
tableProps |
protected org.apache.hadoop.hive.metastore.api.StorageDescriptor |
tableSd |
Constructor and Description |
---|
HivePartitionFetcherContextBase(ObjectPath tablePath,
HiveShim hiveShim,
JobConfWrapper confWrapper,
List<String> partitionKeys,
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.
|
List<PartitionFetcher.Context.ComparablePartitionValue> |
getComparablePartitionValueList()
Get list that contains partition with comparable object.
|
void |
open()
open the resources of the Context, this method should first call before call other
methods.
|
HiveTablePartition |
toHiveTablePartition(P partition)
Convert partition to
HiveTablePartition . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPartition
protected final ObjectPath tablePath
protected final HiveShim hiveShim
protected final JobConfWrapper confWrapper
protected final Configuration configuration
protected final String defaultPartitionName
protected final HiveOptions.PartitionOrder partitionOrder
protected transient HiveMetastoreClientWrapper metaStoreClient
protected transient org.apache.hadoop.hive.metastore.api.StorageDescriptor tableSd
protected transient Properties tableProps
protected transient org.apache.hadoop.fs.Path tableLocation
public HivePartitionFetcherContextBase(ObjectPath tablePath, HiveShim hiveShim, JobConfWrapper confWrapper, List<String> partitionKeys, Configuration configuration, String defaultPartitionName)
public void open() throws Exception
PartitionFetcher.Context
open
in interface PartitionFetcher.Context<P>
Exception
public List<PartitionFetcher.Context.ComparablePartitionValue> getComparablePartitionValueList() throws Exception
PartitionFetcher.Context
For 'create-time' and 'partition-time',the comparable object type is Long which represents time in milliseconds, for 'partition-name', the comparable object type is String which represents the partition names string.
getComparablePartitionValueList
in interface PartitionFetcher.Context<P>
Exception
public void close() throws Exception
PartitionFetcher.Context
close
in interface PartitionFetcher.Context<P>
Exception
public HiveTablePartition toHiveTablePartition(P partition)
HivePartitionContext
HiveTablePartition
.toHiveTablePartition
in interface HivePartitionContext<P>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.