Package org.apache.hadoop.hbase.index

Examples of org.apache.hadoop.hbase.index.IndexSpecification


    outerFL.addFilter(innerFL);
    scan.setFilter(outerFL);

    ScanFilterEvaluator evaluator = new ScanFilterEvaluator();
    List<IndexSpecification> indices = new ArrayList<IndexSpecification>();
    IndexSpecification is1 = new IndexSpecification(index1);
    HColumnDescriptor colDesc = new HColumnDescriptor(FAMILY1);
    is1.addIndexColumn(colDesc, COL2, ValueType.Int, 4);
    is1.addIndexColumn(colDesc, COL3, ValueType.Float, 4);
    indices.add(is1);
    IndexSpecification is2 = new IndexSpecification(index2);
    is2.addIndexColumn(colDesc, COL1, ValueType.String, 15);
    indices.add(is2);
    IndexSpecification is3 = new IndexSpecification(index3);
    colDesc = new HColumnDescriptor(FAMILY2);
    is3.addIndexColumn(colDesc, COL1, ValueType.Double, 8);
    indices.add(is3);

    HRegion region =
        initHRegion(tableName.getBytes(), null, null, "testMultiIndexExpression",
          TEST_UTIL.getConfiguration(), FAMILY1);
View Full Code Here


    Scan scan = new Scan();
    scan.setAttribute(Constants.INDEX_EXPRESSION, IndexUtils.toBytes(exp));
    byte[] value1 = Bytes.toBytes("asdf");
    scan.setFilter(new SingleColumnValueFilter(FAMILY1, QUALIFIER1, CompareOp.EQUAL, value1));
    List<IndexSpecification> indices = new ArrayList<IndexSpecification>();
    IndexSpecification is1 = new IndexSpecification("idx1");
    HColumnDescriptor colDesc = new HColumnDescriptor(FAMILY1);
    is1.addIndexColumn(colDesc, COL1, ValueType.String, 15);
    indices.add(is1);
    ScanFilterEvaluator evaluator = new ScanFilterEvaluator();
    HRegion region =
        initHRegion(tableName.getBytes(), null, null, "testNoIndexExpression",
          TEST_UTIL.getConfiguration(), FAMILY1);
View Full Code Here

    conf.setInt("hbase.regionserver.lease.period", 900000000);
    ZooKeeperWatcher zkw = HBaseTestingUtility.getZooKeeperWatcher(UTIL);
    String userTableName = "testPutOnIndexedScanColumnWithOnePut";
    IndexedHTableDescriptor ihtd = new IndexedHTableDescriptor(userTableName);
    HColumnDescriptor hcd = new HColumnDescriptor("col");
    IndexSpecification iSpec = new IndexSpecification("ScanIndexf");
    iSpec.addIndexColumn(hcd, "ql", ValueType.String, 10);
    ihtd.addFamily(hcd);
    ihtd.addIndex(iSpec);
    admin.createTable(ihtd);
    ZKAssign.blockUntilNoRIT(zkw);
