Java 类org.apache.hadoop.hbase.codec.prefixtree.encode.tokenize.Tokenizer 实例源码

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

  public PrefixTreeEncoder(OutputStream outputStream, boolean includeMvccVersion) {
    // used during cell accumulation
    this.blockMeta = new PrefixTreeBlockMeta();
    this.rowRange = new SimpleMutableByteRange();
    this.familyRange = new SimpleMutableByteRange();
    this.qualifierRange = new SimpleMutableByteRange();
    this.timestamps = new long[INITIAL_PER_CELL_ARRAY_SIZES];
    this.mvccVersions = new long[INITIAL_PER_CELL_ARRAY_SIZES];
    this.typeBytes = new byte[INITIAL_PER_CELL_ARRAY_SIZES];
    this.valueOffsets = new int[INITIAL_PER_CELL_ARRAY_SIZES];
    this.values = new byte[VALUE_BUFFER_INIT_SIZE];

    // used during compilation
    this.familyDeduplicator = USE_HASH_COLUMN_SORTER ? new ByteRangeHashSet()
        : new ByteRangeTreeSet();
    this.qualifierDeduplicator = USE_HASH_COLUMN_SORTER ? new ByteRangeHashSet()
        : new ByteRangeTreeSet();
    this.timestampEncoder = new LongEncoder();
    this.mvccVersionEncoder = new LongEncoder();
    this.cellTypeEncoder = new CellTypeEncoder();
    this.rowTokenizer = new Tokenizer();
    this.familyTokenizer = new Tokenizer();
    this.qualifierTokenizer = new Tokenizer();
    this.rowWriter = new RowSectionWriter();
    this.familyWriter = new ColumnSectionWriter();
    this.qualifierWriter = new ColumnSectionWriter();
    initializeTagHelpers();

    reset(outputStream, includeMvccVersion);
  }
项目:ditb    文件:PrefixTreeEncoder.java   
protected void initializeTagHelpers() {
  this.tagsRange = new SimpleMutableByteRange();
  this.tagsDeduplicator = USE_HASH_COLUMN_SORTER ? new ByteRangeHashSet()
  : new ByteRangeTreeSet();
  this.tagsTokenizer = new Tokenizer();
  this.tagsWriter = new ColumnSectionWriter();
}
项目:ditb    文件:TestColumnBuilder.java   
/*************** construct ****************************/

  public TestColumnBuilder(TestColumnData columns) {
    this.columns = columns;
    List<ByteRange> inputs = columns.getInputs();
    this.columnSorter = new ByteRangeTreeSet(inputs);
    this.sortedUniqueColumns = columnSorter.compile().getSortedRanges();
    List<byte[]> copies = ByteRangeUtils.copyToNewArrays(sortedUniqueColumns);
    Assert.assertTrue(Bytes.isSorted(copies));
    this.blockMeta = new PrefixTreeBlockMeta();
    this.blockMeta.setNumMetaBytes(0);
    this.blockMeta.setNumRowBytes(0);
    this.builder = new Tokenizer();
  }
项目:ditb    文件:TestTreeDepth.java   
protected void testInternal(List<String> inputs, int expectedTreeDepth) {
  Tokenizer builder = new Tokenizer();
  for (String s : inputs) {
    SimpleMutableByteRange b = new SimpleMutableByteRange(Bytes.toBytes(s));
    builder.addSorted(b);
  }
  Assert.assertEquals(1, builder.getRoot().getNodeDepth());
  Assert.assertEquals(expectedTreeDepth, builder.getTreeDepth());
}
项目:ditb    文件:TestTokenizer.java   
public TestTokenizer(TestTokenizerData sortedByteArrays) {
  this.inputs = sortedByteArrays.getInputs();
  this.builder = new Tokenizer();
  for (byte[] array : inputs) {
    builder.addSorted(new SimpleMutableByteRange(array));
  }
  this.roundTripped = builder.getArrays();
}
项目:pbase    文件:PrefixTreeEncoder.java   
/***************** construct ***********************/

  public PrefixTreeEncoder(OutputStream outputStream, boolean includeMvccVersion) {
    // used during cell accumulation
    this.blockMeta = new PrefixTreeBlockMeta();
    this.rowRange = new SimpleMutableByteRange();
    this.familyRange = new SimpleMutableByteRange();
    this.qualifierRange = new SimpleMutableByteRange();
    this.timestamps = new long[INITIAL_PER_CELL_ARRAY_SIZES];
    this.mvccVersions = new long[INITIAL_PER_CELL_ARRAY_SIZES];
    this.typeBytes = new byte[INITIAL_PER_CELL_ARRAY_SIZES];
    this.valueOffsets = new int[INITIAL_PER_CELL_ARRAY_SIZES];
    this.values = new byte[VALUE_BUFFER_INIT_SIZE];

    // used during compilation
    this.familyDeduplicator = USE_HASH_COLUMN_SORTER ? new ByteRangeHashSet()
        : new ByteRangeTreeSet();
    this.qualifierDeduplicator = USE_HASH_COLUMN_SORTER ? new ByteRangeHashSet()
        : new ByteRangeTreeSet();
    this.timestampEncoder = new LongEncoder();
    this.mvccVersionEncoder = new LongEncoder();
    this.cellTypeEncoder = new CellTypeEncoder();
    this.rowTokenizer = new Tokenizer();
    this.familyTokenizer = new Tokenizer();
    this.qualifierTokenizer = new Tokenizer();
    this.rowWriter = new RowSectionWriter();
    this.familyWriter = new ColumnSectionWriter();
    this.qualifierWriter = new ColumnSectionWriter();
    initializeTagHelpers();

    reset(outputStream, includeMvccVersion);
  }
