|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.backend.executionengine.PigSlice
public class PigSlice
Slice that loads data using a LoadFunc.
Constructor Summary | |
---|---|
PigSlice(String path,
String parser,
long start,
long length)
|
Method Summary | |
---|---|
void |
close()
Closes any streams this Slice has opened as part of its work. |
long |
getLength()
Returns the length in bytes of all of the data that will be processed by this Slice. |
String[] |
getLocations()
Returns string representations of all the files that will be used as part of processing this Slice. |
long |
getPos()
Returns the number of bytes read so far as part of processing this Slice. |
float |
getProgress()
Returns the percentage of Slice that is complete from 0.0 to 1.0. |
long |
getStart()
Returns the offset from which data in this Slice will be processed. |
void |
init(DataStorage base)
Initializes this Slice with the DataStorage it's to use to do its work. |
boolean |
next(Tuple value)
Loads the next value from this Slice into value . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PigSlice(String path, String parser, long start, long length)
Method Detail |
---|
public String[] getLocations()
Slice
This is the only method on Slice that is valid to call before
Slice.init(DataStorage)
has been called.
getLocations
in interface Slice
public long getStart()
Slice
getStart
in interface Slice
public long getLength()
Slice
Only valid to call after Slice.init(DataStorage)
has been called.
getLength
in interface Slice
public void init(DataStorage base) throws IOException
Slice
This will always be called before getLength
,
close
, getPos
, getProgress
and next
.
init
in interface Slice
IOException
public boolean next(Tuple value) throws IOException
Slice
value
.
Only valid to call after Slice.init(DataStorage)
has been called.
next
in interface Slice
value
- -
the Tuple to be filled with the next value.
IOException
public long getPos() throws IOException
Slice
Only valid to call after Slice.init(DataStorage)
has been called.
getPos
in interface Slice
IOException
public void close() throws IOException
Slice
Only valid to call after Slice.init(DataStorage)
has been called.
close
in interface Slice
IOException
public float getProgress() throws IOException
Slice
Only valid to call after Slice.init(DataStorage)
has been called.
getProgress
in interface Slice
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |