org.apache.cassandra.hadoop
Class ColumnFamilySplit

java.lang.Object
  extended by org.apache.hadoop.mapreduce.InputSplit
      extended by org.apache.cassandra.hadoop.ColumnFamilySplit
All Implemented Interfaces:
org.apache.hadoop.io.Writable

public class ColumnFamilySplit
extends org.apache.hadoop.mapreduce.InputSplit
implements org.apache.hadoop.io.Writable


Constructor Summary
protected ColumnFamilySplit()
           
  ColumnFamilySplit(java.lang.String startToken, java.lang.String endToken, java.lang.String[] dataNodes)
           
 
Method Summary
 java.lang.String getEndToken()
           
 long getLength()
          Get the size of the split, so that the input splits can be sorted by size.
 java.lang.String[] getLocations()
          Get the list of nodes by name where the data for the split would be local.
 java.lang.String getStartToken()
           
static ColumnFamilySplit read(java.io.DataInput in)
           
 void readFields(java.io.DataInput in)
          Deserialize the fields of this object from in.
 java.lang.String toString()
           
 void write(java.io.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

ColumnFamilySplit

public ColumnFamilySplit(java.lang.String startToken,
                         java.lang.String endToken,
                         java.lang.String[] dataNodes)

ColumnFamilySplit

protected ColumnFamilySplit()
Method Detail

getStartToken

public java.lang.String getStartToken()

getEndToken

public java.lang.String getEndToken()

getLength

public long getLength()
Description copied from class: org.apache.hadoop.mapreduce.InputSplit
Get the size of the split, so that the input splits can be sorted by size.

Specified by:
getLength in class org.apache.hadoop.mapreduce.InputSplit
Returns:
the number of bytes in the split

getLocations

public java.lang.String[] getLocations()
Description copied from class: org.apache.hadoop.mapreduce.InputSplit
Get the list of nodes by name where the data for the split would be local. The locations do not need to be serialized.

Specified by:
getLocations in class org.apache.hadoop.mapreduce.InputSplit
Returns:
a new array of the node nodes.

write

public void write(java.io.DataOutput out)
           throws java.io.IOException
Description copied from interface: org.apache.hadoop.io.Writable
Serialize the fields of this object to out.

Specified by:
write in interface org.apache.hadoop.io.Writable
Parameters:
out - DataOuput to serialize this object into.
Throws:
java.io.IOException

readFields

public void readFields(java.io.DataInput in)
                throws java.io.IOException
Description copied from interface: org.apache.hadoop.io.Writable
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 org.apache.hadoop.io.Writable
Parameters:
in - DataInput to deseriablize this object from.
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

read

public static ColumnFamilySplit read(java.io.DataInput in)
                              throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2010 The Apache Software Foundation