Java 类org.apache.hadoop.hbase.codec.prefixtree.decode.timestamp.TimestampDecoder 实例源码

项目:ditb    文件:PrefixTreeArrayScanner.java   
/*********************** construct ******************************/

  // pass in blockMeta so we can initialize buffers big enough for all cells in the block
  public PrefixTreeArrayScanner(PrefixTreeBlockMeta blockMeta, int rowTreeDepth,
      int rowBufferLength, int qualifierBufferLength, int tagsBufferLength) {
    this.rowNodes = new RowNodeReader[rowTreeDepth];
    for (int i = 0; i < rowNodes.length; ++i) {
      rowNodes[i] = new RowNodeReader();
    }
    this.rowBuffer = new byte[rowBufferLength];
    this.familyBuffer = new byte[PrefixTreeBlockMeta.MAX_FAMILY_LENGTH];
    this.familyReader = new ColumnReader(familyBuffer, ColumnNodeType.FAMILY);
    this.qualifierBuffer = new byte[qualifierBufferLength];
    this.tagsBuffer = new byte[tagsBufferLength];
    this.qualifierReader = new ColumnReader(qualifierBuffer, ColumnNodeType.QUALIFIER);
    this.tagsReader = new ColumnReader(tagsBuffer, ColumnNodeType.TAGS);
    this.timestampDecoder = new TimestampDecoder();
    this.mvccVersionDecoder = new MvccVersionDecoder();
  }
项目:ditb    文件:TestTimestampEncoder.java   
public TestTimestampEncoder(TestTimestampData testTimestamps) throws IOException {
  this.timestamps = testTimestamps;
  this.blockMeta = new PrefixTreeBlockMeta();
  this.blockMeta.setNumMetaBytes(0);
  this.blockMeta.setNumRowBytes(0);
  this.blockMeta.setNumQualifierBytes(0);
  this.encoder = new LongEncoder();
  for (Long ts : testTimestamps.getInputs()) {
    encoder.add(ts);
  }
  encoder.compile();
  blockMeta.setTimestampFields(encoder);
  bytes = encoder.getByteArray();
  decoder = new TimestampDecoder();
  decoder.initOnBlock(blockMeta, bytes);
}
项目:pbase    文件:PrefixTreeArrayScanner.java   
/*********************** construct ******************************/

  // pass in blockMeta so we can initialize buffers big enough for all cells in the block
  public PrefixTreeArrayScanner(PrefixTreeBlockMeta blockMeta, int rowTreeDepth,
      int rowBufferLength, int qualifierBufferLength, int tagsBufferLength) {
    this.rowNodes = new RowNodeReader[rowTreeDepth];
    for (int i = 0; i < rowNodes.length; ++i) {
      rowNodes[i] = new RowNodeReader();
    }
    this.rowBuffer = new byte[rowBufferLength];
    this.familyBuffer = new byte[PrefixTreeBlockMeta.MAX_FAMILY_LENGTH];
    this.familyReader = new ColumnReader(familyBuffer, ColumnNodeType.FAMILY);
    this.qualifierBuffer = new byte[qualifierBufferLength];
    this.tagsBuffer = new byte[tagsBufferLength];
    this.qualifierReader = new ColumnReader(qualifierBuffer, ColumnNodeType.QUALIFIER);
    this.tagsReader = new ColumnReader(tagsBuffer, ColumnNodeType.TAGS);
    this.timestampDecoder = new TimestampDecoder();
    this.mvccVersionDecoder = new MvccVersionDecoder();
  }
项目:pbase    文件:TestTimestampEncoder.java   
public TestTimestampEncoder(TestTimestampData testTimestamps) throws IOException {
  this.timestamps = testTimestamps;
  this.blockMeta = new PrefixTreeBlockMeta();
  this.blockMeta.setNumMetaBytes(0);
  this.blockMeta.setNumRowBytes(0);
  this.blockMeta.setNumQualifierBytes(0);
  this.encoder = new LongEncoder();
  for (Long ts : testTimestamps.getInputs()) {
    encoder.add(ts);
  }
  encoder.compile();
  blockMeta.setTimestampFields(encoder);
  bytes = encoder.getByteArray();
  decoder = new TimestampDecoder();
  decoder.initOnBlock(blockMeta, bytes);
}
项目:HIndex    文件:PrefixTreeArrayScanner.java   
/*********************** construct ******************************/

  // pass in blockMeta so we can initialize buffers big enough for all cells in the block
  public PrefixTreeArrayScanner(PrefixTreeBlockMeta blockMeta, int rowTreeDepth,
      int rowBufferLength, int qualifierBufferLength, int tagsBufferLength) {
    this.rowNodes = new RowNodeReader[rowTreeDepth];
    for (int i = 0; i < rowNodes.length; ++i) {
      rowNodes[i] = new RowNodeReader();
    }
    this.rowBuffer = new byte[rowBufferLength];
    this.familyBuffer = new byte[PrefixTreeBlockMeta.MAX_FAMILY_LENGTH];
    this.familyReader = new ColumnReader(familyBuffer, ColumnNodeType.FAMILY);
    this.qualifierBuffer = new byte[qualifierBufferLength];
    this.tagsBuffer = new byte[tagsBufferLength];
    this.qualifierReader = new ColumnReader(qualifierBuffer, ColumnNodeType.QUALIFIER);
    this.tagsReader = new ColumnReader(tagsBuffer, ColumnNodeType.TAGS);
    this.timestampDecoder = new TimestampDecoder();
    this.mvccVersionDecoder = new MvccVersionDecoder();
  }
