public class FileSplit extends BaseInputSplit
| Modifier and Type | Field and Description |
|---|---|
protected String[] |
allowFormat |
protected Random |
random |
protected boolean |
randomize |
protected boolean |
recursive |
protected File |
rootDir |
iterationOrder, length, uriStrings| Modifier | Constructor and Description |
|---|---|
|
FileSplit(File rootDir) |
|
FileSplit(File rootDir,
Random rng) |
|
FileSplit(File rootDir,
String[] allowFormat) |
|
FileSplit(File rootDir,
String[] allowFormat,
boolean recursive) |
protected |
FileSplit(File rootDir,
String[] allowFormat,
boolean recursive,
Random random,
boolean runMain) |
|
FileSplit(File rootDir,
String[] allowFormat,
Random rng) |
| Modifier and Type | Method and Description |
|---|---|
File |
getRootDir() |
WritableType |
getType() |
protected void |
initialize() |
long |
length()
Length of the split
|
void |
readFields(DataInput in)
Deserialize the fields of this object from
in. |
void |
reset()
Reset the InputSplit without reinitializing it from scratch.
|
void |
write(DataOutput out)
Serialize the fields of this object to
out. |
locations, locationsIterator, locationsPathIterator, sample, toDouble, toFloat, toInt, toLong, writeTypeprotected File rootDir
protected String[] allowFormat
protected boolean recursive
protected Random random
protected boolean randomize
protected FileSplit(File rootDir, String[] allowFormat, boolean recursive, Random random, boolean runMain)
public FileSplit(File rootDir)
protected void initialize()
public long length()
InputSplitlength in interface InputSplitlength in class BaseInputSplitpublic void reset()
InputSplitpublic void write(DataOutput out) throws IOException
Writableout.out - DataOuput to serialize this object into.IOExceptionpublic void readFields(DataInput in) throws IOException
Writablein.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
in - DataInput to deseriablize this object from.IOExceptionpublic WritableType getType()
getType in interface WritablegetType in class BaseInputSplitpublic File getRootDir()
Copyright © 2017. All rights reserved.