public class PigSplit
extends org.apache.hadoop.mapreduce.InputSplit
implements org.apache.hadoop.io.Writable, org.apache.hadoop.conf.Configurable
Configurable.setConf(Configuration)
on the backend so we can use
the Configuration to create the SerializationFactory to deserialize the
wrapped InputSplit.Constructor and Description |
---|
PigSplit() |
PigSplit(org.apache.hadoop.mapreduce.InputSplit[] wrappedSplits,
int inputIndex,
java.util.List<OperatorKey> targetOps,
int splitIndex) |
Modifier and Type | Method and Description |
---|---|
boolean |
disableCounter() |
org.apache.hadoop.conf.Configuration |
getConf() |
long |
getLength() |
long |
getLength(int idx)
Return the length of a wrapped split
|
java.lang.String[] |
getLocations() |
int |
getNumPaths() |
int |
getSplitIndex() |
java.util.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(java.io.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).
|
java.lang.String |
toString() |
void |
write(java.io.DataOutput os) |
public PigSplit()
public PigSplit(org.apache.hadoop.mapreduce.InputSplit[] wrappedSplits, int inputIndex, java.util.List<OperatorKey> targetOps, int splitIndex)
public java.util.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 splitspublic java.lang.String[] getLocations() throws java.io.IOException, java.lang.InterruptedException
getLocations
in class org.apache.hadoop.mapreduce.InputSplit
java.io.IOException
java.lang.InterruptedException
public long getLength() throws java.io.IOException, java.lang.InterruptedException
getLength
in class org.apache.hadoop.mapreduce.InputSplit
java.io.IOException
java.lang.InterruptedException
public long getLength(int idx) throws java.io.IOException, java.lang.InterruptedException
idx
- the index into the wrapped splitsjava.io.IOException
java.lang.InterruptedException
public void readFields(java.io.DataInput is) throws java.io.IOException
readFields
in interface org.apache.hadoop.io.Writable
java.io.IOException
public void write(java.io.DataOutput os) throws java.io.IOException
write
in interface org.apache.hadoop.io.Writable
java.io.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 java.lang.String toString()
toString
in class java.lang.Object
public void setDisableCounter(boolean disableCounter)
public boolean disableCounter()
public void setCurrentIdx(int idx)
Copyright © 2007-2012 The Apache Software Foundation