Class HiveInputFormatPartitionReader
- java.lang.Object
-
- org.apache.flink.connectors.hive.read.HiveInputFormatPartitionReader
-
- All Implemented Interfaces:
Closeable
,Serializable
,AutoCloseable
,PartitionReader<HiveTablePartition,RowData>
public class HiveInputFormatPartitionReader extends Object implements PartitionReader<HiveTablePartition,RowData>
Partition reader that read records from InputFormat using given partitions.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ObjectPath
tablePath
-
Constructor Summary
Constructors Constructor Description HiveInputFormatPartitionReader(int threadNum, org.apache.hadoop.mapred.JobConf jobConf, String hiveVersion, ObjectPath tablePath, DataType[] fieldTypes, String[] fieldNames, List<String> partitionKeys, int[] selectedFields, boolean useMapRedReader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close the reader, this method should release all resources.void
open(List<HiveTablePartition> partitions)
Opens the reader with given partitions.RowData
read(RowData reuse)
Reads the next record from the partitions.
-
-
-
Field Detail
-
tablePath
protected final ObjectPath tablePath
-
-
Method Detail
-
open
public void open(List<HiveTablePartition> partitions) throws IOException
Description copied from interface:PartitionReader
Opens the reader with given partitions.- Specified by:
open
in interfacePartitionReader<HiveTablePartition,RowData>
- Throws:
IOException
-
read
public RowData read(RowData reuse) throws IOException
Description copied from interface:PartitionReader
Reads the next record from the partitions.When this method is called, the reader it guaranteed to be opened.
- Specified by:
read
in interfacePartitionReader<HiveTablePartition,RowData>
- Parameters:
reuse
- Object that may be reused.- Returns:
- Read record.
- Throws:
IOException
-
close
public void close() throws IOException
Description copied from interface:PartitionReader
Close the reader, this method should release all resources.When this method is called, the reader it guaranteed to be opened.
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfacePartitionReader<HiveTablePartition,RowData>
- Throws:
IOException
-
-