Class LogFileKey
- java.lang.Object
-
- org.apache.accumulo.tserver.logger.LogFileKey
-
- All Implemented Interfaces:
Comparable<LogFileKey>
,org.apache.hadoop.io.Writable
,org.apache.hadoop.io.WritableComparable<LogFileKey>
public class LogFileKey extends Object implements org.apache.hadoop.io.WritableComparable<LogFileKey>
-
-
Constructor Summary
Constructors Constructor Description LogFileKey()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(LogFileKey o)
boolean
equals(Object obj)
static LogFileKey
fromKey(Key key)
Create LogFileKey from row.int
hashCode()
void
readFields(DataInput in)
Key
toKey()
Converts LogFileKey to Key.static Range
toRange(LogFileKey start, LogFileKey end)
String
toString()
void
write(DataOutput out)
-
-
-
Field Detail
-
event
public LogEvents event
-
filename
public String filename
-
tablet
public KeyExtent tablet
-
seq
public long seq
-
tabletId
public int tabletId
-
VERSION
public static final int VERSION
- See Also:
- Constant Field Values
-
tserverSession
public String tserverSession
-
-
Method Detail
-
readFields
public void readFields(DataInput in) throws IOException
- Specified by:
readFields
in interfaceorg.apache.hadoop.io.Writable
- Throws:
IOException
-
write
public void write(DataOutput out) throws IOException
- Specified by:
write
in interfaceorg.apache.hadoop.io.Writable
- Throws:
IOException
-
compareTo
public int compareTo(LogFileKey o)
- Specified by:
compareTo
in interfaceComparable<LogFileKey>
-
toKey
public Key toKey() throws IOException
Converts LogFileKey to Key. Creates a Key containing all of the LogFileKey fields. The fields are stored so the Key sorts maintaining the legacy sort order. The row of the Key is composed of 3 fields: EventNum + tabletID + seq. The EventNum is the byte returned by eventType(). The column family is always the event. The column qualifier is dependent of the type of event and could be empty.Key Schema: Row = EventNum + tabletID + seq Family = event Qualifier = tserverSession OR filename OR KeyExtent
- Throws:
IOException
-
toRange
public static Range toRange(LogFileKey start, LogFileKey end)
-
fromKey
public static LogFileKey fromKey(Key key)
Create LogFileKey from row. Follows schema defined bytoKey()
-
-