项目:HIndex    文件:TestTimestampEncoder.java   
public TestTimestampEncoder(TestTimestampData testTimestamps) throws IOException {
  this.timestamps = testTimestamps;
  this.blockMeta = new PrefixTreeBlockMeta();
  this.blockMeta.setNumMetaBytes(0);
  this.blockMeta.setNumRowBytes(0);
  this.blockMeta.setNumQualifierBytes(0);
  this.encoder = new LongEncoder();
  for (Long ts : testTimestamps.getInputs()) {
    encoder.add(ts);
  }
  encoder.compile();
  blockMeta.setTimestampFields(encoder);
  bytes = encoder.getByteArray();
  decoder = new TimestampDecoder();
  decoder.initOnBlock(blockMeta, bytes);
}
项目:PyroDB    文件:PrefixTreeArrayScanner.java   
/*********************** construct ******************************/

  // pass in blockMeta so we can initialize buffers big enough for all cells in the block
  public PrefixTreeArrayScanner(PrefixTreeBlockMeta blockMeta, int rowTreeDepth,
      int rowBufferLength, int qualifierBufferLength, int tagsBufferLength) {
    this.rowNodes = new RowNodeReader[rowTreeDepth];
    for (int i = 0; i < rowNodes.length; ++i) {
      rowNodes[i] = new RowNodeReader();
    }
    this.rowBuffer = new byte[rowBufferLength];
    this.familyBuffer = new byte[PrefixTreeBlockMeta.MAX_FAMILY_LENGTH];
    this.familyReader = new ColumnReader(familyBuffer, ColumnNodeType.FAMILY);
    this.qualifierBuffer = new byte[qualifierBufferLength];
    this.tagsBuffer = new byte[tagsBufferLength];
    this.qualifierReader = new ColumnReader(qualifierBuffer, ColumnNodeType.QUALIFIER);
    this.tagsReader = new ColumnReader(tagsBuffer, ColumnNodeType.TAGS);
    this.timestampDecoder = new TimestampDecoder();
    this.mvccVersionDecoder = new MvccVersionDecoder();
  }
项目:PyroDB    文件:TestTimestampEncoder.java   
public TestTimestampEncoder(TestTimestampData testTimestamps) throws IOException {
  this.timestamps = testTimestamps;
  this.blockMeta = new PrefixTreeBlockMeta();
  this.blockMeta.setNumMetaBytes(0);
  this.blockMeta.setNumRowBytes(0);
  this.blockMeta.setNumQualifierBytes(0);
  this.encoder = new LongEncoder();
  for (Long ts : testTimestamps.getInputs()) {
    encoder.add(ts);
  }
  encoder.compile();
  blockMeta.setTimestampFields(encoder);
  bytes = encoder.getByteArray();
  decoder = new TimestampDecoder();
  decoder.initOnBlock(blockMeta, bytes);
}
项目:c5    文件:PrefixTreeArrayScanner.java   
/*********************** construct ******************************/

  // pass in blockMeta so we can initialize buffers big enough for all cells in the block
  public PrefixTreeArrayScanner(PrefixTreeBlockMeta blockMeta, int rowTreeDepth, 
      int rowBufferLength, int qualifierBufferLength) {
    this.rowNodes = new RowNodeReader[rowTreeDepth];
    for (int i = 0; i < rowNodes.length; ++i) {
      rowNodes[i] = new RowNodeReader();
    }
    this.rowBuffer = new byte[rowBufferLength];
    this.familyBuffer = new byte[PrefixTreeBlockMeta.MAX_FAMILY_LENGTH];
    this.familyReader = new ColumnReader(familyBuffer, true);
    this.qualifierBuffer = new byte[qualifierBufferLength];
    this.qualifierReader = new ColumnReader(qualifierBuffer, false);
    this.timestampDecoder = new TimestampDecoder();
    this.mvccVersionDecoder = new MvccVersionDecoder();
  }
项目:c5    文件:TestTimestampEncoder.java   
public TestTimestampEncoder(TestTimestampData testTimestamps) throws IOException {
  this.timestamps = testTimestamps;
  this.blockMeta = new PrefixTreeBlockMeta();
  this.blockMeta.setNumMetaBytes(0);
  this.blockMeta.setNumRowBytes(0);
  this.blockMeta.setNumQualifierBytes(0);
  this.encoder = new LongEncoder();
  for (Long ts : testTimestamps.getInputs()) {
    encoder.add(ts);
  }
  encoder.compile();
  blockMeta.setTimestampFields(encoder);
  bytes = encoder.getByteArray();
  decoder = new TimestampDecoder();
  decoder.initOnBlock(blockMeta, bytes);
}