本文整理了Java中org.apache.kylin.common.util.Dictionary.getValueBytesFromId()
方法的一些代码示例,展示了Dictionary.getValueBytesFromId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Dictionary.getValueBytesFromId()
方法的具体详情如下:
包路径:org.apache.kylin.common.util.Dictionary
类名称:Dictionary
方法名:getValueBytesFromId
[英]A lower level API, get byte values from ID, return the number of bytes written. Bypassing the cache layer, this could be significantly slower than getIdFromValue(T value).
[中]较低级别的API,从ID获取字节值,返回写入的字节数。绕过缓存层,这可能比getIdFromValue(T值)慢得多。
代码示例来源:origin: org.apache.kylin/kylin-dictionary
@Override
public boolean moveNext() throws IOException {
if (curDictIndex < dictionaryList.size() && curKey <= curDict.getMaxId()) {
byte[] buffer = new byte[curDict.getSizeOfValue()];
int size = curDict.getValueBytesFromId(curKey, buffer, 0);
curValue = Bytes.copy(buffer, 0, size);
if (++curKey > curDict.getMaxId()) {
if (++curDictIndex < dictionaryList.size()) {
curDict = dictionaryList.get(curDictIndex);
curKey = curDict.getMinId();
}
}
return true;
}
curValue = null;
return false;
}
代码示例来源:origin: org.apache.kylin/kylin-job
int idInMergedDict;
int size = sourceDict.getValueBytesFromId(idInSourceDict, newKeyBuf, bufOffset);
if (size < 0) {
idInMergedDict = mergedDict.nullId();
内容来源于网络,如有侵权,请联系作者删除!