public class HiveTableInputFormat extends org.apache.flink.api.java.hadoop.common.HadoopInputFormatCommonBase<org.apache.flink.table.data.RowData,HiveTableInputSplit> implements org.apache.flink.api.common.io.CheckpointableInputFormat<HiveTableInputSplit,Long>
| Modifier and Type | Field and Description |
|---|---|
protected SplitReader |
reader |
| Constructor and Description |
|---|
HiveTableInputFormat(org.apache.hadoop.mapred.JobConf jobConf,
List<String> partitionKeys,
org.apache.flink.table.types.DataType[] fieldTypes,
String[] fieldNames,
int[] projectedFields,
Long limit,
String hiveVersion,
boolean useMapRedReader,
List<HiveTablePartition> partitions) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
configure(org.apache.flink.configuration.Configuration parameters) |
HiveTableInputSplit[] |
createInputSplits(int minNumSplits) |
static HiveTableInputSplit[] |
createInputSplits(int minNumSplits,
List<HiveTablePartition> partitions,
org.apache.hadoop.mapred.JobConf jobConf) |
Long |
getCurrentState() |
org.apache.flink.core.io.InputSplitAssigner |
getInputSplitAssigner(HiveTableInputSplit[] inputSplits) |
org.apache.hadoop.mapred.JobConf |
getJobConf() |
int |
getNumFiles() |
org.apache.flink.api.common.io.statistics.BaseStatistics |
getStatistics(org.apache.flink.api.common.io.statistics.BaseStatistics cachedStats) |
org.apache.flink.table.data.RowData |
nextRecord(org.apache.flink.table.data.RowData reuse) |
void |
open(HiveTableInputSplit split) |
boolean |
reachedEnd() |
void |
reopen(HiveTableInputSplit split,
Long state) |
getCredentialsFromUGI, read, write@VisibleForTesting protected transient SplitReader reader
public HiveTableInputFormat(org.apache.hadoop.mapred.JobConf jobConf,
List<String> partitionKeys,
org.apache.flink.table.types.DataType[] fieldTypes,
String[] fieldNames,
int[] projectedFields,
Long limit,
String hiveVersion,
boolean useMapRedReader,
List<HiveTablePartition> partitions)
public org.apache.hadoop.mapred.JobConf getJobConf()
public void configure(org.apache.flink.configuration.Configuration parameters)
configure in interface org.apache.flink.api.common.io.InputFormat<org.apache.flink.table.data.RowData,HiveTableInputSplit>public void open(HiveTableInputSplit split) throws IOException
open in interface org.apache.flink.api.common.io.InputFormat<org.apache.flink.table.data.RowData,HiveTableInputSplit>IOExceptionpublic void reopen(HiveTableInputSplit split, Long state) throws IOException
reopen in interface org.apache.flink.api.common.io.CheckpointableInputFormat<HiveTableInputSplit,Long>IOExceptionpublic Long getCurrentState()
getCurrentState in interface org.apache.flink.api.common.io.CheckpointableInputFormat<HiveTableInputSplit,Long>public boolean reachedEnd()
throws IOException
reachedEnd in interface org.apache.flink.api.common.io.InputFormat<org.apache.flink.table.data.RowData,HiveTableInputSplit>IOExceptionpublic org.apache.flink.table.data.RowData nextRecord(org.apache.flink.table.data.RowData reuse)
throws IOException
nextRecord in interface org.apache.flink.api.common.io.InputFormat<org.apache.flink.table.data.RowData,HiveTableInputSplit>IOExceptionpublic void close()
throws IOException
close in interface org.apache.flink.api.common.io.InputFormat<org.apache.flink.table.data.RowData,HiveTableInputSplit>IOExceptionpublic HiveTableInputSplit[] createInputSplits(int minNumSplits) throws IOException
createInputSplits in interface org.apache.flink.api.common.io.InputFormat<org.apache.flink.table.data.RowData,HiveTableInputSplit>createInputSplits in interface org.apache.flink.core.io.InputSplitSource<HiveTableInputSplit>IOExceptionpublic static HiveTableInputSplit[] createInputSplits(int minNumSplits, List<HiveTablePartition> partitions, org.apache.hadoop.mapred.JobConf jobConf) throws IOException
IOExceptionpublic org.apache.flink.api.common.io.statistics.BaseStatistics getStatistics(org.apache.flink.api.common.io.statistics.BaseStatistics cachedStats)
getStatistics in interface org.apache.flink.api.common.io.InputFormat<org.apache.flink.table.data.RowData,HiveTableInputSplit>public org.apache.flink.core.io.InputSplitAssigner getInputSplitAssigner(HiveTableInputSplit[] inputSplits)
getInputSplitAssigner in interface org.apache.flink.api.common.io.InputFormat<org.apache.flink.table.data.RowData,HiveTableInputSplit>getInputSplitAssigner in interface org.apache.flink.core.io.InputSplitSource<HiveTableInputSplit>public int getNumFiles()
throws IOException
IOExceptionCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.