@InterfaceAudience.Public 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 String |
encodedRegionName |
private byte[] |
endRow |
private long |
length |
static org.slf4j.Logger |
LOG
Deprecated.
LOG variable would be made private. fix in hbase 3.0
|
private String |
regionLocation |
private String |
scan |
private byte[] |
startRow |
private TableName |
tableName |
private static TableSplit.Version |
VERSION |
Constructor and Description |
---|
TableSplit()
Default constructor.
|
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.slf4j.Logger LOG
private static final TableSplit.Version VERSION
private byte[] startRow
private byte[] endRow
private String regionLocation
private String encodedRegionName
private long length
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, 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.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 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–2020 The Apache Software Foundation. All rights reserved.