项目:pbase    文件:PrefixTreeEncoder.java   
protected void initializeTagHelpers() {
  this.tagsRange = new SimpleMutableByteRange();
  this.tagsDeduplicator = USE_HASH_COLUMN_SORTER ? new ByteRangeHashSet()
  : new ByteRangeTreeSet();
  this.tagsTokenizer = new Tokenizer();
  this.tagsWriter = new ColumnSectionWriter();
}
项目:pbase    文件:TestColumnBuilder.java   
/*************** construct ****************************/

  public TestColumnBuilder(TestColumnData columns) {
    this.columns = columns;
    List<ByteRange> inputs = columns.getInputs();
    this.columnSorter = new ByteRangeTreeSet(inputs);
    this.sortedUniqueColumns = columnSorter.compile().getSortedRanges();
    List<byte[]> copies = ByteRangeUtils.copyToNewArrays(sortedUniqueColumns);
    Assert.assertTrue(Bytes.isSorted(copies));
    this.blockMeta = new PrefixTreeBlockMeta();
    this.blockMeta.setNumMetaBytes(0);
    this.blockMeta.setNumRowBytes(0);
    this.builder = new Tokenizer();
  }
项目:pbase    文件:TestTreeDepth.java   
protected void testInternal(List<String> inputs, int expectedTreeDepth) {
  Tokenizer builder = new Tokenizer();
  for (String s : inputs) {
    SimpleMutableByteRange b = new SimpleMutableByteRange(Bytes.toBytes(s));
    builder.addSorted(b);
  }
  Assert.assertEquals(1, builder.getRoot().getNodeDepth());
  Assert.assertEquals(expectedTreeDepth, builder.getTreeDepth());
}
项目:pbase    文件:TestTokenizer.java   
public TestTokenizer(TestTokenizerData sortedByteArrays) {
  this.inputs = sortedByteArrays.getInputs();
  this.builder = new Tokenizer();
  for (byte[] array : inputs) {
    builder.addSorted(new SimpleMutableByteRange(array));
  }
  this.roundTripped = builder.getArrays();
}
项目:HIndex    文件:PrefixTreeEncoder.java   
/***************** construct ***********************/

  public PrefixTreeEncoder(OutputStream outputStream, boolean includeMvccVersion) {
    // used during cell accumulation
    this.blockMeta = new PrefixTreeBlockMeta();
    this.rowRange = new SimpleByteRange();
    this.familyRange = new SimpleByteRange();
    this.qualifierRange = new SimpleByteRange();
    this.timestamps = new long[INITIAL_PER_CELL_ARRAY_SIZES];
    this.mvccVersions = new long[INITIAL_PER_CELL_ARRAY_SIZES];
    this.typeBytes = new byte[INITIAL_PER_CELL_ARRAY_SIZES];
    this.valueOffsets = new int[INITIAL_PER_CELL_ARRAY_SIZES];
    this.values = new byte[VALUE_BUFFER_INIT_SIZE];

    // used during compilation
    this.familyDeduplicator = USE_HASH_COLUMN_SORTER ? new ByteRangeHashSet()
        : new ByteRangeTreeSet();
    this.qualifierDeduplicator = USE_HASH_COLUMN_SORTER ? new ByteRangeHashSet()
        : new ByteRangeTreeSet();
    this.timestampEncoder = new LongEncoder();
    this.mvccVersionEncoder = new LongEncoder();
    this.cellTypeEncoder = new CellTypeEncoder();
    this.rowTokenizer = new Tokenizer();
    this.familyTokenizer = new Tokenizer();
    this.qualifierTokenizer = new Tokenizer();
    this.rowWriter = new RowSectionWriter();
    this.familyWriter = new ColumnSectionWriter();
    this.qualifierWriter = new ColumnSectionWriter();
    initializeTagHelpers();

    reset(outputStream, includeMvccVersion);
  }
