Package org.apache.hadoop.hbase.index

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


  @Test(timeout = 180000)
  public void testHDP2938() throws Exception {
    HBaseAdmin admin = new HBaseAdmin(UTIL.getConfiguration());
    ZooKeeperWatcher zkw = HBaseTestingUtility.getZooKeeperWatcher(UTIL);
    String userTableName = "testHDP2938";
    IndexedHTableDescriptor ihtd = new IndexedHTableDescriptor(userTableName);

    HColumnDescriptor hcd1 = new HColumnDescriptor("col1").setMaxVersions(Integer.MAX_VALUE);
    IndexSpecification iSpec = new IndexSpecification("ScanIndexf");
    iSpec.addIndexColumn(hcd1, "q2", ValueType.String, 10);
    ihtd.addFamily(hcd1);
    ihtd.addIndex(iSpec);
    admin.createTable(ihtd);
    ZKAssign.blockUntilNoRIT(zkw);

    admin.disableTable(userTableName);
    admin.deleteTable(userTableName);

    ihtd = new IndexedHTableDescriptor(userTableName);
    hcd1 =
        new HColumnDescriptor("col1").setMaxVersions(Integer.MAX_VALUE).setTimeToLive(
          TTL_SECONDS - 1);
    iSpec = new IndexSpecification("ScanIndexf");
    iSpec.addIndexColumn(hcd1, "q2", ValueType.String, 10);
    ihtd.addFamily(hcd1);
    ihtd.addIndex(iSpec);
    admin.createTable(ihtd);
    ZKAssign.blockUntilNoRIT(zkw);

    Configuration conf = UTIL.getConfiguration();
    HTable table = new HTable(conf, userTableName);
View Full Code Here


    HBaseAdmin admin = new HBaseAdmin(UTIL.getConfiguration());
    Configuration conf = admin.getConfiguration();
    conf.setBoolean("hbase.use.secondary.index", true);
    ZooKeeperWatcher zkw = HBaseTestingUtility.getZooKeeperWatcher(UTIL);
    String userTableName = "testIndexManagerWithSplitTransactions";
    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);
    ihtd.addIndex(iSpec);
    admin.createTable(ihtd);
    ZKAssign.blockUntilNoRIT(zkw);

    IndexManager manager = IndexManager.getInstance();
    int count = manager.getTableRegionCount(userTableName);
View Full Code Here

    HBaseAdmin admin = new HBaseAdmin(UTIL.getConfiguration());
    Configuration conf = admin.getConfiguration();
    conf.setBoolean("hbase.use.secondary.index", true);
    ZooKeeperWatcher zkw = HBaseTestingUtility.getZooKeeperWatcher(UTIL);
    String userTableName = "testIndexManagerWithFailedSplitOfIndexRegion";
    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);
    ihtd.addIndex(iSpec);
    admin.createTable(ihtd);
    ZKAssign.blockUntilNoRIT(zkw);

    IndexManager manager = IndexManager.getInstance();
    int count = manager.getTableRegionCount(userTableName);
View Full Code Here

    HBaseAdmin admin = new HBaseAdmin(UTIL.getConfiguration());
    Configuration conf = admin.getConfiguration();
    conf.setBoolean("hbase.use.secondary.index", true);
    ZooKeeperWatcher zkw = HBaseTestingUtility.getZooKeeperWatcher(UTIL);
    String userTableName = "testIndexManagerWithFailedSplitTransaction";
    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);
    ihtd.addIndex(iSpec);
    admin.createTable(ihtd);
    ZKAssign.blockUntilNoRIT(zkw);

    IndexManager manager = IndexManager.getInstance();
    int count = manager.getTableRegionCount(userTableName);
