K
- KeyV
- Valuepublic abstract class GiraphFileInputFormat<K,V>
extends org.apache.hadoop.mapreduce.lib.input.FileInputFormat<K,V>
FileInputFormat
,
but allows for different data sources (vertex and edge data).Modifier and Type | Field and Description |
---|---|
static String |
EDGE_INPUT_DIR
Edge input file paths.
|
static String |
NUM_EDGE_INPUT_FILES
Number of edge input files.
|
static String |
NUM_VERTEX_INPUT_FILES
Number of vertex input files.
|
static String |
VERTEX_INPUT_DIR
Vertex input file paths.
|
Constructor and Description |
---|
GiraphFileInputFormat() |
Modifier and Type | Method and Description |
---|---|
static void |
addEdgeInputPath(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path path)
Add a
Path to the list of edge inputs. |
static void |
addVertexInputPath(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path path)
Add a
Path to the list of vertex inputs. |
static org.apache.hadoop.fs.Path[] |
getEdgeInputPaths(org.apache.hadoop.mapreduce.JobContext context)
Get the list of edge input
Path s. |
List<org.apache.hadoop.mapreduce.InputSplit> |
getEdgeSplits(org.apache.hadoop.mapreduce.JobContext job)
Generate the list of edge input splits.
|
static org.apache.hadoop.fs.Path[] |
getVertexInputPaths(org.apache.hadoop.mapreduce.JobContext context)
Get the list of vertex input
Path s. |
List<org.apache.hadoop.mapreduce.InputSplit> |
getVertexSplits(org.apache.hadoop.mapreduce.JobContext job)
Generate the list of vertex input splits.
|
protected List<org.apache.hadoop.fs.FileStatus> |
listEdgeStatus(org.apache.hadoop.mapreduce.JobContext job)
List edge input directories.
|
protected List<org.apache.hadoop.fs.FileStatus> |
listVertexStatus(org.apache.hadoop.mapreduce.JobContext job)
List vertex input directories.
|
static void |
setEdgeInputPath(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path path)
Set the
Path for edge input. |
static void |
setVertexInputPath(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path path)
Set the
Path for vertex input. |
addInputPath, addInputPathRecursively, addInputPaths, computeSplitSize, getBlockIndex, getFormatMinSplitSize, getInputDirRecursive, getInputPathFilter, getInputPaths, getMaxSplitSize, getMinSplitSize, getSplits, isSplitable, listStatus, makeSplit, makeSplit, setInputDirRecursive, setInputPathFilter, setInputPaths, setInputPaths, setMaxInputSplitSize, setMinInputSplitSize
public static final String VERTEX_INPUT_DIR
public static final String EDGE_INPUT_DIR
public static final String NUM_VERTEX_INPUT_FILES
public static final String NUM_EDGE_INPUT_FILES
public static void addVertexInputPath(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path path) throws IOException
Path
to the list of vertex inputs.conf
- the Configuration to store the input pathspath
- Path
to be added to the list of
vertex inputsIOException
public static void setVertexInputPath(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path path) throws IOException
Path
for vertex input.conf
- Configuration to store inpath
- Path
to setIOException
- on I/O errorspublic static void addEdgeInputPath(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path path) throws IOException
Path
to the list of edge inputs.conf
- the Configuration to store the input pathspath
- Path
to be added to the list of
edge inputsIOException
public static void setEdgeInputPath(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path path) throws IOException
Path
for edge input.conf
- Configuration to store inpath
- Path
to setIOException
- on I/O errorspublic static org.apache.hadoop.fs.Path[] getVertexInputPaths(org.apache.hadoop.mapreduce.JobContext context)
Path
s.context
- The jobPath
spublic static org.apache.hadoop.fs.Path[] getEdgeInputPaths(org.apache.hadoop.mapreduce.JobContext context)
Path
s.context
- The jobPath
sprotected List<org.apache.hadoop.fs.FileStatus> listVertexStatus(org.apache.hadoop.mapreduce.JobContext job) throws IOException
job
- the job to list vertex input paths forIOException
- if zero items.protected List<org.apache.hadoop.fs.FileStatus> listEdgeStatus(org.apache.hadoop.mapreduce.JobContext job) throws IOException
job
- the job to list edge input paths forIOException
- if zero items.public List<org.apache.hadoop.mapreduce.InputSplit> getVertexSplits(org.apache.hadoop.mapreduce.JobContext job) throws IOException
job
- The jobIOException
public List<org.apache.hadoop.mapreduce.InputSplit> getEdgeSplits(org.apache.hadoop.mapreduce.JobContext job) throws IOException
job
- The jobIOException
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.