|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.backend.hadoop.hbase.HBaseSlice
public class HBaseSlice
HBase Slice to load a portion of range of a table. The key range will be [start, end) Modeled from org.apache.hadoop.hbase.mapred.TableSplit.
Constructor Summary | |
---|---|
HBaseSlice(byte[] tableName,
byte[] startRow,
byte[] endRow,
byte[][] inputColumns,
String location)
Constructor |
Method Summary | |
---|---|
void |
close()
Closes any streams this Slice has opened as part of its work. |
byte[] |
getEndRow()
|
byte[][] |
getInputColumns()
|
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. |
String |
getRegionLocation()
|
long |
getStart()
Returns the offset from which data in this Slice will be processed. |
byte[] |
getStartRow()
|
byte[] |
getTableName()
|
void |
init(DataStorage store)
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 . |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HBaseSlice(byte[] tableName, byte[] startRow, byte[] endRow, byte[][] inputColumns, String location)
tableName
- table namestartRow
- start now, inclusiveendRow
- end row, exclusiveinputColumns
- input columnslocation
- region locationMethod Detail |
---|
public byte[] getTableName()
public byte[] getStartRow()
public byte[] getEndRow()
public byte[][] getInputColumns()
public String getRegionLocation()
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 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 getPos() throws IOException
Slice
Only valid to call after Slice.init(DataStorage)
has been called.
getPos
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
public void init(DataStorage store) 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 void close() throws IOException
Slice
Only valid to call after Slice.init(DataStorage)
has been called.
close
in interface Slice
IOException
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |