public class HiveSourceDynamicFileEnumerator extends Object implements DynamicFileEnumerator
DynamicFileEnumerator
implementation for hive source. It uses HiveSourceFileEnumerator.createInputSplits(int, java.util.List<org.apache.flink.connectors.hive.HiveTablePartition>, org.apache.hadoop.mapred.JobConf, boolean)
to generate splits like HiveSourceFileEnumerator, but
only enumerates HiveTablePartition
s that exist in the DynamicFilteringData
if a
DynamicFilteringData is provided.Modifier and Type | Class and Description |
---|---|
static class |
HiveSourceDynamicFileEnumerator.Provider
A factory to create
HiveSourceDynamicFileEnumerator . |
Modifier and Type | Field and Description |
---|---|
static Set<LogicalTypeRoot> |
SUPPORTED_TYPES |
Constructor and Description |
---|
HiveSourceDynamicFileEnumerator(String table,
List<String> dynamicFilterPartitionKeys,
List<HiveTablePartition> allPartitions,
String hiveVersion,
org.apache.hadoop.mapred.JobConf jobConf) |
Modifier and Type | Method and Description |
---|---|
Collection<FileSourceSplit> |
enumerateSplits(Path[] paths,
int minDesiredSplits)
Generates all file splits for the relevant files under the given paths.
|
List<HiveTablePartition> |
getFinalPartitions() |
void |
setDynamicFilteringData(DynamicFilteringData data)
Provides a
DynamicFilteringData for filtering while the enumerator is enumerating
splits. |
public static final Set<LogicalTypeRoot> SUPPORTED_TYPES
public void setDynamicFilteringData(DynamicFilteringData data)
DynamicFileEnumerator
DynamicFilteringData
for filtering while the enumerator is enumerating
splits.
The DynamicFilteringData
is typically collected by a collector operator, and
transferred here by a coordinating event. The method should never be called directly by
users.
setDynamicFilteringData
in interface DynamicFileEnumerator
public Collection<FileSourceSplit> enumerateSplits(Path[] paths, int minDesiredSplits) throws IOException
FileEnumerator
minDesiredSplits
is an optional hint indicating how many splits would be necessary to
exploit parallelism properly.enumerateSplits
in interface FileEnumerator
IOException
public List<HiveTablePartition> getFinalPartitions()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.