org.apache.hadoop.hbase.mapred
Class TableSplit

java.lang.Object
  extended by org.apache.hadoop.hbase.mapred.TableSplit
All Implemented Interfaces:
Writable, InputSplit

public class TableSplit
extends Object
implements InputSplit

A table split corresponds to a key range [low, high)


Constructor Summary
TableSplit()
          default constructor
TableSplit(Text tableName, Text startRow, Text endRow)
          Constructor
 
Method Summary
 Text getEndRow()
           
 long getLength()
          Get the total number of bytes in the data of the InputSplit.
 String[] getLocations()
          Get the list of hostnames where the input split is located.
 Text getStartRow()
           
 Text getTableName()
           
 void readFields(DataInput in)
          Deserialize the fields of this object from in.
 String toString()
          
 void write(DataOutput out)
          Serialize the fields of this object to out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TableSplit

public TableSplit()
default constructor


TableSplit

public TableSplit(Text tableName,
                  Text startRow,
                  Text endRow)
Constructor

Parameters:
tableName -
startRow -
endRow -
Method Detail

getTableName

public Text getTableName()
Returns:
table name

getStartRow

public Text getStartRow()
Returns:
starting row key

getEndRow

public Text getEndRow()
Returns:
end row key

getLength

public long getLength()
Get the total number of bytes in the data of the InputSplit.

Specified by:
getLength in interface InputSplit
Returns:
the number of bytes in the input split.

getLocations

public String[] getLocations()
Get the list of hostnames where the input split is located.

Specified by:
getLocations in interface InputSplit
Returns:
list of hostnames where data of the InputSplit is located as an array of Strings.

readFields

public void readFields(DataInput in)
                throws IOException
Deserialize the fields of this object from in.

For efficiency, implementations should attempt to re-use storage in the existing object where possible.

Specified by:
readFields in interface Writable
Parameters:
in - DataInput to deseriablize this object from.
Throws:
IOException

write

public void write(DataOutput out)
           throws IOException
Serialize the fields of this object to out.

Specified by:
write in interface Writable
Parameters:
out - DataOuput to serialize this object into.
Throws:
IOException

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2006 The Apache Software Foundation