|
||||||||||
| 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.hadoop.hbase.mapreduce.TableSplit
@InterfaceAudience.Public @InterfaceStability.Evolving public class TableSplit
A table split corresponds to a key range (low, high) and an optional scanner. All references to row below refer to the key of the row.
| Field Summary | |
|---|---|
static org.apache.commons.logging.Log |
LOG
|
| Constructor Summary | |
|---|---|
TableSplit()
Default constructor. |
|
TableSplit(TableName tableName,
byte[] startRow,
byte[] endRow,
String location)
Creates a new instance without a scanner. |
|
TableSplit(TableName tableName,
Scan scan,
byte[] startRow,
byte[] endRow,
String location)
Creates a new instance while assigning all variables. |
|
| Method Summary | |
|---|---|
int |
compareTo(TableSplit split)
Compares this split against the given one. |
boolean |
equals(Object o)
|
byte[] |
getEndRow()
Returns the end row. |
long |
getLength()
Returns the length of the split. |
String[] |
getLocations()
Returns the region's location as an array. |
String |
getRegionLocation()
Returns the region location. |
Scan |
getScan()
Returns a Scan object from the stored string representation. |
byte[] |
getStartRow()
Returns the start row. |
TableName |
getTableName()
Returns the table name. |
int |
hashCode()
|
void |
readFields(DataInput in)
Reads the values of each field. |
String |
toString()
Returns the details about this instance as a string. |
void |
write(DataOutput out)
Writes the field values to the output. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.commons.logging.Log LOG
| Constructor Detail |
|---|
public TableSplit()
public TableSplit(TableName tableName,
Scan scan,
byte[] startRow,
byte[] endRow,
String location)
tableName - The name of the current table.scan - The scan associated with this split.startRow - The start row of the split.endRow - The end row of the split.location - The location of the region.
public TableSplit(TableName tableName,
byte[] startRow,
byte[] endRow,
String location)
tableName - The name of the current table.startRow - The start row of the split.endRow - The end row of the split.location - The location of the region.| Method Detail |
|---|
public Scan getScan()
throws IOException
IOExceptionpublic TableName getTableName()
public byte[] getStartRow()
public byte[] getEndRow()
public String getRegionLocation()
public String[] getLocations()
getLocations in class org.apache.hadoop.mapreduce.InputSplitInputSplit.getLocations()public long getLength()
getLength in class org.apache.hadoop.mapreduce.InputSplitInputSplit.getLength()
public void readFields(DataInput in)
throws IOException
readFields in interface org.apache.hadoop.io.Writablein - The input to read from.
IOException - When reading the input fails.
public void write(DataOutput out)
throws IOException
write in interface org.apache.hadoop.io.Writableout - The output to write to.
IOException - When writing the values to the output fails.public String toString()
toString in class ObjectObject.toString()public int compareTo(TableSplit split)
compareTo in interface Comparable<TableSplit>split - The split to compare to.
Comparable.compareTo(java.lang.Object)public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||