@InterfaceAudience.Public @InterfaceStability.Evolving public class TableSplit extends InputSplit implements Comparable<TableSplit>
Modifier and Type | Field and Description |
---|---|
static Log |
LOG |
Constructor and Description |
---|
TableSplit()
Default constructor.
|
TableSplit(byte[] tableName,
byte[] startRow,
byte[] endRow,
String location)
Deprecated.
As of release 0.96
(HBASE-9508).
This will be removed in HBase 2.0.0.
Use
TableSplit(TableName, byte[], byte[], String) . |
TableSplit(byte[] tableName,
Scan scan,
byte[] startRow,
byte[] endRow,
String location)
Deprecated.
As of release 0.96
(HBASE-9508).
This will be removed in HBase 2.0.0.
Use
TableSplit(TableName, byte[], byte[], String) . |
TableSplit(TableName tableName,
byte[] startRow,
byte[] endRow,
String location)
Creates a new instance without a scanner.
|
TableSplit(TableName tableName,
byte[] startRow,
byte[] endRow,
String location,
long length)
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.
|
TableSplit(TableName tableName,
Scan scan,
byte[] startRow,
byte[] endRow,
String location,
long length)
Creates a new instance while assigning all variables.
|
Modifier and Type | Method and Description |
---|---|
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 |
getTable()
Returns the table name.
|
byte[] |
getTableName()
Returns the table name converted to a byte array.
|
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.
|
public TableSplit()
@Deprecated public TableSplit(byte[] tableName, Scan scan, byte[] startRow, byte[] endRow, String location)
TableSplit(TableName, byte[], byte[], String)
.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, Scan scan, byte[] startRow, byte[] endRow, String location, long length)
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.@Deprecated public TableSplit(byte[] tableName, byte[] startRow, byte[] endRow, String location)
TableSplit(TableName, byte[], byte[], String)
.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.public TableSplit(TableName tableName, byte[] startRow, byte[] endRow, String location, long length)
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.length
- Size of region in bytespublic Scan getScan() throws IOException
IOException
public byte[] getTableName()
getTable()
public TableName getTable()
public byte[] getStartRow()
public byte[] getEndRow()
public String getRegionLocation()
public String[] getLocations()
org.apache.hadoop.mapreduce.InputSplit#getLocations()
public long getLength()
org.apache.hadoop.mapreduce.InputSplit#getLength()
public void readFields(DataInput in) throws IOException
in
- The input to read from.IOException
- When reading the input fails.public void write(DataOutput out) throws IOException
out
- The output to write to.IOException
- When writing the values to the output fails.public String toString()
Object.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)
public int hashCode()