@InterfaceAudience.Public @InterfaceStability.Evolving public class TableSplit extends org.apache.hadoop.mapreduce.InputSplit implements org.apache.hadoop.io.Writable, Comparable<TableSplit>
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
LOG
Deprecated.
LOG variable would be made private.
|
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.
|
TableSplit(TableName tableName,
Scan scan,
byte[] startRow,
byte[] endRow,
String location,
String encodedRegionName,
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) |
String |
getEncodedRegionName()
Returns the region's encoded name.
|
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.
|
@Deprecated public static final org.apache.commons.logging.Log LOG
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.public TableSplit(TableName tableName, Scan scan, byte[] startRow, byte[] endRow, String location, String encodedRegionName, 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.encodedRegionName
- The region ID.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()
getLocations
in class org.apache.hadoop.mapreduce.InputSplit
InputSplit.getLocations()
public String getEncodedRegionName()
public long getLength()
getLength
in class org.apache.hadoop.mapreduce.InputSplit
InputSplit.getLength()
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
in
- 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.Writable
out
- The output to write to.IOException
- When writing the values to the output fails.public String toString()
toString
in class Object
Object.toString()
public int compareTo(TableSplit split)
compareTo
in interface Comparable<TableSplit>
split
- The split to compare to.Comparable.compareTo(java.lang.Object)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.