|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.mapreduce.InputSplit
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigSplit
public class PigSplit
The main split class that maintains important
information about the input split.
The reason this class implements Configurable is so that Hadoop will call
Configurable.setConf(Configuration)
on the backend so we can use
the Configuration to create the SerializationFactory to deserialize the
wrapped InputSplit.
Constructor Summary | |
---|---|
PigSplit()
|
|
PigSplit(org.apache.hadoop.mapreduce.InputSplit[] wrappedSplits,
int inputIndex,
List<OperatorKey> targetOps,
int splitIndex)
|
Method Summary | |
---|---|
boolean |
disableCounter()
|
org.apache.hadoop.conf.Configuration |
getConf()
|
long |
getLength()
|
long |
getLength(int idx)
Return the length of a wrapped split |
String[] |
getLocations()
|
int |
getNumPaths()
|
int |
getSplitIndex()
|
List<OperatorKey> |
getTargetOps()
|
org.apache.hadoop.mapreduce.InputSplit |
getWrappedSplit()
This methods returns the actual InputSplit (as returned by the InputFormat ) which this class is wrapping. |
org.apache.hadoop.mapreduce.InputSplit |
getWrappedSplit(int idx)
|
boolean |
isMultiInputs()
Returns true if the map has multiple inputs, else false |
void |
readFields(DataInput is)
|
void |
setConf(org.apache.hadoop.conf.Configuration conf)
(non-Javadoc) |
void |
setCurrentIdx(int idx)
|
void |
setDisableCounter(boolean disableCounter)
|
void |
setMultiInputs(boolean b)
Indicates this map has multiple input (such as the result of a join operation). |
String |
toString()
|
void |
write(DataOutput os)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PigSplit()
public PigSplit(org.apache.hadoop.mapreduce.InputSplit[] wrappedSplits, int inputIndex, List<OperatorKey> targetOps, int splitIndex)
Method Detail |
---|
public List<OperatorKey> getTargetOps()
public org.apache.hadoop.mapreduce.InputSplit getWrappedSplit()
InputFormat
) which this class is wrapping.
public org.apache.hadoop.mapreduce.InputSplit getWrappedSplit(int idx)
idx
- the index into the wrapped splits
public String[] getLocations() throws IOException, InterruptedException
getLocations
in class org.apache.hadoop.mapreduce.InputSplit
IOException
InterruptedException
public long getLength() throws IOException, InterruptedException
getLength
in class org.apache.hadoop.mapreduce.InputSplit
IOException
InterruptedException
public long getLength(int idx) throws IOException, InterruptedException
idx
- the index into the wrapped splits
IOException
InterruptedException
public void readFields(DataInput is) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput os) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public int getSplitIndex()
public void setMultiInputs(boolean b)
b
- true if the map has multiple inputspublic boolean isMultiInputs()
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.Configurable
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
This will be called by
{@link PigInputFormat#getSplits(org.apache.hadoop.mapreduce.JobContext)}
to be used in {@link #write(DataOutput)} for serializing the
wrappedSplit
This will be called by Hadoop in the backend to set the right Job
Configuration (hadoop will invoke this method because PigSplit implements
{@link Configurable} - we need this Configuration in readFields() to
deserialize the wrappedSplit
public int getNumPaths()
public String toString()
toString
in class Object
public void setDisableCounter(boolean disableCounter)
public boolean disableCounter()
public void setCurrentIdx(int idx)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |