Package com.marklogic.mapreduce
Class MarkLogicInputSplit
- java.lang.Object
-
- org.apache.hadoop.mapreduce.InputSplit
-
- com.marklogic.mapreduce.MarkLogicInputSplit
-
- All Implemented Interfaces:
org.apache.hadoop.io.Writable
public class MarkLogicInputSplit extends org.apache.hadoop.mapreduce.InputSplit implements org.apache.hadoop.io.WritableMarkLogic-based InputSplit, used to represent a group of records returned by MarkLogic server, and identify originating host.
-
-
Constructor Summary
Constructors Constructor Description MarkLogicInputSplit()MarkLogicInputSplit(long start, long length, BigInteger forestId, String hostName, List<ForestHost> replicas)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BigIntegergetForestId()longgetLength()String[]getLocations()List<ForestHost>getReplicas()longgetStart()booleanisLastSplit()Is this the last split?voidreadFields(DataInput in)voidsetForestId(BigInteger forestId)voidsetHostName(String[] hostName)voidsetLastSplit(boolean isLast)voidsetLength(long length)voidsetStart(long start)StringtoString()voidwrite(DataOutput out)
-
-
-
Constructor Detail
-
MarkLogicInputSplit
public MarkLogicInputSplit()
-
MarkLogicInputSplit
public MarkLogicInputSplit(long start, long length, BigInteger forestId, String hostName, List<ForestHost> replicas)
-
-
Method Detail
-
getLength
public long getLength() throws IOException, InterruptedException- Specified by:
getLengthin classorg.apache.hadoop.mapreduce.InputSplit- Throws:
IOExceptionInterruptedException
-
isLastSplit
public boolean isLastSplit()
Is this the last split?- Returns:
- True if this is the last split; false otherwise.
-
getLocations
public String[] getLocations() throws IOException, InterruptedException
- Specified by:
getLocationsin classorg.apache.hadoop.mapreduce.InputSplit- Throws:
IOExceptionInterruptedException
-
getStart
public long getStart()
-
setStart
public void setStart(long start)
-
getForestId
public BigInteger getForestId()
-
setForestId
public void setForestId(BigInteger forestId)
-
setHostName
public void setHostName(String[] hostName)
-
setLength
public void setLength(long length)
-
setLastSplit
public void setLastSplit(boolean isLast)
-
getReplicas
public List<ForestHost> getReplicas()
-
readFields
public void readFields(DataInput in) throws IOException
- Specified by:
readFieldsin interfaceorg.apache.hadoop.io.Writable- Throws:
IOException
-
write
public void write(DataOutput out) throws IOException
- Specified by:
writein interfaceorg.apache.hadoop.io.Writable- Throws:
IOException
-
-