Examples of IndexSpecification


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

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

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

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

    Configuration conf = UTIL.getConfiguration();
    conf.setInt("hbase.regionserver.lease.period", 900000000);
    final String userTableName = "testCollocationExplicitScansOnIndexedColumn";
    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);
View Full Code Here

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

    Configuration conf = UTIL.getConfiguration();
    final String userTableName =
        "testScanShouldBeSuccessfulEvenIfUserRegionAndIndexRegionAreNotCollocated";
    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);

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

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

    HColumnDescriptor hcd1 = new HColumnDescriptor("col1");
    HColumnDescriptor hcd2 = new HColumnDescriptor("col2");
    ihtd.addFamily(hcd1);
    ihtd.addFamily(hcd2);
    IndexSpecification idx1 = new IndexSpecification("ScanMulIndex");
    idx1.addIndexColumn(hcd1, "ql", ValueType.String, 10);
    idx1.addIndexColumn(hcd2, "ql", ValueType.String, 10);
    ihtd.addIndex(idx1);

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

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

    final Configuration conf = UTIL.getConfiguration();
    HColumnDescriptor hcd = new HColumnDescriptor("col");

    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);
View Full Code Here

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

    HColumnDescriptor hcd4 = new HColumnDescriptor("col4");
    ihtd.addFamily(hcd1);
    ihtd.addFamily(hcd2);
    ihtd.addFamily(hcd3);
    ihtd.addFamily(hcd4);
    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

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

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

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

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

    }
  }
*/
  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

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

    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
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.