Package org.apache.tajo.storage.index.bst.BSTIndex

Examples of org.apache.tajo.storage.index.bst.BSTIndex.BSTIndexReader.open()


    FileFragment tablet = new FileFragment("table1_1", status.getPath(), 0, fileLen);

    tuple = new VTuple(keySchema.size());
    BSTIndexReader reader = bst.getIndexReader(new Path(testDir, "testBuildIndexWithAppender_" + storeType + ".idx"),
        keySchema, comp);
    reader.open();
    SeekableScanner scanner = StorageManagerFactory.getSeekableScanner(conf, meta, schema, tablet, schema);
    scanner.init();

    for (int i = 0; i < TUPLE_NUM - 1; i++) {
      tuple.put(0, DatumFactory.createInt8(i));
View Full Code Here


    creater.close();
    scanner.close();

    BSTIndexReader reader = bst.getIndexReader(new Path(testDir, "testFindOmittedValue_" + storeType + ".idx"),
        keySchema, comp);
    reader.open();
    for (int i = 1; i < TUPLE_NUM - 1; i += 2) {
      keyTuple.put(0, DatumFactory.createInt8(i));
      keyTuple.put(1, DatumFactory.createFloat8(i));
      long offsets = reader.find(keyTuple);
      assertEquals(-1, offsets);
View Full Code Here

    creater.close();
    scanner.close();

    BSTIndexReader reader = bst.getIndexReader(new Path(testDir, "testFindNextKeyValue_" + storeType + ".idx"),
        keySchema, comp);
    reader.open();
    scanner = StorageManagerFactory.getSeekableScanner(conf, meta, schema, tablet, schema);
    scanner.init();

    Tuple result;
    for (int i = 0; i < TUPLE_NUM - 1; i++) {
View Full Code Here

    creater.close();
    scanner.close();

    BSTIndexReader reader = bst.getIndexReader(new Path(testDir, "testFindNextKeyOmittedValue_" + storeType + ".idx"),
        keySchema, comp);
    reader.open();
    scanner = StorageManagerFactory.getSeekableScanner(conf, meta, schema, tablet, schema);
    scanner.init();

    Tuple result;
    for (int i = 1; i < TUPLE_NUM - 1; i += 2) {
View Full Code Here

    tuple = new VTuple(keySchema.size());

    BSTIndexReader reader = bst.getIndexReader(new Path(testDir, "testFindMinValue_" + storeType + ".idx"),
        keySchema, comp);
    reader.open();
    scanner = StorageManagerFactory.getSeekableScanner(conf, meta, schema, tablet, schema);
    scanner.init();

    tuple.put(0, DatumFactory.createInt8(0));
    tuple.put(1, DatumFactory.createFloat8(0));
View Full Code Here

    creater.close();
    scanner.close();

    BSTIndexReader reader = bst.getIndexReader(new Path(testDir, "testMinMax_" + storeType + ".idx"),
        keySchema, comp);
    reader.open();

    Tuple min = reader.getFirstKey();
    assertEquals(5, min.get(0).asInt4());
    assertEquals(5l, min.get(0).asInt8());
View Full Code Here

    creater.close();
    scanner.close();

    BSTIndexReader reader = bst.getIndexReader(new Path(testDir, "testConcurrentAccess_" + storeType + ".idx"),
        keySchema, comp);
    reader.open();

    Thread[] threads = new Thread[5];
    ConcurrentAccessor[] accs = new ConcurrentAccessor[5];
    for (int i = 0; i < threads.length; i++) {
      accs[i] = new ConcurrentAccessor(reader);
View Full Code Here

    tuple = new VTuple(keySchema.size());

    BSTIndexReader reader = bst.getIndexReader(new Path(testDir, "testFindValueDescOrder_" + storeType + ".idx"),
        keySchema, comp);
    reader.open();
    scanner = StorageManagerFactory.getSeekableScanner(conf, meta, schema, tablet, schema);
    scanner.init();

    for (int i = (TUPLE_NUM - 1); i > 0; i--) {
      tuple.put(0, DatumFactory.createInt8(i));
View Full Code Here

    scanner.close();


    BSTIndexReader reader = bst.getIndexReader(new Path(testDir, "testFindNextKeyValueDescOrder_" + storeType + ".idx"),
        keySchema, comp);
    reader.open();

    assertEquals(keySchema, reader.getKeySchema());
    assertEquals(comp, reader.getComparator());

    scanner = StorageManagerFactory.getSeekableScanner(conf, meta, schema, tablet, schema);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.