Package io.hgraphdb.gelly
Class HBaseElementInputFormat<T extends org.apache.flink.api.java.tuple.Tuple>
- java.lang.Object
-
- org.apache.flink.api.common.io.RichInputFormat<T,org.apache.flink.connector.hbase.source.TableInputSplit>
-
- org.apache.flink.connector.hbase2.source.AbstractTableInputFormat<T>
-
- io.hgraphdb.gelly.HBaseElementInputFormat<T>
-
- All Implemented Interfaces:
Serializable
,org.apache.flink.api.common.io.InputFormat<T,org.apache.flink.connector.hbase.source.TableInputSplit>
,org.apache.flink.core.io.InputSplitSource<org.apache.flink.connector.hbase.source.TableInputSplit>
- Direct Known Subclasses:
HBaseEdgeInputFormat
,HBaseVertexInputFormat
public abstract class HBaseElementInputFormat<T extends org.apache.flink.api.java.tuple.Tuple> extends org.apache.flink.connector.hbase2.source.AbstractTableInputFormat<T>
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ElementType
elementType
protected HBaseGraph
graph
protected HBaseGraphConfiguration
hConf
protected String
propertyName
-
Constructor Summary
Constructors Constructor Description HBaseElementInputFormat(HBaseGraphConfiguration hConf, ElementType elementType, String propertyName)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
closeInputFormat()
void
configure(org.apache.flink.configuration.Configuration parameters)
HBaseGraphConfiguration
getConfiguration()
ElementType
getElementType()
HBaseGraph
getGraph()
String
getPropertyName()
protected org.apache.hadoop.hbase.client.Scan
getScanner()
org.apache.hadoop.hbase.client.Table
getTable()
String
getTableName()
protected void
initTable()
boolean
isMock()
protected abstract T
mapResultToOutType(org.apache.hadoop.hbase.client.Result r)
-
Methods inherited from class org.apache.flink.connector.hbase2.source.AbstractTableInputFormat
close, closeTable, createInputSplits, getConnection, getHadoopConfiguration, getInputSplitAssigner, getStatistics, includeRegionInScan, nextRecord, open, reachedEnd
-
-
-
-
Field Detail
-
hConf
protected final HBaseGraphConfiguration hConf
-
elementType
protected final ElementType elementType
-
propertyName
protected final String propertyName
-
graph
protected transient HBaseGraph graph
-
-
Constructor Detail
-
HBaseElementInputFormat
public HBaseElementInputFormat(HBaseGraphConfiguration hConf, ElementType elementType, String propertyName)
-
-
Method Detail
-
getConfiguration
public HBaseGraphConfiguration getConfiguration()
-
isMock
public boolean isMock()
-
getElementType
public ElementType getElementType()
-
getPropertyName
public String getPropertyName()
-
getGraph
public HBaseGraph getGraph()
-
getTable
public org.apache.hadoop.hbase.client.Table getTable()
-
initTable
protected void initTable() throws IOException
- Specified by:
initTable
in classorg.apache.flink.connector.hbase2.source.AbstractTableInputFormat<T extends org.apache.flink.api.java.tuple.Tuple>
- Throws:
IOException
-
getTableName
public String getTableName()
- Specified by:
getTableName
in classorg.apache.flink.connector.hbase2.source.AbstractTableInputFormat<T extends org.apache.flink.api.java.tuple.Tuple>
-
getScanner
protected org.apache.hadoop.hbase.client.Scan getScanner()
- Specified by:
getScanner
in classorg.apache.flink.connector.hbase2.source.AbstractTableInputFormat<T extends org.apache.flink.api.java.tuple.Tuple>
-
configure
public void configure(org.apache.flink.configuration.Configuration parameters)
- Specified by:
configure
in interfaceorg.apache.flink.api.common.io.InputFormat<T extends org.apache.flink.api.java.tuple.Tuple,org.apache.flink.connector.hbase.source.TableInputSplit>
- Overrides:
configure
in classorg.apache.flink.connector.hbase2.source.AbstractTableInputFormat<T extends org.apache.flink.api.java.tuple.Tuple>
-
mapResultToOutType
protected abstract T mapResultToOutType(org.apache.hadoop.hbase.client.Result r)
- Specified by:
mapResultToOutType
in classorg.apache.flink.connector.hbase2.source.AbstractTableInputFormat<T extends org.apache.flink.api.java.tuple.Tuple>
-
closeInputFormat
public void closeInputFormat() throws IOException
- Overrides:
closeInputFormat
in classorg.apache.flink.api.common.io.RichInputFormat<T extends org.apache.flink.api.java.tuple.Tuple,org.apache.flink.connector.hbase.source.TableInputSplit>
- Throws:
IOException
-
-