View Full Code Here

    ZooKeeperWatcher zkw = HBaseTestingUtility.getZooKeeperWatcher(UTIL);

    Configuration conf = UTIL.getConfiguration();
    String userTableName = "testIfAllScannersAreRangeInAllLevels";
    IndexedHTableDescriptor ihtd = new IndexedHTableDescriptor(userTableName);
    HColumnDescriptor hcd = new HColumnDescriptor("cf1");
    ihtd.addFamily(hcd);
    IndexSpecification indexSpecification =
        createIndexSpecification(hcd, ValueType.String, 10,
          new String[] { "c3", "c4", "c5", "c6" }, "idx1");
    ihtd.addIndex(indexSpecification);
    indexSpecification =
        createIndexSpecification(hcd, ValueType.String, 10, new String[] { "c1" }, "idx2");
    ihtd.addIndex(indexSpecification);
    indexSpecification =
        createIndexSpecification(hcd, ValueType.String, 10, new String[] { "c2" }, "idx3");
    ihtd.addIndex(indexSpecification);
    indexSpecification =
        createIndexSpecification(hcd, ValueType.String, 10, new String[] { "c3" }, "idx4");
    ihtd.addIndex(indexSpecification);

    // indexSpecification = createIndexSpecification(hcd, ValueType.String, 10, new String[] { "c2",
    // "c1" }, "idx4");
    // ihtd.addIndex(indexSpecification);
View Full Code Here

    ZooKeeperWatcher zkw = HBaseTestingUtility.getZooKeeperWatcher(UTIL);

    Configuration conf = UTIL.getConfiguration();
    String userTableName =
        "testANDWithORbranchesWhereEachBranchHavingAtleastOneFilterOtherThanSCVF";
    IndexedHTableDescriptor ihtd = new IndexedHTableDescriptor(userTableName);
    HColumnDescriptor hcd = new HColumnDescriptor("cf1");
    ihtd.addFamily(hcd);
    IndexSpecification indexSpecification =
        createIndexSpecification(hcd, ValueType.String, 10,
          new String[] { "c3", "c4", "c5", "c6" }, "idx1");
    ihtd.addIndex(indexSpecification);
    indexSpecification =
        createIndexSpecification(hcd, ValueType.String, 10, new String[] { "c1" }, "idx2");
    ihtd.addIndex(indexSpecification);
    indexSpecification =
        createIndexSpecification(hcd, ValueType.String, 10, new String[] { "c2" }, "idx3");
    ihtd.addIndex(indexSpecification);
    indexSpecification =
        createIndexSpecification(hcd, ValueType.String, 10, new String[] { "c3" }, "idx4");
    ihtd.addIndex(indexSpecification);

    // indexSpecification = createIndexSpecification(hcd, ValueType.String, 10, new String[] { "c2",
    // "c1" }, "idx4");
    // ihtd.addIndex(indexSpecification);
View Full Code Here

    ZooKeeperWatcher zkw = HBaseTestingUtility.getZooKeeperWatcher(UTIL);

    Configuration conf = UTIL.getConfiguration();
    String userTableName = "testORIfEachBranchHavingAtleastOneOtherFilterThanSCVF";
    IndexedHTableDescriptor ihtd = new IndexedHTableDescriptor(userTableName);
    HColumnDescriptor hcd = new HColumnDescriptor("cf1");
    ihtd.addFamily(hcd);
    IndexSpecification indexSpecification =
        createIndexSpecification(hcd, ValueType.String, 10,
          new String[] { "c3", "c4", "c5", "c6" }, "idx1");
    ihtd.addIndex(indexSpecification);
    indexSpecification =
        createIndexSpecification(hcd, ValueType.String, 10, new String[] { "c1" }, "idx2");
    ihtd.addIndex(indexSpecification);
    indexSpecification =
        createIndexSpecification(hcd, ValueType.String, 10, new String[] { "c2" }, "idx3");
    ihtd.addIndex(indexSpecification);
    indexSpecification =
        createIndexSpecification(hcd, ValueType.String, 10, new String[] { "c3" }, "idx4");
    ihtd.addIndex(indexSpecification);

    // indexSpecification = createIndexSpecification(hcd, ValueType.String, 10, new String[] { "c2",
    // "c1" }, "idx4");
    // ihtd.addIndex(indexSpecification);