项目:HIndex    文件:PrefixTreeEncoder.java   
protected void initializeTagHelpers() {
  this.tagsRange = new SimpleByteRange();
  this.tagsDeduplicator = USE_HASH_COLUMN_SORTER ? new ByteRangeHashSet()
  : new ByteRangeTreeSet();
  this.tagsTokenizer = new Tokenizer();
  this.tagsWriter = new ColumnSectionWriter();
}
项目:HIndex    文件:TestColumnBuilder.java   
/*************** construct ****************************/

  public TestColumnBuilder(TestColumnData columns) {
    this.columns = columns;
    List<ByteRange> inputs = columns.getInputs();
    this.columnSorter = new ByteRangeTreeSet(inputs);
    this.sortedUniqueColumns = columnSorter.compile().getSortedRanges();
    List<byte[]> copies = ByteRangeUtils.copyToNewArrays(sortedUniqueColumns);
    Assert.assertTrue(Bytes.isSorted(copies));
    this.blockMeta = new PrefixTreeBlockMeta();
    this.blockMeta.setNumMetaBytes(0);
    this.blockMeta.setNumRowBytes(0);
    this.builder = new Tokenizer();
  }
项目:HIndex    文件:TestTreeDepth.java   
protected void testInternal(List<String> inputs, int expectedTreeDepth) {
  Tokenizer builder = new Tokenizer();
  for (String s : inputs) {
    SimpleByteRange b = new SimpleByteRange(Bytes.toBytes(s));
    builder.addSorted(b);
  }
  Assert.assertEquals(1, builder.getRoot().getNodeDepth());
  Assert.assertEquals(expectedTreeDepth, builder.getTreeDepth());
}
项目:HIndex    文件:TestTokenizer.java   
public TestTokenizer(TestTokenizerData sortedByteArrays) {
  this.inputs = sortedByteArrays.getInputs();
  this.builder = new Tokenizer();
  for (byte[] array : inputs) {
    builder.addSorted(new SimpleByteRange(array));
  }
  this.roundTripped = builder.getArrays();
}
项目:PyroDB    文件:PrefixTreeEncoder.java   
/***************** construct ***********************/

  public PrefixTreeEncoder(OutputStream outputStream, boolean includeMvccVersion) {
    // used during cell accumulation
    this.blockMeta = new PrefixTreeBlockMeta();
    this.rowRange = new SimpleByteRange();
    this.familyRange = new SimpleByteRange();
    this.qualifierRange = new SimpleByteRange();
    this.timestamps = new long[INITIAL_PER_CELL_ARRAY_SIZES];
    this.mvccVersions = new long[INITIAL_PER_CELL_ARRAY_SIZES];
    this.typeBytes = new byte[INITIAL_PER_CELL_ARRAY_SIZES];
    this.valueOffsets = new int[INITIAL_PER_CELL_ARRAY_SIZES];
    this.values = new byte[VALUE_BUFFER_INIT_SIZE];

    // used during compilation
    this.familyDeduplicator = USE_HASH_COLUMN_SORTER ? new ByteRangeHashSet()
        : new ByteRangeTreeSet();
    this.qualifierDeduplicator = USE_HASH_COLUMN_SORTER ? new ByteRangeHashSet()
        : new ByteRangeTreeSet();
    this.timestampEncoder = new LongEncoder();
    this.mvccVersionEncoder = new LongEncoder();
    this.cellTypeEncoder = new CellTypeEncoder();
    this.rowTokenizer = new Tokenizer();
    this.familyTokenizer = new Tokenizer();
    this.qualifierTokenizer = new Tokenizer();
    this.rowWriter = new RowSectionWriter();
    this.familyWriter = new ColumnSectionWriter();
    this.qualifierWriter = new ColumnSectionWriter();
    initializeTagHelpers();

    reset(outputStream, includeMvccVersion);
  }
