@InterfaceAudience.Private public class LongEncoder extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
bytesPerDelta |
protected int |
bytesPerIndex |
protected long |
max |
protected long |
maxDelta |
protected long |
min |
protected long[] |
sortedUniqueValues |
protected int |
totalCompressedBytes |
protected HashSet<Long> |
uniqueValues
fields
|
Constructor and Description |
---|
LongEncoder()
construct
|
Modifier and Type | Method and Description |
---|---|
void |
add(long timestamp)
methods
|
LongEncoder |
compile() |
byte[] |
getByteArray() |
int |
getBytesPerDelta() |
int |
getBytesPerIndex() |
long |
getDelta(int index) |
int |
getIndex(long value) |
long |
getMin()
get/set
|
int |
getNumUniqueValues() |
int |
getOutputArrayLength() |
long[] |
getSortedUniqueTimestamps() |
int |
getTotalCompressedBytes() |
void |
reset() |
String |
toString()
Object methods
|
void |
writeBytes(OutputStream os) |
protected long[] sortedUniqueValues
protected long min
protected long max
protected long maxDelta
protected int bytesPerDelta
protected int bytesPerIndex
protected int totalCompressedBytes
public void reset()
public void add(long timestamp)
public LongEncoder compile()
public long getDelta(int index)
public int getIndex(long value)
public void writeBytes(OutputStream os) throws IOException
IOException
public byte[] getByteArray() throws IOException
IOException
public int getOutputArrayLength()
public int getNumUniqueValues()
public long getMin()
public int getBytesPerDelta()
public int getBytesPerIndex()
public int getTotalCompressedBytes()
public long[] getSortedUniqueTimestamps()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.