com.bigdata.service
Class Split

java.lang.Object
  extended by com.bigdata.service.Split

public class Split
extends Object

Describes a "split" of keys for a batch operation that are spanned by the same index partition.

Version:
$Id: Split.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Field Summary
 int fromIndex
          Index of the first key in this split.
 int ntuples
          The #of keys in this split (toIndex - fromIndex).
 IPartitionMetadata pmd
          The index partition that spans the keys in this split.
 int toIndex
          Index of the first key NOT included in this split.
 
Constructor Summary
Split(IPartitionMetadata pmd)
          Create a representation of a split point without specifying the from/to tuple index.
Split(IPartitionMetadata pmd, int fromIndex, int toIndex)
          Create a representation of a split point.
 
Method Summary
 boolean equals(Split o)
           
 int hashCode()
          Hash code is based on the IPartitionMetadata hash code.
 String toString()
          Human friendly representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

pmd

public final IPartitionMetadata pmd
The index partition that spans the keys in this split.


fromIndex

public final int fromIndex
Index of the first key in this split.


toIndex

public final int toIndex
Index of the first key NOT included in this split.


ntuples

public final int ntuples
The #of keys in this split (toIndex - fromIndex).

Constructor Detail

Split

public Split(IPartitionMetadata pmd)
Create a representation of a split point without specifying the from/to tuple index.

Parameters:
pmd - The metadata for the index partition within which the keys in this split lie.

Split

public Split(IPartitionMetadata pmd,
             int fromIndex,
             int toIndex)
Create a representation of a split point.

Parameters:
pmd - The metadata for the index partition within which the keys in this split lie.
fromIndex - The index of the first key that will enter that index partition (inclusive lower bound).
toIndex - The index of the first key that will NOT enter that index partition (exclusive upper bound).
TODO:
The fromKey, toKey in the IPartitionMetadata fully specify the split so the fromIndex,toIndex here are really redundent. Perhaps the help when building an IndexSegment from the Split?
Method Detail

hashCode

public int hashCode()
Hash code is based on the IPartitionMetadata hash code.

Overrides:
hashCode in class Object

equals

public boolean equals(Split o)

toString

public String toString()
Human friendly representation.

Overrides:
toString in class Object


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.