本文整理了Java中org.apache.hadoop.hbase.util.Bytes.readVLong()
方法的一些代码示例,展示了Bytes.readVLong()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bytes.readVLong()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.util.Bytes
类名称:Bytes
方法名:readVLong
[英]Reads a zero-compressed encoded long from input buffer and returns it.
[中]从输入缓冲区读取一个零压缩编码的long并返回它。
代码示例来源:origin: forcedotcom/phoenix
public static int vintFromBytes(byte[] buffer, int offset) {
try {
return (int)Bytes.readVLong(buffer, offset);
} catch (IOException e) { // Impossible
throw new RuntimeException(e);
}
}
代码示例来源:origin: apache/phoenix
public static int vintFromBytes(byte[] buffer, int offset) {
try {
return (int)Bytes.readVLong(buffer, offset);
} catch (IOException e) { // Impossible
throw new RuntimeException(e);
}
}
代码示例来源:origin: forcedotcom/phoenix
int resultSize = (int)Bytes.readVLong(hashCacheByteArray, offset);
offset += WritableUtils.decodeVIntSize(hashCacheByteArray[offset]);
ImmutableBytesWritable value = new ImmutableBytesWritable(hashCacheByteArray,offset,resultSize);
代码示例来源:origin: apache/phoenix
int resultSize = (int)Bytes.readVLong(hashCacheByteArray, offset);
offset += WritableUtils.decodeVIntSize(hashCacheByteArray[offset]);
ImmutableBytesWritable value = new ImmutableBytesWritable(hashCacheByteArray,offset,resultSize);
代码示例来源:origin: com.aliyun.phoenix/ali-phoenix-core
public static int vintFromBytes(byte[] buffer, int offset) {
try {
return (int)Bytes.readVLong(buffer, offset);
} catch (IOException e) { // Impossible
throw new RuntimeException(e);
}
}
代码示例来源:origin: org.apache.phoenix/phoenix-core
public static int vintFromBytes(byte[] buffer, int offset) {
try {
return (int)Bytes.readVLong(buffer, offset);
} catch (IOException e) { // Impossible
throw new RuntimeException(e);
}
}
代码示例来源:origin: co.cask.hbase/hbase
private final void readKeyValueLen() {
blockBuffer.mark();
currKeyLen = blockBuffer.getInt();
currValueLen = blockBuffer.getInt();
blockBuffer.reset();
if (this.reader.shouldIncludeMemstoreTS()) {
try {
int memstoreTSOffset = blockBuffer.arrayOffset()
+ blockBuffer.position() + KEY_VALUE_LEN_SIZE + currKeyLen
+ currValueLen;
currMemstoreTS = Bytes.readVLong(blockBuffer.array(),
memstoreTSOffset);
currMemstoreTSLen = WritableUtils.getVIntSize(currMemstoreTS);
} catch (Exception e) {
throw new RuntimeException("Error reading memstore timestamp", e);
}
}
if (currKeyLen < 0 || currValueLen < 0
|| currKeyLen > blockBuffer.limit()
|| currValueLen > blockBuffer.limit()) {
throw new IllegalStateException("Invalid currKeyLen " + currKeyLen
+ " or currValueLen " + currValueLen + ". Block offset: "
+ block.getOffset() + ", block length: " + blockBuffer.limit()
+ ", position: " + blockBuffer.position() + " (without header).");
}
}
代码示例来源:origin: co.cask.hbase/hbase
int memstoreTSOffset = blockBuffer.arrayOffset()
+ blockBuffer.position() + KEY_VALUE_LEN_SIZE + klen + vlen;
memstoreTS = Bytes.readVLong(blockBuffer.array(),
memstoreTSOffset);
memstoreTSLen = WritableUtils.getVIntSize(memstoreTS);
代码示例来源:origin: com.aliyun.phoenix/ali-phoenix-core
int resultSize = (int)Bytes.readVLong(hashCacheByteArray, offset);
offset += WritableUtils.decodeVIntSize(hashCacheByteArray[offset]);
ImmutableBytesWritable value = new ImmutableBytesWritable(hashCacheByteArray,offset,resultSize);
代码示例来源:origin: org.apache.phoenix/phoenix-core
int resultSize = (int)Bytes.readVLong(hashCacheByteArray, offset);
offset += WritableUtils.decodeVIntSize(hashCacheByteArray[offset]);
ImmutableBytesWritable value = new ImmutableBytesWritable(hashCacheByteArray,offset,resultSize);
内容来源于网络,如有侵权,请联系作者删除!