Package org.apache.hadoop.hbase.client

Examples of org.apache.hadoop.hbase.client.HBaseAdmin.balanceSwitch()


    for (int i = 0; i < 12; i++) {
      byte[] b = { (byte) c };
      split1[i] = b;
      c++;
    }
    admin.balanceSwitch(false);
    admin.createTable(htd, split1);
    String tableName = "testBalanceClusterFromAdminBalancer";
    String indexTableName = "testBalanceClusterFromAdminBalancer" + Constants.INDEX_TABLE_SUFFIX;
    waitUntilIndexTableCreated(master, indexTableName);
    admin.disableTable(tableName);
View Full Code Here


    String tableName = "testBalanceClusterFromAdminBalancer";
    String indexTableName = "testBalanceClusterFromAdminBalancer" + Constants.INDEX_TABLE_SUFFIX;
    waitUntilIndexTableCreated(master, indexTableName);
    admin.disableTable(tableName);
    admin.enableTable(tableName);
    admin.balanceSwitch(true);
    admin.balancer();
    boolean isRegionsColocated = checkForColocation(master, tableName, indexTableName);
    assertTrue("User regions and index regions should colocate.", isRegionsColocated);
  }
View Full Code Here

    for (int i = 0; i < 12; i++) {
      byte[] b = { (byte) c };
      split1[i] = b;
      c++;
    }
    admin.balanceSwitch(false);
    admin.createTable(htd, split1);
    String tableName = "testByTableBalanceClusterFromAdminBalancer";
    String indexTableName =
        "testByTableBalanceClusterFromAdminBalancer" + Constants.INDEX_TABLE_SUFFIX;
    waitUntilIndexTableCreated(master, indexTableName);
View Full Code Here

    String indexTableName =
        "testByTableBalanceClusterFromAdminBalancer" + Constants.INDEX_TABLE_SUFFIX;
    waitUntilIndexTableCreated(master, indexTableName);
    admin.disableTable(tableName);
    admin.enableTable(tableName);
    admin.balanceSwitch(true);
    admin.balancer();
    int totalNumRegions = 21;
    Thread.sleep(10000);
    List<Pair<byte[], ServerName>> iTableStartKeysAndLocations = null;
    do {
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.