View Full Code Here

    conf.setInt("hbase.regionserver.lease.period", 900000000);
    ZooKeeperWatcher zkw = HBaseTestingUtility.getZooKeeperWatcher(UTIL);
    String userTableName = "testScanOnIndexedScanSplitColumnWithOnePut";
    IndexedHTableDescriptor ihtd = new IndexedHTableDescriptor(userTableName);
    HColumnDescriptor hcd = new HColumnDescriptor("col");
    IndexSpecification iSpec = new IndexSpecification("ScanIndexf");
    iSpec.addIndexColumn(hcd, "ql", ValueType.String, 10);
    ihtd.addFamily(hcd);
    ihtd.addIndex(iSpec);
    byte[][] split =
        new byte[][] { "row1".getBytes(), "row21".getBytes(), "row41".getBytes(),
            "row61".getBytes(), "row81".getBytes(), "row101".getBytes(), "row121".getBytes(),
View Full Code Here

    conf.setInt("hbase.regionserver.lease.period", 900000000);
    ZooKeeperWatcher zkw = HBaseTestingUtility.getZooKeeperWatcher(UTIL);
    String userTableName = "testScanOnIndexedSplitStRegExmptyColumnWithOnePut";
    IndexedHTableDescriptor ihtd = new IndexedHTableDescriptor(userTableName);
    HColumnDescriptor hcd = new HColumnDescriptor("col");
    IndexSpecification iSpec = new IndexSpecification("ScanIndexf");
    iSpec.addIndexColumn(hcd, "ql", ValueType.String, 10);
    ihtd.addFamily(hcd);
    ihtd.addIndex(iSpec);

    byte[][] split = new byte[][] { "A".getBytes(), "B".getBytes(), "C".getBytes() };
View Full Code Here

    conf.setInt("hbase.regionserver.lease.period", 900000000);
    ZooKeeperWatcher zkw = HBaseTestingUtility.getZooKeeperWatcher(UTIL);
    String userTableName = "testScanOnIndexedSplitSpacedColumnWithOnePut";
    IndexedHTableDescriptor ihtd = new IndexedHTableDescriptor(userTableName);
    HColumnDescriptor hcd = new HColumnDescriptor("col");
    IndexSpecification iSpec = new IndexSpecification("ScanIndexf");
    iSpec.addIndexColumn(hcd, "ql", ValueType.String, 10);
    ihtd.addFamily(hcd);
    ihtd.addIndex(iSpec);

    byte[][] split =
        new byte[][] { " row1".getBytes(), "row21".getBytes(), "row41".getBytes(),
View Full Code Here

    Configuration conf = UTIL.getConfiguration();
    conf.setInt("hbase.regionserver.lease.period", 900000000);
    String userTableName = "testPutOnIndexedScanColumnWith2Puts";
    IndexedHTableDescriptor ihtd = new IndexedHTableDescriptor(userTableName);
    HColumnDescriptor hcd = new HColumnDescriptor("col");
    IndexSpecification iSpec = new IndexSpecification("ScanIndexq");
    iSpec.addIndexColumn(hcd, "ql", ValueType.String, 10);
    ihtd.addFamily(hcd);
    ihtd.addIndex(iSpec);
    admin.createTable(ihtd);
    ZKAssign.blockUntilNoRIT(zkw);
View Full Code Here

    Configuration conf = UTIL.getConfiguration();
    conf.setInt("hbase.regionserver.lease.period", 900000000);
    String userTableName = "test5PutsWithIndexedScanColumn";
    IndexedHTableDescriptor ihtd = new IndexedHTableDescriptor(userTableName);
    HColumnDescriptor hcd = new HColumnDescriptor("col");
    IndexSpecification iSpec = new IndexSpecification("ScanIndexe");
    iSpec.addIndexColumn(hcd, "ql", ValueType.String, 10);
    ihtd.addFamily(hcd);
    ihtd.addIndex(iSpec);
    admin.createTable(ihtd);
    ZKAssign.blockUntilNoRIT(zkw);
View Full Code Here

    conf.setInt("hbase.regionserver.lease.period", 900000000);
    ZooKeeperWatcher zkw = HBaseTestingUtility.getZooKeeperWatcher(UTIL);
    String userTableName = "testgenerateExceptionInPostScannerOpen";
    IndexedHTableDescriptor ihtd = new IndexedHTableDescriptor(userTableName);
    HColumnDescriptor hcd = new HColumnDescriptor("col");
    IndexSpecification iSpec = new IndexSpecification("ScanIndexf");
    iSpec.addIndexColumn(hcd, "ql", ValueType.String, 10);
    ihtd.addFamily(hcd);
    ihtd.addIndex(iSpec);
    admin.createTable(ihtd);
    ZKAssign.blockUntilNoRIT(zkw);
View Full Code Here

    Configuration conf = UTIL.getConfiguration();
    conf.setInt("hbase.regionserver.lease.period", 900000000);

    IndexedHTableDescriptor ihtd = new IndexedHTableDescriptor(userTableName);
    HColumnDescriptor hcd = new HColumnDescriptor("col");
    IndexSpecification iSpec = new IndexSpecification("ScanIndex");
    iSpec.addIndexColumn(hcd, "ql", ValueType.String, 10);
    ihtd.addFamily(hcd);
    ihtd.addIndex(iSpec);
    admin.createTable(ihtd);
    ZKAssign.blockUntilNoRIT(zkw);
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.index.IndexSpecification

Copyright © 2018 www.massapicom. 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.