Modifier and Type | Field and Description |
---|---|
protected byte[] |
colFamily |
protected byte[] |
colQualifier |
protected byte[] |
colVisibility |
protected boolean |
deleted |
protected byte[] |
row |
protected long |
timestamp |
Constructor and Description |
---|
Key()
Creates a key with empty row, empty column family, empty column qualifier, empty column visibility, timestamp
Long.MAX_VALUE , and delete marker
false. |
Key(byte[] row,
byte[] colFamily,
byte[] colQualifier,
byte[] colVisibility,
long timestamp) |
Key(byte[] row,
byte[] cf,
byte[] cq,
byte[] cv,
long ts,
boolean deleted) |
Key(byte[] row,
byte[] cf,
byte[] cq,
byte[] cv,
long ts,
boolean deleted,
boolean copy) |
Key(byte[] row,
int rOff,
int rLen,
byte[] cf,
int cfOff,
int cfLen,
byte[] cq,
int cqOff,
int cqLen,
byte[] cv,
int cvOff,
int cvLen,
long ts) |
Key(CharSequence row)
Converts CharSequence to Text and creates a Key using
Key(Text) . |
Key(CharSequence row,
CharSequence cf)
Converts CharSequence to Text and creates a Key using
Key(Text,Text) . |
Key(CharSequence row,
CharSequence cf,
CharSequence cq)
Converts CharSequence to Text and creates a Key using
Key(Text,Text,Text) . |
Key(CharSequence row,
CharSequence cf,
CharSequence cq,
CharSequence cv)
Converts CharSequence to Text and creates a Key using
Key(Text,Text,Text,Text) . |
Key(CharSequence row,
CharSequence cf,
CharSequence cq,
CharSequence cv,
long ts)
Converts CharSequence to Text and creates a Key using
Key(Text,Text,Text,Text,long) . |
Key(CharSequence row,
CharSequence cf,
CharSequence cq,
ColumnVisibility cv,
long ts)
Converts CharSequence to Text and creates a Key using
Key(Text,Text,Text,ColumnVisibility,long) . |
Key(CharSequence row,
CharSequence cf,
CharSequence cq,
long ts)
Converts CharSequence to Text and creates a Key using
Key(Text,Text,Text,long) . |
Key(Key other)
Creates a key with the same row, column family, column qualifier, column visibility, timestamp, and delete marker as the given key.
|
Key(org.apache.hadoop.io.Text row)
Creates a key with the specified row, empty column family, empty column qualifier, empty column visibility, timestamp
Long.MAX_VALUE , and delete
marker false. |
Key(org.apache.hadoop.io.Text row,
long ts)
Creates a key with the specified row, empty column family, empty column qualifier, empty column visibility, the specified timestamp, and delete marker
false.
|
Key(org.apache.hadoop.io.Text row,
org.apache.hadoop.io.Text cf)
Creates a key with the specified row, the specified column family, empty column qualifier, empty column visibility, timestamp
Long.MAX_VALUE , and
delete marker false. |
Key(org.apache.hadoop.io.Text row,
org.apache.hadoop.io.Text cf,
org.apache.hadoop.io.Text cq)
Creates a key with the specified row, the specified column family, the specified column qualifier, empty column visibility, timestamp
Long.MAX_VALUE , and delete marker false. |
Key(org.apache.hadoop.io.Text row,
org.apache.hadoop.io.Text cf,
org.apache.hadoop.io.Text cq,
ColumnVisibility cv,
long ts)
Creates a key with the specified row, the specified column family, the specified column qualifier, the specified column visibility, the specified
timestamp, and delete marker false.
|
Key(org.apache.hadoop.io.Text row,
org.apache.hadoop.io.Text cf,
org.apache.hadoop.io.Text cq,
long ts)
Creates a key with the specified row, the specified column family, the specified column qualifier, empty column visibility, the specified timestamp, and
delete marker false.
|
Key(org.apache.hadoop.io.Text row,
org.apache.hadoop.io.Text cf,
org.apache.hadoop.io.Text cq,
org.apache.hadoop.io.Text cv)
Creates a key with the specified row, the specified column family, the specified column qualifier, the specified column visibility, timestamp
Long.MAX_VALUE , and delete marker false. |
Key(org.apache.hadoop.io.Text row,
org.apache.hadoop.io.Text cf,
org.apache.hadoop.io.Text cq,
org.apache.hadoop.io.Text cv,
long ts)
Creates a key with the specified row, the specified column family, the specified column qualifier, the specified column visibility, the specified
timestamp, and delete marker false.
|
Key(org.apache.accumulo.core.data.thrift.TKey tkey) |
Modifier and Type | Method and Description |
---|---|
static StringBuilder |
appendPrintableString(byte[] ba,
int offset,
int len,
int maxLen,
StringBuilder sb) |
Object |
clone() |
int |
compareColumnFamily(org.apache.hadoop.io.Text cf)
Efficiently compare the the column family of a key w/o allocating a text object and copying the column qualifier into it.
|
int |
compareColumnQualifier(org.apache.hadoop.io.Text cq)
Efficiently compare the the column qualifier of a key w/o allocating a text object and copying the column qualifier into it.
|
int |
compareRow(org.apache.hadoop.io.Text r)
Efficiently compare the the row of a key w/o allocating a text object and copying the row into it.
|
int |
compareTo(Key other)
Compare all elements of a key.
|
int |
compareTo(Key other,
PartialKey part)
Compare elements of a key given by a
PartialKey . |
static List<org.apache.accumulo.core.data.thrift.TKeyValue> |
compress(List<? extends KeyValue> param)
Use this to compress a list of keys before sending them via thrift.
|
static void |
decompress(List<org.apache.accumulo.core.data.thrift.TKeyValue> param)
Use this to decompress a list of keys received from thrift.
|
boolean |
equals(Key other,
PartialKey part)
Compare part of a key.
|
boolean |
equals(Object o) |
Key |
followingKey(PartialKey part)
Returns a key that will sort immediately after this key.
|
org.apache.hadoop.io.Text |
getColumnFamily()
This method allocates a Text object and copies into it.
|
org.apache.hadoop.io.Text |
getColumnFamily(org.apache.hadoop.io.Text cf)
This method gives users control over allocation of Text objects by copying into the passed in text.
|
ByteSequence |
getColumnFamilyData()
This method returns a pointer to the keys internal data and does not copy it.
|
org.apache.hadoop.io.Text |
getColumnQualifier()
This method allocates a Text object and copies into it.
|
org.apache.hadoop.io.Text |
getColumnQualifier(org.apache.hadoop.io.Text cq)
This method gives users control over allocation of Text objects by copying into the passed in text.
|
ByteSequence |
getColumnQualifierData()
This method returns a pointer to the keys internal data and does not copy it.
|
org.apache.hadoop.io.Text |
getColumnVisibility()
This method allocates a Text object and copies into it.
|
org.apache.hadoop.io.Text |
getColumnVisibility(org.apache.hadoop.io.Text cv)
This method gives users control over allocation of Text objects by copying into the passed in text.
|
ByteSequence |
getColumnVisibilityData()
This method returns a pointer to the keys internal data and does not copy it.
|
ColumnVisibility |
getColumnVisibilityParsed()
This method creates a new ColumnVisibility representing the column visibility for this key
WARNING: using this method may inhibit performance since a new ColumnVisibility object is created on every call.
|
int |
getLength()
Returns the sums of the lengths of the row, column family, column qualifier, and visibility.
|
org.apache.hadoop.io.Text |
getRow()
This method allocates a Text object and copies into it.
|
org.apache.hadoop.io.Text |
getRow(org.apache.hadoop.io.Text r)
This method gives users control over allocation of Text objects by copying into the passed in text.
|
ByteSequence |
getRowData()
This method returns a pointer to the keys internal data and does not copy it.
|
int |
getSize()
Same as
getLength() . |
long |
getTimestamp() |
int |
hashCode() |
boolean |
isDeleted() |
void |
readFields(DataInput in) |
void |
set(Key k)
Sets this key's row, column family, column qualifier, column visibility, timestamp, and delete marker to be the same as another key's.
|
void |
setDeleted(boolean deleted) |
void |
setTimestamp(long ts) |
static String |
toPrintableString(byte[] ba,
int offset,
int len,
int maxLen) |
String |
toString() |
String |
toStringNoTime() |
org.apache.accumulo.core.data.thrift.TKey |
toThrift() |
void |
write(DataOutput out) |
protected byte[] row
protected byte[] colFamily
protected byte[] colQualifier
protected byte[] colVisibility
protected long timestamp
protected boolean deleted
public Key()
Long.MAX_VALUE
, and delete marker
false.public Key(org.apache.hadoop.io.Text row)
Long.MAX_VALUE
, and delete
marker false.public Key(org.apache.hadoop.io.Text row, long ts)
public Key(byte[] row, int rOff, int rLen, byte[] cf, int cfOff, int cfLen, byte[] cq, int cqOff, int cqLen, byte[] cv, int cvOff, int cvLen, long ts)
public Key(byte[] row, byte[] colFamily, byte[] colQualifier, byte[] colVisibility, long timestamp)
public Key(byte[] row, byte[] cf, byte[] cq, byte[] cv, long ts, boolean deleted)
public Key(byte[] row, byte[] cf, byte[] cq, byte[] cv, long ts, boolean deleted, boolean copy)
public Key(org.apache.hadoop.io.Text row, org.apache.hadoop.io.Text cf)
Long.MAX_VALUE
, and
delete marker false.public Key(org.apache.hadoop.io.Text row, org.apache.hadoop.io.Text cf, org.apache.hadoop.io.Text cq)
Long.MAX_VALUE
, and delete marker false.public Key(org.apache.hadoop.io.Text row, org.apache.hadoop.io.Text cf, org.apache.hadoop.io.Text cq, org.apache.hadoop.io.Text cv)
Long.MAX_VALUE
, and delete marker false.public Key(org.apache.hadoop.io.Text row, org.apache.hadoop.io.Text cf, org.apache.hadoop.io.Text cq, long ts)
public Key(org.apache.hadoop.io.Text row, org.apache.hadoop.io.Text cf, org.apache.hadoop.io.Text cq, org.apache.hadoop.io.Text cv, long ts)
public Key(org.apache.hadoop.io.Text row, org.apache.hadoop.io.Text cf, org.apache.hadoop.io.Text cq, ColumnVisibility cv, long ts)
public Key(CharSequence row)
Key(Text)
.public Key(CharSequence row, CharSequence cf)
Key(Text,Text)
.public Key(CharSequence row, CharSequence cf, CharSequence cq)
Key(Text,Text,Text)
.public Key(CharSequence row, CharSequence cf, CharSequence cq, CharSequence cv)
Key(Text,Text,Text,Text)
.public Key(CharSequence row, CharSequence cf, CharSequence cq, long ts)
Key(Text,Text,Text,long)
.public Key(CharSequence row, CharSequence cf, CharSequence cq, CharSequence cv, long ts)
Key(Text,Text,Text,Text,long)
.public Key(CharSequence row, CharSequence cf, CharSequence cq, ColumnVisibility cv, long ts)
Key(Text,Text,Text,ColumnVisibility,long)
.public Key(Key other)
public Key(org.apache.accumulo.core.data.thrift.TKey tkey)
public Key followingKey(PartialKey part)
part
- PartialKey except PartialKey.ROW_COLFAM_COLQUAL_COLVIS_TIME_DEL
public org.apache.hadoop.io.Text getRow(org.apache.hadoop.io.Text r)
r
- the key's row will be copied into this Textpublic ByteSequence getRowData()
public org.apache.hadoop.io.Text getRow()
public int compareRow(org.apache.hadoop.io.Text r)
r
- row to compare to keys rowgetRow()
.compareTo(r)public ByteSequence getColumnFamilyData()
public org.apache.hadoop.io.Text getColumnFamily(org.apache.hadoop.io.Text cf)
cf
- the key's column family will be copied into this Textpublic org.apache.hadoop.io.Text getColumnFamily()
public int compareColumnFamily(org.apache.hadoop.io.Text cf)
cf
- column family to compare to keys column familygetColumnFamily()
.compareTo(cf)public ByteSequence getColumnQualifierData()
public org.apache.hadoop.io.Text getColumnQualifier(org.apache.hadoop.io.Text cq)
cq
- the key's column qualifier will be copied into this Textpublic org.apache.hadoop.io.Text getColumnQualifier()
public int compareColumnQualifier(org.apache.hadoop.io.Text cq)
cq
- column family to compare to keys column qualifiergetColumnQualifier()
.compareTo(cq)public void setTimestamp(long ts)
public long getTimestamp()
public boolean isDeleted()
public void setDeleted(boolean deleted)
public ByteSequence getColumnVisibilityData()
public final org.apache.hadoop.io.Text getColumnVisibility()
public final org.apache.hadoop.io.Text getColumnVisibility(org.apache.hadoop.io.Text cv)
cv
- the key's column visibility will be copied into this Textpublic final ColumnVisibility getColumnVisibilityParsed()
public void set(Key k)
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public boolean equals(Key other, PartialKey part)
public int compareTo(Key other, PartialKey part)
PartialKey
. For example, for PartialKey.ROW_COLFAM
, compare just the row and column family. If the
rows are not equal, return the result of the row comparison; otherwise, return the result of the column family comparison.compareTo(Key)
public int compareTo(Key other)
compareTo
in interface Comparable<Key>
public static String toPrintableString(byte[] ba, int offset, int len, int maxLen)
public static StringBuilder appendPrintableString(byte[] ba, int offset, int len, int maxLen, StringBuilder sb)
public String toStringNoTime()
public int getLength()
public int getSize()
getLength()
.public static List<org.apache.accumulo.core.data.thrift.TKeyValue> compress(List<? extends KeyValue> param)
param
- a list of key/value pairspublic static void decompress(List<org.apache.accumulo.core.data.thrift.TKeyValue> param)
public org.apache.accumulo.core.data.thrift.TKey toThrift()
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Copyright © 2011-2016 The Apache Software Foundation. All Rights Reserved.