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 |
length, locations
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() |
protected void |
initialize() |
long |
length()
Length of the split
|
void |
readFields(DataInput in)
Deserialize the fields of this object from
in . |
void |
write(DataOutput out)
Serialize the fields of this object to
out . |
protected 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()
InputSplit
length
in interface InputSplit
length
in class BaseInputSplit
public void write(DataOutput out) throws IOException
Writable
out
.out
- DataOuput
to serialize this object into.IOException
public void readFields(DataInput in) throws IOException
Writable
in
.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
in
- DataInput
to deseriablize this object from.IOException
public File getRootDir()
Copyright © 2016. All rights reserved.