View Full Code Here

    ZooKeeperWatcher zkw = HBaseTestingUtility.getZooKeeperWatcher(UTIL);

    Configuration conf = UTIL.getConfiguration();
    String userTableName = "testORBranchesInWhichOneBranchHavingOtherFiltersThanSCVF";
    IndexedHTableDescriptor ihtd = new IndexedHTableDescriptor(userTableName);
    HColumnDescriptor hcd = new HColumnDescriptor("cf1");
    ihtd.addFamily(hcd);
    IndexSpecification indexSpecification =
        createIndexSpecification(hcd, ValueType.String, 10,
          new String[] { "c3", "c4", "c5", "c6" }, "idx1");
    ihtd.addIndex(indexSpecification);
    indexSpecification =
        createIndexSpecification(hcd, ValueType.String, 10, new String[] { "c1" }, "idx2");
    ihtd.addIndex(indexSpecification);
    indexSpecification =
        createIndexSpecification(hcd, ValueType.String, 10, new String[] { "c2" }, "idx3");
    ihtd.addIndex(indexSpecification);
    indexSpecification =
        createIndexSpecification(hcd, ValueType.String, 10, new String[] { "c3" }, "idx4");
    ihtd.addIndex(indexSpecification);

    // indexSpecification = createIndexSpecification(hcd, ValueType.String, 10, new String[] { "c2",
    // "c1" }, "idx4");
    // ihtd.addIndex(indexSpecification);
View Full Code Here

    ZooKeeperWatcher zkw = HBaseTestingUtility.getZooKeeperWatcher(UTIL);

    Configuration conf = UTIL.getConfiguration();
    String userTableName = "testANDhavingORbranchWithOtherFilterThanSCVF";
    IndexedHTableDescriptor ihtd = new IndexedHTableDescriptor(userTableName);
    HColumnDescriptor hcd = new HColumnDescriptor("cf1");
    ihtd.addFamily(hcd);
    IndexSpecification indexSpecification =
        createIndexSpecification(hcd, ValueType.String, 10,
          new String[] { "c3", "c4", "c5", "c6" }, "idx1");
    ihtd.addIndex(indexSpecification);
    indexSpecification =
        createIndexSpecification(hcd, ValueType.String, 10, new String[] { "c1" }, "idx2");
    ihtd.addIndex(indexSpecification);
    indexSpecification =
        createIndexSpecification(hcd, ValueType.String, 10, new String[] { "c2" }, "idx3");
    ihtd.addIndex(indexSpecification);
    indexSpecification =
        createIndexSpecification(hcd, ValueType.String, 10, new String[] { "c3" }, "idx4");
    ihtd.addIndex(indexSpecification);

    // indexSpecification = createIndexSpecification(hcd, ValueType.String, 10, new String[] { "c2",
    // "c1" }, "idx4");
    // ihtd.addIndex(indexSpecification);
View Full Code Here

    ZooKeeperWatcher zkw = HBaseTestingUtility.getZooKeeperWatcher(UTIL);

    Configuration conf = UTIL.getConfiguration();
    String userTableName = "testIfAllScannersAreRangeInAllLevelsPart2";
    IndexedHTableDescriptor ihtd = new IndexedHTableDescriptor(userTableName);
    HColumnDescriptor hcd = new HColumnDescriptor("cf1");
    ihtd.addFamily(hcd);
    IndexSpecification indexSpecification =
        createIndexSpecification(hcd, ValueType.String, 10,
          new String[] { "c3", "c4", "c5", "c6" }, "idx1");
    ihtd.addIndex(indexSpecification);
    indexSpecification =
        createIndexSpecification(hcd, ValueType.String, 10, new String[] { "c1" }, "idx2");
    ihtd.addIndex(indexSpecification);
    indexSpecification =
        createIndexSpecification(hcd, ValueType.String, 10, new String[] { "c2" }, "idx3");
    ihtd.addIndex(indexSpecification);
    indexSpecification =
        createIndexSpecification(hcd, ValueType.String, 10, new String[] { "c3" }, "idx4");
    ihtd.addIndex(indexSpecification);

    // indexSpecification = createIndexSpecification(hcd, ValueType.String, 10, new String[] { "c2",
    // "c1" }, "idx4");
    // ihtd.addIndex(indexSpecification);
View Full Code Here

TOP

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

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.