Interface PartitionFetcher.Context<P>
-
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
ContinuousPartitionFetcher.Context<P,T>
- Enclosing interface:
- PartitionFetcher<P>
public static interface PartitionFetcher.Context<P> extends Serializable
Context for fetch partitions, partition information is stored in hive meta store.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
PartitionFetcher.Context.ComparablePartitionValue<P,T extends Comparable<T>>
A comparable partition value that can compare order by using its comparator.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.Optional<P>
getPartition(List<String> partValues)
Get partition by file partition values.void
open()
open the resources of the Context, this method should first call before call other methods.
-
-
-
Method Detail
-
open
void open() throws Exception
open the resources of the Context, this method should first call before call other methods.- Throws:
Exception
-
getPartition
Optional<P> getPartition(List<String> partValues) throws Exception
Get partition by file partition values.- Throws:
Exception
-
getComparablePartitionValueList
List<PartitionFetcher.Context.ComparablePartitionValue> getComparablePartitionValueList() throws Exception
Get list that contains partition with comparable object.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.
- Throws:
Exception
-
-