org.apache.pig.backend.hadoop.executionengine.mapreduceExec
Class SliceWrapper

java.lang.Object
  extended by org.apache.pig.backend.hadoop.executionengine.mapreduceExec.SliceWrapper
All Implemented Interfaces:
org.apache.hadoop.io.Writable, org.apache.hadoop.mapred.InputSplit

public class SliceWrapper
extends Object
implements org.apache.hadoop.mapred.InputSplit

Wraps a Slice in an InputSplit so it's usable by hadoop.


Constructor Summary
SliceWrapper()
           
SliceWrapper(Slice slice, PigContext context, EvalSpec groupbySpec, EvalSpec evalSpec, int index, org.apache.hadoop.fs.FileSystem fs)
           
 
Method Summary
 EvalSpec getEvalSpec()
           
 EvalSpec getGroupbySpec()
           
 int getIndex()
           
 org.apache.hadoop.mapred.JobConf getJobConf()
           
 long getLength()
           
 String[] getLocations()
           
 org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.Text,Tuple> makeReader(org.apache.hadoop.mapred.JobConf job)
           
 void readFields(DataInput is)
           
 void write(DataOutput os)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SliceWrapper

public SliceWrapper()

SliceWrapper

public SliceWrapper(Slice slice,
                    PigContext context,
                    EvalSpec groupbySpec,
                    EvalSpec evalSpec,
                    int index,
                    org.apache.hadoop.fs.FileSystem fs)
Method Detail

getEvalSpec

public EvalSpec getEvalSpec()

getGroupbySpec

public EvalSpec getGroupbySpec()

getIndex

public int getIndex()

getLength

public long getLength()
               throws IOException
Specified by:
getLength in interface org.apache.hadoop.mapred.InputSplit
Throws:
IOException

getLocations

public String[] getLocations()
                      throws IOException
Specified by:
getLocations in interface org.apache.hadoop.mapred.InputSplit
Throws:
IOException

getJobConf

public org.apache.hadoop.mapred.JobConf getJobConf()

makeReader

public org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.Text,Tuple> makeReader(org.apache.hadoop.mapred.JobConf job)
                                                                                  throws IOException
Throws:
IOException

readFields

public void readFields(DataInput is)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException

write

public void write(DataOutput os)
           throws IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException


Copyright © ${year} The Apache Software Foundation