@InterfaceAudience.Public @InterfaceStability.Evolving public class TableSplit extends org.apache.hadoop.mapreduce.InputSplit implements org.apache.hadoop.io.Writable, Comparable<TableSplit>
Modifier and Type | Class and Description |
---|---|
(package private) static class |
TableSplit.Version |
Modifier and Type | Field and Description |
---|---|
private byte[] |
endRow |
private long |
length |
static org.apache.commons.logging.Log |
LOG
Deprecated.
LOG variable would be made private.
|
private String |
regionLocation |
private String |
scan |
private byte[] |
startRow |
private TableName |
tableName |
private static TableSplit.Version |
VERSION |
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.
|
@Deprecated public static final org.apache.commons.logging.Log LOG
private static final TableSplit.Version VERSION
private TableName tableName
private byte[] startRow
private byte[] endRow
private String regionLocation
private String scan
private long length
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()
getLocations
in class org.apache.hadoop.mapreduce.InputSplit
InputSplit.getLocations()
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.