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 number of input bytes in the split.
 String[] getLocations()
          Get the list of hostnames where the input split is located.
 Text getStartRow()
           
 Text getTableName()
           
 void readFields(DataInput in)
          Reads the fields of this object from in.
 String toString()
           
 void write(DataOutput out)
          Writes 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()
Description copied from interface: InputSplit
Get the number of input bytes in the split.

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

getLocations

public String[] getLocations()
Description copied from interface: InputSplit
Get the list of hostnames where the input split is located.

Specified by:
getLocations in interface InputSplit
Returns:
A list of prefered hostnames

readFields

public void readFields(DataInput in)
                throws IOException
Description copied from interface: Writable
Reads 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
Throws:
IOException

write

public void write(DataOutput out)
           throws IOException
Description copied from interface: Writable
Writes the fields of this object to out.

Specified by:
write in interface Writable
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006 The Apache Software Foundation