• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java PrefixTreeArraySearcher类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中org.apache.hadoop.hbase.codec.prefixtree.decode.PrefixTreeArraySearcher的典型用法代码示例。如果您正苦于以下问题:Java PrefixTreeArraySearcher类的具体用法?Java PrefixTreeArraySearcher怎么用?Java PrefixTreeArraySearcher使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

PrefixTreeArraySearcher类属于org.apache.hadoop.hbase.codec.prefixtree.decode包,在下文中一共展示了PrefixTreeArraySearcher类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: compile

点赞 3

import org.apache.hadoop.hbase.codec.prefixtree.decode.PrefixTreeArraySearcher; //导入依赖的package包/类
@Before
public void compile() throws IOException {
  // Always run with tags. But should also ensure that KVs without tags work fine
  os = new ByteArrayOutputStream(1 << 20);
  encoder = new PrefixTreeEncoder(os, includeMemstoreTS);

  inputKvs = rows.getInputs();
  for (KeyValue kv : inputKvs) {
    encoder.write(kv);
  }
  encoder.flush();
  totalBytes = encoder.getTotalBytes();
  blockMetaWriter = encoder.getBlockMeta();
  outputBytes = os.toByteArray();

  // start reading, but save the assertions for @Test methods
  buffer = ByteBuffer.wrap(outputBytes);
  blockMetaReader = new PrefixTreeBlockMeta(buffer);

  searcher = new PrefixTreeArraySearcher(blockMetaReader, blockMetaReader.getRowTreeDepth(),
      blockMetaReader.getMaxRowLength(), blockMetaReader.getMaxQualifierLength(),
      blockMetaReader.getMaxTagsLength());
  searcher.initOnBlock(blockMetaReader, outputBytes, includeMemstoreTS);
}
 

开发者ID:fengchen8086,
项目名称:ditb,
代码行数:25,
代码来源:TestRowEncoder.java

示例2: compile

点赞 3

import org.apache.hadoop.hbase.codec.prefixtree.decode.PrefixTreeArraySearcher; //导入依赖的package包/类
@Before
public void compile() throws IOException {
  os = new ByteArrayOutputStream(1 << 20);
  encoder = new PrefixTreeEncoder(os, includeMemstoreTS);

  inputKvs = rows.getInputs();
  for (KeyValue kv : inputKvs) {
    encoder.write(kv);
  }
  encoder.flush();
  totalBytes = encoder.getTotalBytes();
  blockMetaWriter = encoder.getBlockMeta();
  outputBytes = os.toByteArray();

  // start reading, but save the assertions for @Test methods
  buffer = ByteBuffer.wrap(outputBytes);
  blockMetaReader = new PrefixTreeBlockMeta(buffer);

  searcher = new PrefixTreeArraySearcher(blockMetaReader, blockMetaReader.getRowTreeDepth(),
      blockMetaReader.getMaxRowLength(), blockMetaReader.getMaxQualifierLength());
  searcher.initOnBlock(blockMetaReader, outputBytes, includeMemstoreTS);
}
 

开发者ID:cloud-software-foundation,
项目名称:c5,
代码行数:23,
代码来源:TestRowEncoder.java

示例3: getFirstKeyInBlock

点赞 2

import org.apache.hadoop.hbase.codec.prefixtree.decode.PrefixTreeArraySearcher; //导入依赖的package包/类
@Override
public ByteBuffer getFirstKeyInBlock(ByteBuffer block) {
  block.rewind();
  PrefixTreeArraySearcher searcher = null;
  try {
    // should i includeMemstoreTS (second argument)?  i think PrefixKeyDeltaEncoder is, so i will
    searcher = DecoderFactory.checkOut(block, true);
    if (!searcher.positionAtFirstCell()) {
      return null;
    }
    return KeyValueUtil.copyKeyToNewByteBuffer(searcher.current());
  } finally {
    DecoderFactory.checkIn(searcher);
  }
}
 

开发者ID:fengchen8086,
项目名称:ditb,
代码行数:16,
代码来源:PrefixTreeCodec.java

示例4: getFirstKeyInBlock

点赞 2

import org.apache.hadoop.hbase.codec.prefixtree.decode.PrefixTreeArraySearcher; //导入依赖的package包/类
@Override
public ByteBuffer getFirstKeyInBlock(ByteBuffer block) {
  block.rewind();
  PrefixTreeArraySearcher searcher = null;
  try {
    //should i includeMemstoreTS (second argument)?  i think PrefixKeyDeltaEncoder is, so i will
    searcher = DecoderFactory.checkOut(block, true);
    if (!searcher.positionAtFirstCell()) {
      return null;
    }
    return KeyValueUtil.copyKeyToNewByteBuffer(searcher.current());
  } finally {
    DecoderFactory.checkIn(searcher);
  }
}
 

开发者ID:cloud-software-foundation,
项目名称:c5,
代码行数:16,
代码来源:PrefixTreeCodec.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)