Package org.apache.hadoop.hbase.index

Examples of org.apache.hadoop.hbase.index.IndexedHTableDescriptor.addIndex()


    if (toIndex) {
      IndexedHTableDescriptor ihtd = new IndexedHTableDescriptor(userTableName);
      IndexSpecification iSpec = new IndexSpecification("ScanIndexe");
      iSpec.addIndexColumn(hcd, "ql", ValueType.String, 10);
      ihtd.addFamily(hcd);
      ihtd.addIndex(iSpec);
      admin.createTable(ihtd);
    } else {
      HTableDescriptor htd = new HTableDescriptor(userTableName);
      htd.addFamily(hcd);
      admin.createTable(htd);
View Full Code Here


    IndexSpecification idx1 = new IndexSpecification("ScanMulIndex");
    idx1.addIndexColumn(hcd1, "ql", ValueType.String, 10);
    idx1.addIndexColumn(hcd2, "ql", ValueType.String, 10);
    idx1.addIndexColumn(hcd3, "ql", ValueType.String, 10);
    idx1.addIndexColumn(hcd4, "ql", ValueType.String, 10);
    ihtd.addIndex(idx1);

    admin.createTable(ihtd);
    ZKAssign.blockUntilNoRIT(zkw);
    HTable table = new HTable(conf, userTableName);
View Full Code Here

    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);
    HTable table = new HTable(conf, userTableName);
    // test put with the indexed column
    for (int i = 0; i < 10; i++) {
View Full Code Here

    ihtd.addFamily(hcd);
    IndexSpecification iSpec = new IndexSpecification("Index1");
    iSpec.addIndexColumn(hcd, "ql", ValueType.String, 10);
    IndexSpecification iSpec1 = new IndexSpecification("Index2");
    iSpec1.addIndexColumn(hcd, "q2", ValueType.String, 10);
    ihtd.addIndex(iSpec);
    ihtd.addIndex(iSpec1);
    admin.createTable(ihtd);

    ZKAssign.blockUntilNoRIT(zkw);
    openCount++;
View Full Code Here

    IndexSpecification iSpec = new IndexSpecification("Index1");
    iSpec.addIndexColumn(hcd, "ql", ValueType.String, 10);
    IndexSpecification iSpec1 = new IndexSpecification("Index2");
    iSpec1.addIndexColumn(hcd, "q2", ValueType.String, 10);
    ihtd.addIndex(iSpec);
    ihtd.addIndex(iSpec1);
    admin.createTable(ihtd);

    ZKAssign.blockUntilNoRIT(zkw);
    openCount++;
    HTable table = new HTable(conf, userTableName);
View Full Code Here

    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);
    HTable table = new HTable(conf, userTableName);
    // test put with the indexed column
    for (int i = 0; i < 4; i++) {
View Full Code Here

        IndexedHTableDescriptor htd = new IndexedHTableDescriptor("testCreateTable");
        HColumnDescriptor hcd = new HColumnDescriptor("cf");
        htd.addFamily(hcd);
        IndexSpecification iSpec = new IndexSpecification("spec");
        iSpec.addIndexColumn(hcd, "q", ValueType.String, 10);
        htd.addIndex(iSpec);
        admin.createTable(htd);
        return null;
      }
    };
View Full Code Here

        IndexedHTableDescriptor htd = new IndexedHTableDescriptor("testCreateTable_idx");
        HColumnDescriptor hcd = new HColumnDescriptor("cf");
        htd.addFamily(hcd);
        IndexSpecification iSpec = new IndexSpecification("spec");
        iSpec.addIndexColumn(hcd, "q", ValueType.String, 10);
        htd.addIndex(iSpec);
        admin.createTable(htd);
        return null;
      }
    };
View Full Code Here

    IndexedHTableDescriptor htd = new IndexedHTableDescriptor("testDisableEnableTable");
    HColumnDescriptor hcd = new HColumnDescriptor("cf");
    htd.addFamily(hcd);
    IndexSpecification iSpec = new IndexSpecification("spec");
    iSpec.addIndexColumn(hcd, "q", ValueType.String, 10);
    htd.addIndex(iSpec);
    admin.createTable(htd);
    ZKAssign.blockUntilNoRIT(HBaseTestingUtility.getZooKeeperWatcher(TEST_UTIL));

    // Creating the operation to be performed by the user
    PrivilegedExceptionAction disableTable = new PrivilegedExceptionAction() {
View Full Code Here

    IndexedHTableDescriptor htd = new IndexedHTableDescriptor("testScanOperation");
    HColumnDescriptor hcd = new HColumnDescriptor("cf");
    htd.addFamily(hcd);
    IndexSpecification iSpec = new IndexSpecification("spec");
    iSpec.addIndexColumn(hcd, "q", ValueType.String, 10);
    htd.addIndex(iSpec);
    admin.createTable(htd);
    ZKAssign.blockUntilNoRIT(HBaseTestingUtility.getZooKeeperWatcher(TEST_UTIL));

    HTable table = new HTable(conf, "testScanOperation");
    Put p = null;
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.