项目:PyroDB    文件:PrefixTreeEncoder.java   
protected void initializeTagHelpers() {
  this.tagsRange = new SimpleByteRange();
  this.tagsDeduplicator = USE_HASH_COLUMN_SORTER ? new ByteRangeHashSet()
  : new ByteRangeTreeSet();
  this.tagsTokenizer = new Tokenizer();
  this.tagsWriter = new ColumnSectionWriter();
}
项目:PyroDB    文件:TestColumnBuilder.java   
/*************** construct ****************************/

  public TestColumnBuilder(TestColumnData columns) {
    this.columns = columns;
    List<ByteRange> inputs = columns.getInputs();
    this.columnSorter = new ByteRangeTreeSet(inputs);
    this.sortedUniqueColumns = columnSorter.compile().getSortedRanges();
    List<byte[]> copies = ByteRangeUtils.copyToNewArrays(sortedUniqueColumns);
    Assert.assertTrue(Bytes.isSorted(copies));
    this.blockMeta = new PrefixTreeBlockMeta();
    this.blockMeta.setNumMetaBytes(0);
    this.blockMeta.setNumRowBytes(0);
    this.builder = new Tokenizer();
  }
项目:PyroDB    文件:TestTreeDepth.java   
protected void testInternal(List<String> inputs, int expectedTreeDepth) {
  Tokenizer builder = new Tokenizer();
  for (String s : inputs) {
    SimpleByteRange b = new SimpleByteRange(Bytes.toBytes(s));
    builder.addSorted(b);
  }
  Assert.assertEquals(1, builder.getRoot().getNodeDepth());
  Assert.assertEquals(expectedTreeDepth, builder.getTreeDepth());
}
项目:PyroDB    文件:TestTokenizer.java   
public TestTokenizer(TestTokenizerData sortedByteArrays) {
  this.inputs = sortedByteArrays.getInputs();
  this.builder = new Tokenizer();
  for (byte[] array : inputs) {
    builder.addSorted(new SimpleByteRange(array));
  }
  this.roundTripped = builder.getArrays();
}
项目:c5    文件:PrefixTreeEncoder.java   
/***************** construct ***********************/

  public PrefixTreeEncoder(OutputStream outputStream, boolean includeMvccVersion) {
    // used during cell accumulation
    this.blockMeta = new PrefixTreeBlockMeta();
    this.rowRange = new SimpleByteRange();
    this.familyRange = new SimpleByteRange();
    this.qualifierRange = new SimpleByteRange();
    this.timestamps = new long[INITIAL_PER_CELL_ARRAY_SIZES];
    this.mvccVersions = new long[INITIAL_PER_CELL_ARRAY_SIZES];
    this.typeBytes = new byte[INITIAL_PER_CELL_ARRAY_SIZES];
    this.valueOffsets = new int[INITIAL_PER_CELL_ARRAY_SIZES];
    this.values = new byte[VALUE_BUFFER_INIT_SIZE];

    // used during compilation
    this.familyDeduplicator = USE_HASH_COLUMN_SORTER ? new ByteRangeHashSet()
        : new ByteRangeTreeSet();
    this.qualifierDeduplicator = USE_HASH_COLUMN_SORTER ? new ByteRangeHashSet()
        : new ByteRangeTreeSet();
    this.timestampEncoder = new LongEncoder();
    this.mvccVersionEncoder = new LongEncoder();
    this.cellTypeEncoder = new CellTypeEncoder();
    this.rowTokenizer = new Tokenizer();
    this.familyTokenizer = new Tokenizer();
    this.qualifierTokenizer = new Tokenizer();
    this.rowWriter = new RowSectionWriter();
    this.familyWriter = new ColumnSectionWriter();
    this.qualifierWriter = new ColumnSectionWriter();

    reset(outputStream, includeMvccVersion);
  }
项目:c5    文件:TestColumnBuilder.java   
/*************** construct ****************************/

  public TestColumnBuilder(TestColumnData columns) {
    this.columns = columns;
    List<ByteRange> inputs = columns.getInputs();
    this.columnSorter = new ByteRangeTreeSet(inputs);
    this.sortedUniqueColumns = columnSorter.compile().getSortedRanges();
    List<byte[]> copies = ByteRangeUtils.copyToNewArrays(sortedUniqueColumns);
    Assert.assertTrue(Bytes.isSorted(copies));
    this.blockMeta = new PrefixTreeBlockMeta();
    this.blockMeta.setNumMetaBytes(0);
    this.blockMeta.setNumRowBytes(0);
    this.builder = new Tokenizer();
  }
