Package ml.shifu.guagua.mapreduce
Class GuaguaInputSplit
- java.lang.Object
-
- org.apache.hadoop.mapreduce.InputSplit
-
- ml.shifu.guagua.mapreduce.GuaguaInputSplit
-
- All Implemented Interfaces:
org.apache.hadoop.io.Writable
@Deprecated public class GuaguaInputSplit extends org.apache.hadoop.mapreduce.InputSplit implements org.apache.hadoop.io.Writable
Deprecated.useGuaguaInputSplitInputSplitimplementation in guagua for Hadoop MapReduce job.If mapper with
isMastertrue means it is master, for master so farfileSplitsisnull.For worker, input
fileSplitsare included, hereFileSplitarray is used to make guagua support combiningFileSplits in one task.
-
-
Constructor Summary
Constructors Constructor Description GuaguaInputSplit()Deprecated.Default constructor without any setting.GuaguaInputSplit(boolean isMaster, org.apache.hadoop.mapreduce.lib.input.FileSplit fileSplit)Deprecated.Constructor withisMasterand one FileSplit settings.GuaguaInputSplit(boolean isMaster, org.apache.hadoop.mapreduce.lib.input.FileSplit... fileSplits)Deprecated.Constructor withisMasterandfileSplitssettings.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.apache.hadoop.mapreduce.lib.input.FileSplit[]getFileSplits()Deprecated.longgetLength()Deprecated.For master split, useLong.MAX_VALUEas its length to make it is the first task for Hadoop job.String[]getLocations()Deprecated.Data locality functions, return all hosts for all file splits.booleanisMaster()Deprecated.voidreadFields(DataInput in)Deprecated.voidsetFileSplits(org.apache.hadoop.mapreduce.lib.input.FileSplit[] fileSplits)Deprecated.voidsetMaster(boolean isMaster)Deprecated.StringtoString()Deprecated.voidwrite(DataOutput out)Deprecated.
-
-
-
Constructor Detail
-
GuaguaInputSplit
public GuaguaInputSplit()
Deprecated.Default constructor without any setting.
-
GuaguaInputSplit
public GuaguaInputSplit(boolean isMaster, org.apache.hadoop.mapreduce.lib.input.FileSplit... fileSplits)Deprecated.Constructor withisMasterandfileSplitssettings.- Parameters:
isMaster- Whether the input split is master split.fileSplits- File splits used for mapper task.
-
GuaguaInputSplit
public GuaguaInputSplit(boolean isMaster, org.apache.hadoop.mapreduce.lib.input.FileSplit fileSplit)Deprecated.Constructor withisMasterand one FileSplit settings.- Parameters:
isMaster- Whether the input split is master split.fileSplit- File split used for mapper task.
-
-
Method Detail
-
write
public void write(DataOutput out) throws IOException
Deprecated.- Specified by:
writein interfaceorg.apache.hadoop.io.Writable- Throws:
IOException
-
readFields
public void readFields(DataInput in) throws IOException
Deprecated.- Specified by:
readFieldsin interfaceorg.apache.hadoop.io.Writable- Throws:
IOException
-
getLength
public long getLength() throws IOException, InterruptedExceptionDeprecated.For master split, useLong.MAX_VALUEas its length to make it is the first task for Hadoop job. It is convenient for users to check master in Hadoop UI.- Specified by:
getLengthin classorg.apache.hadoop.mapreduce.InputSplit- Throws:
IOExceptionInterruptedException
-
getLocations
public String[] getLocations() throws IOException, InterruptedException
Deprecated.Data locality functions, return all hosts for all file splits.- Specified by:
getLocationsin classorg.apache.hadoop.mapreduce.InputSplit- Throws:
IOExceptionInterruptedException
-
isMaster
public boolean isMaster()
Deprecated.
-
setMaster
public void setMaster(boolean isMaster)
Deprecated.
-
getFileSplits
public org.apache.hadoop.mapreduce.lib.input.FileSplit[] getFileSplits()
Deprecated.
-
setFileSplits
public void setFileSplits(org.apache.hadoop.mapreduce.lib.input.FileSplit[] fileSplits)
Deprecated.
-
-