Modifier and Type | Field and Description |
---|---|
(package private) static byte[] |
AVG_KEY_LEN |
(package private) static byte[] |
AVG_VALUE_LEN |
(package private) static byte[] |
COMPARATOR |
(package private) static byte[] |
CREATE_TIME_TS |
(package private) static byte[] |
LASTKEY |
private SortedMap<byte[],byte[]> |
map |
static byte[] |
MAX_TAGS_LEN |
(package private) static String |
RESERVED_PREFIX |
(package private) static byte[] |
RESERVED_PREFIX_BYTES |
(package private) static byte[] |
TAGS_COMPRESSED |
Constructor and Description |
---|
FileInfo() |
Modifier and Type | Method and Description |
---|---|
HFile.FileInfo |
append(byte[] k,
byte[] v,
boolean checkPrefix)
Append the given key/value pair to the file info, optionally checking the
key prefix.
|
void |
clear() |
Comparator<? super byte[]> |
comparator() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<byte[],byte[]>> |
entrySet() |
boolean |
equals(Object o) |
byte[] |
firstKey() |
byte[] |
get(Object key) |
int |
hashCode() |
SortedMap<byte[],byte[]> |
headMap(byte[] toKey) |
boolean |
isEmpty() |
Set<byte[]> |
keySet() |
byte[] |
lastKey() |
(package private) void |
parsePB(org.apache.hadoop.hbase.shaded.protobuf.generated.HFileProtos.FileInfoProto fip)
Fill our map with content of the pb we read off disk
|
(package private) void |
parseWritable(DataInputStream in)
Now parse the old Writable format.
|
byte[] |
put(byte[] key,
byte[] value) |
void |
putAll(Map<? extends byte[],? extends byte[]> m) |
(package private) void |
read(DataInputStream in)
Populate this instance with what we find on the passed in
in stream. |
byte[] |
remove(Object key) |
int |
size() |
SortedMap<byte[],byte[]> |
subMap(byte[] fromKey,
byte[] toKey) |
SortedMap<byte[],byte[]> |
tailMap(byte[] fromKey) |
Collection<byte[]> |
values() |
(package private) void |
write(DataOutputStream out)
Write out this instance on the passed in
out stream. |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
static final String RESERVED_PREFIX
static final byte[] RESERVED_PREFIX_BYTES
static final byte[] LASTKEY
static final byte[] AVG_KEY_LEN
static final byte[] AVG_VALUE_LEN
static final byte[] CREATE_TIME_TS
static final byte[] COMPARATOR
static final byte[] TAGS_COMPRESSED
public static final byte[] MAX_TAGS_LEN
public FileInfo()
public HFile.FileInfo append(byte[] k, byte[] v, boolean checkPrefix) throws IOException
k
- key to addv
- value to addcheckPrefix
- whether to check that the provided key does not start
with the reserved prefixIOException
- if the key or value is invalidpublic Comparator<? super byte[]> comparator()
comparator
in interface SortedMap<byte[],byte[]>
public boolean containsKey(Object key)
containsKey
in interface Map<byte[],byte[]>
public boolean containsValue(Object value)
containsValue
in interface Map<byte[],byte[]>
public int hashCode()
public Collection<byte[]> values()
void write(DataOutputStream out) throws IOException
out
stream.
We write it as a protobuf.out
- IOException
read(DataInputStream)
void read(DataInputStream in) throws IOException
in
stream.
Can deserialize protobuf of old Writables format.in
- IOException
write(DataOutputStream)
void parseWritable(DataInputStream in) throws IOException
IOException
void parsePB(org.apache.hadoop.hbase.shaded.protobuf.generated.HFileProtos.FileInfoProto fip)
fip
- protobuf message to readCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.