public class HiveTableSource extends InputFormatTableSource<Row> implements PartitionableTableSource
Constructor and Description |
---|
HiveTableSource(org.apache.hadoop.mapred.JobConf jobConf,
ObjectPath tablePath,
CatalogTable catalogTable) |
Modifier and Type | Method and Description |
---|---|
TableSource |
applyPartitionPruning(List<Map<String,String>> remainingPartitions)
Applies the remaining partitions to the table source.
|
String |
explainSource()
Describes the table source.
|
InputFormat |
getInputFormat()
Returns an
InputFormat for reading the data of the table. |
List<String> |
getPartitionFieldNames()
Gets the partition field names of the table.
|
List<Map<String,String>> |
getPartitions()
Returns all the partitions of this
PartitionableTableSource . |
DataType |
getProducedDataType()
Returns the
DataType for the produced data of the TableSource . |
TypeInformation<Row> |
getReturnType() |
TableSchema |
getTableSchema()
Returns the schema of the produced table.
|
getDataStream, isBounded
public HiveTableSource(org.apache.hadoop.mapred.JobConf jobConf, ObjectPath tablePath, CatalogTable catalogTable)
public InputFormat getInputFormat()
InputFormatTableSource
InputFormat
for reading the data of the table.getInputFormat
in class InputFormatTableSource<Row>
public TableSchema getTableSchema()
TableSource
getTableSchema
in interface TableSource<Row>
TableSchema
of the produced table.public DataType getProducedDataType()
TableSource
DataType
for the produced data of the TableSource
.getProducedDataType
in interface TableSource<Row>
DataSet
or DataStream
.public TypeInformation<Row> getReturnType()
getReturnType
in interface TableSource<Row>
public List<Map<String,String>> getPartitions()
PartitionableTableSource
PartitionableTableSource
.getPartitions
in interface PartitionableTableSource
public List<String> getPartitionFieldNames()
PartitionableTableSource
All the partition fields should exist in the TableSink.getTableSchema()
.
getPartitionFieldNames
in interface PartitionableTableSource
public TableSource applyPartitionPruning(List<Map<String,String>> remainingPartitions)
PartitionableTableSource
remainingPartitions
is
the remaining partitions of PartitionableTableSource.getPartitions()
after partition pruning applied.
After trying to apply partition pruning, we should return a new TableSource
instance which holds all pruned-partitions.
applyPartitionPruning
in interface PartitionableTableSource
remainingPartitions
- Remaining partitions after partition pruning applied.TableSource
holds all pruned-partitions.public String explainSource()
TableSource
explainSource
in interface TableSource<Row>
TableSource
.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.