项目:c5    文件:TestTreeDepth.java   
protected void testInternal(List<String> inputs, int expectedTreeDepth) {
  Tokenizer builder = new Tokenizer();
  for (String s : inputs) {
    SimpleByteRange b = new SimpleByteRange(Bytes.toBytes(s));
    builder.addSorted(b);
  }
  Assert.assertEquals(1, builder.getRoot().getNodeDepth());
  Assert.assertEquals(expectedTreeDepth, builder.getTreeDepth());
}
项目:c5    文件:TestTokenizer.java   
public TestTokenizer(TestTokenizerData sortedByteArrays) {
  this.inputs = sortedByteArrays.getInputs();
  this.builder = new Tokenizer();
  for (byte[] array : inputs) {
    builder.addSorted(new SimpleByteRange(array));
  }
  this.roundTripped = builder.getArrays();
}
项目:ditb    文件:ColumnSectionWriter.java   
public ColumnSectionWriter(PrefixTreeBlockMeta blockMeta, Tokenizer builder,
    ColumnNodeType nodeType) {
  this();// init collections
  reconstruct(blockMeta, builder, nodeType);
}
项目:ditb    文件:ColumnSectionWriter.java   
public void reconstruct(PrefixTreeBlockMeta blockMeta, Tokenizer builder,
    ColumnNodeType nodeType) {
  this.blockMeta = blockMeta;
  this.tokenizer = builder;
  this.nodeType = nodeType;
}
项目:ditb    文件:PrefixTreeEncoder.java   
public Tokenizer getRowTokenizer() {
  return rowTokenizer;
}
项目:pbase    文件:ColumnSectionWriter.java   
public ColumnSectionWriter(PrefixTreeBlockMeta blockMeta, Tokenizer builder,
    ColumnNodeType nodeType) {
  this();// init collections
  reconstruct(blockMeta, builder, nodeType);
}
项目:pbase    文件:ColumnSectionWriter.java   
public void reconstruct(PrefixTreeBlockMeta blockMeta, Tokenizer builder,
    ColumnNodeType nodeType) {
  this.blockMeta = blockMeta;
  this.tokenizer = builder;
  this.nodeType = nodeType;
}
项目:pbase    文件:PrefixTreeEncoder.java   
public Tokenizer getRowTokenizer() {
  return rowTokenizer;
}
项目:HIndex    文件:ColumnSectionWriter.java   
public ColumnSectionWriter(PrefixTreeBlockMeta blockMeta, Tokenizer builder,
    ColumnNodeType nodeType) {
  this();// init collections
  reconstruct(blockMeta, builder, nodeType);
}
项目:HIndex    文件:ColumnSectionWriter.java   
public void reconstruct(PrefixTreeBlockMeta blockMeta, Tokenizer builder,
    ColumnNodeType nodeType) {
  this.blockMeta = blockMeta;
  this.tokenizer = builder;
  this.nodeType = nodeType;
}
项目:HIndex    文件:PrefixTreeEncoder.java   
public Tokenizer getRowTokenizer() {
  return rowTokenizer;
}
项目:PyroDB    文件:ColumnSectionWriter.java   
public ColumnSectionWriter(PrefixTreeBlockMeta blockMeta, Tokenizer builder,
    ColumnNodeType nodeType) {
  this();// init collections
  reconstruct(blockMeta, builder, nodeType);
}
项目:PyroDB    文件:ColumnSectionWriter.java   
public void reconstruct(PrefixTreeBlockMeta blockMeta, Tokenizer builder,
    ColumnNodeType nodeType) {
  this.blockMeta = blockMeta;
  this.tokenizer = builder;
  this.nodeType = nodeType;
}
项目:PyroDB    文件:PrefixTreeEncoder.java   
public Tokenizer getRowTokenizer() {
  return rowTokenizer;
}
项目:c5    文件:ColumnSectionWriter.java   
public ColumnSectionWriter(PrefixTreeBlockMeta blockMeta, Tokenizer builder,
    boolean familyVsQualifier) {
  this();// init collections
  reconstruct(blockMeta, builder, familyVsQualifier);
}
项目:c5    文件:ColumnSectionWriter.java   
public void reconstruct(PrefixTreeBlockMeta blockMeta, Tokenizer builder,
    boolean familyVsQualifier) {
  this.blockMeta = blockMeta;
  this.tokenizer = builder;
  this.familyVsQualifier = familyVsQualifier;
}
项目:c5    文件:PrefixTreeEncoder.java   
public Tokenizer getRowTokenizer() {
  return rowTokenizer;
}