Class KeyExtent
- java.lang.Object
-
- org.apache.accumulo.core.dataImpl.KeyExtent
-
- All Implemented Interfaces:
Comparable<KeyExtent>,org.apache.hadoop.io.Writable,org.apache.hadoop.io.WritableComparable<KeyExtent>
public class KeyExtent extends Object implements org.apache.hadoop.io.WritableComparable<KeyExtent>
keeps track of information needed to identify a tablet
-
-
Constructor Summary
Constructors Constructor Description KeyExtent()Default constructorKeyExtent(TableId table, org.apache.hadoop.io.Text endRow, org.apache.hadoop.io.Text prevEndRow)KeyExtent(KeyExtent extent)KeyExtent(TKeyExtent tke)KeyExtent(org.apache.hadoop.io.Text flattenedExtent, Value prevEndRow)KeyExtent(org.apache.hadoop.io.Text flattenedExtent, org.apache.hadoop.io.Text prevEndRow)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(KeyExtent other)booleancontains(ByteSequence bsrow)booleancontains(org.apache.hadoop.io.BinaryComparable row)static org.apache.hadoop.io.TextdecodePrevEndRow(Value ibw)static ValueencodePrevEndRow(org.apache.hadoop.io.Text per)booleanequals(Object o)static SortedSet<KeyExtent>findChildren(KeyExtent ke, SortedSet<KeyExtent> tablets)static KeyExtentfindContainingExtent(KeyExtent extent, SortedSet<KeyExtent> extents)static Set<KeyExtent>findOverlapping(KeyExtent nke, SortedMap<KeyExtent,?> extents)static Set<KeyExtent>findOverlapping(KeyExtent nke, SortedSet<KeyExtent> extents)org.apache.hadoop.io.TextgetEndRow()Returns this extent's end roworg.apache.hadoop.io.TextgetMetadataEntry()Returns a String representing this extent's entry in the Metadata tablestatic org.apache.hadoop.io.TextgetMetadataEntry(KeyExtent extent)org.apache.hadoop.io.TextgetPrevEndRow()Return the previous extent's end rowMutationgetPrevRowUpdateMutation()Returns a String representing the previous extent's entry in the Metadata tablestatic MutationgetPrevRowUpdateMutation(KeyExtent ke)TableIdgetTableId()Returns the extent's table idUUIDgetUUID()inthashCode()booleanisMeta()booleanisPreviousExtent(KeyExtent prevExtent)booleanisRootTablet()booleanoverlaps(KeyExtent other)voidreadFields(DataInput in)voidsetEndRow(org.apache.hadoop.io.Text endRow)Sets this extent's end rowvoidsetPrevEndRow(org.apache.hadoop.io.Text prevEndRow)Sets the previous extent's end rowvoidsetTableId(TableId tId)Sets the extents table idstatic TableIdtableOfMetadataRow(org.apache.hadoop.io.Text row)RangetoDataRange()RangetoMetadataRange()StringtoString()TKeyExtenttoThrift()voidwrite(DataOutput out)
-
-
-
Constructor Detail
-
KeyExtent
public KeyExtent()
Default constructor
-
KeyExtent
public KeyExtent(TableId table, org.apache.hadoop.io.Text endRow, org.apache.hadoop.io.Text prevEndRow)
-
KeyExtent
public KeyExtent(KeyExtent extent)
-
KeyExtent
public KeyExtent(TKeyExtent tke)
-
KeyExtent
public KeyExtent(org.apache.hadoop.io.Text flattenedExtent, Value prevEndRow)
-
KeyExtent
public KeyExtent(org.apache.hadoop.io.Text flattenedExtent, org.apache.hadoop.io.Text prevEndRow)
-
-
Method Detail
-
getMetadataEntry
public org.apache.hadoop.io.Text getMetadataEntry()
Returns a String representing this extent's entry in the Metadata table
-
setTableId
public void setTableId(TableId tId)
Sets the extents table id
-
getTableId
public TableId getTableId()
Returns the extent's table id
-
setEndRow
public void setEndRow(org.apache.hadoop.io.Text endRow)
Sets this extent's end row
-
getEndRow
public org.apache.hadoop.io.Text getEndRow()
Returns this extent's end row
-
getPrevEndRow
public org.apache.hadoop.io.Text getPrevEndRow()
Return the previous extent's end row
-
setPrevEndRow
public void setPrevEndRow(org.apache.hadoop.io.Text prevEndRow)
Sets the previous extent's end row
-
readFields
public void readFields(DataInput in) throws IOException
- Specified by:
readFieldsin interfaceorg.apache.hadoop.io.Writable- Throws:
IOException
-
write
public void write(DataOutput out) throws IOException
- Specified by:
writein interfaceorg.apache.hadoop.io.Writable- Throws:
IOException
-
getPrevRowUpdateMutation
public Mutation getPrevRowUpdateMutation()
Returns a String representing the previous extent's entry in the Metadata table
-
decodePrevEndRow
public static org.apache.hadoop.io.Text decodePrevEndRow(Value ibw)
-
encodePrevEndRow
public static Value encodePrevEndRow(org.apache.hadoop.io.Text per)
-
compareTo
public int compareTo(KeyExtent other)
- Specified by:
compareToin interfaceComparable<KeyExtent>
-
getUUID
public UUID getUUID()
-
tableOfMetadataRow
public static TableId tableOfMetadataRow(org.apache.hadoop.io.Text row)
-
contains
public boolean contains(ByteSequence bsrow)
-
contains
public boolean contains(org.apache.hadoop.io.BinaryComparable row)
-
toDataRange
public Range toDataRange()
-
toMetadataRange
public Range toMetadataRange()
-
findChildren
public static SortedSet<KeyExtent> findChildren(KeyExtent ke, SortedSet<KeyExtent> tablets)
-
findContainingExtent
public static KeyExtent findContainingExtent(KeyExtent extent, SortedSet<KeyExtent> extents)
-
findOverlapping
public static Set<KeyExtent> findOverlapping(KeyExtent nke, SortedSet<KeyExtent> extents)
-
overlaps
public boolean overlaps(KeyExtent other)
-
findOverlapping
public static Set<KeyExtent> findOverlapping(KeyExtent nke, SortedMap<KeyExtent,?> extents)
-
getMetadataEntry
public static org.apache.hadoop.io.Text getMetadataEntry(KeyExtent extent)
-
toThrift
public TKeyExtent toThrift()
-
isPreviousExtent
public boolean isPreviousExtent(KeyExtent prevExtent)
-
isMeta
public boolean isMeta()
-
isRootTablet
public boolean isRootTablet()
-
-