Package org.apache.hadoop.hbase.index

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


    masterFilter.addFilter(filter1);
    masterFilter.addFilter(filter2);
    Scan scan = new Scan();
    scan.setFilter(masterFilter);
    // Will throw null pointer here.
    IndexSpecification indexSpec = new IndexSpecification("a");
    indexSpec
        .addIndexColumn(new HColumnDescriptor(family), Bytes.toString(qual), ValueType.Int, 10);
    boolean add = arrayList.add(indexSpec);
    IndexManager.getInstance().addIndexForTable(this.region.getTableDesc().getNameAsString(),
      arrayList);
    mapper.evaluate(scan, indices, new byte[0], this.region, this.region.getTableDesc()
View Full Code Here


    }
  }
*/
  private IndexSpecification createIndexSpecification(String cf, ValueType type,
      int maxValueLength, String[] qualifiers, String name) {
    IndexSpecification index = new IndexSpecification(name.getBytes());
    for (String qualifier : qualifiers) {
      index.addIndexColumn(new HColumnDescriptor(cf), qualifier, type, maxValueLength);
    }
    return index;
  }
View Full Code Here

    conf.setInt("hbase.regionserver.lease.period", 90000000);
    ZooKeeperWatcher zkw = HBaseTestingUtility.getZooKeeperWatcher(UTIL);
    String userTableName = "testHDP2989";
    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);
View Full Code Here

    ZooKeeperWatcher zkw = HBaseTestingUtility.getZooKeeperWatcher(UTIL);
    String userTableName = "testCompactionOfIndexRegionBeforeMainRegionOpens";
    IndexedHTableDescriptor ihtd = new IndexedHTableDescriptor(userTableName);
    HColumnDescriptor hcd = new HColumnDescriptor("col1");
    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);
View Full Code Here

    conf.setInt("hbase.regionserver.lease.period", 90000000);
    ZooKeeperWatcher zkw = HBaseTestingUtility.getZooKeeperWatcher(UTIL);
    final String userTableName = "testHDP3015";
    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);
View Full Code Here

      public Object run() throws Exception {
        HBaseAdmin admin = new HBaseAdmin(conf);
        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;
      }
    };

    PrivilegedExceptionAction createIndexTable = new PrivilegedExceptionAction() {
      @Override
      public Object run() throws Exception {
        HBaseAdmin admin = new HBaseAdmin(conf);
        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

    HBaseAdmin admin = new HBaseAdmin(conf);
    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
View Full Code Here

    HBaseAdmin admin = new HBaseAdmin(conf);
    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");
View Full Code Here

    HBaseAdmin admin = new HBaseAdmin(conf);
    IndexedHTableDescriptor htd = new IndexedHTableDescriptor("testCheckAndPut");
    HColumnDescriptor hcd = new HColumnDescriptor("cf");
    htd.addFamily(hcd);
    final 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, "testCheckAndPut");
View Full Code Here

    HBaseAdmin admin = new HBaseAdmin(conf);
    IndexedHTableDescriptor htd = new IndexedHTableDescriptor("testMoveRegionOp");
    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));

    PrivilegedExceptionAction moveMainTable = new PrivilegedExceptionAction() {
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.