Examples of balanceSwitch()


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

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

    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

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 = "testByTableBalanceClusterFromAdminBalancer";
    String indexTableName =
        "testByTableBalanceClusterFromAdminBalancer" + Constants.INDEX_TABLE_SUFFIX;
    waitUntilIndexTableCreated(master, indexTableName);
View Full Code Here

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

    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

Examples of org.apache.hadoop.hbase.master.HMaster.balanceSwitch()

      Bytes.toBytes(destName));
    assertTrue("Coprocessor should have been called on region move",
      cp.wasMoveCalled());

    // make sure balancer is on
    master.balanceSwitch(true);
    assertTrue("Coprocessor should have been called on balance switch",
        cp.wasBalanceSwitchCalled());

    // force region rebalancing
    master.balanceSwitch(false);
View Full Code Here

Examples of org.apache.hadoop.hbase.master.HMaster.balanceSwitch()

    master.balanceSwitch(true);
    assertTrue("Coprocessor should have been called on balance switch",
        cp.wasBalanceSwitchCalled());

    // force region rebalancing
    master.balanceSwitch(false);
    // move half the open regions from RS 0 to RS 1
    HRegionServer rs = cluster.getRegionServer(0);
    byte[] destRS = Bytes.toBytes(cluster.getRegionServer(1).getServerName().toString());
    //Make sure no regions are in transition now
    waitForRITtoBeZero(master);
View Full Code Here

Examples of org.apache.hadoop.hbase.master.HMaster.balanceSwitch()

      }
    }
    //Make sure no regions are in transition now
    waitForRITtoBeZero(master);
    // now trigger a balance
    master.balanceSwitch(true);
    boolean balanceRun = master.balance();
    assertTrue("Coprocessor should be called on region rebalancing",
        cp.wasBalanceCalled());
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.master.HMaster.balanceSwitch()

  @Test (timeout=180000)
  public void testMasterFailoverWhenDisablingTableRegionsInRITOnDeadRS() throws Exception {
    MiniHBaseCluster cluster = TESTUTIL.getHBaseCluster();
    HMaster master = cluster.getMaster();
    // disable load balancing on this master
    master.balanceSwitch(false);

    final String table = "testMasterFailoverWhenDisablingTableRegionsInRITOnDeadRS";
    byte [] FAMILY = Bytes.toBytes("family");
    byte[][] SPLIT_KEYS =
        new byte[][] {Bytes.toBytes("a"), Bytes.toBytes("b"), Bytes.toBytes("c"),
View Full Code Here

Examples of org.apache.hadoop.hbase.master.HMaster.balanceSwitch()

      Bytes.toBytes(destName));
    assertTrue("Coprocessor should have been called on region move",
      cp.wasMoveCalled());

    // make sure balancer is on
    master.balanceSwitch(true);
    assertTrue("Coprocessor should have been called on balance switch",
        cp.wasBalanceSwitchCalled());

    // force region rebalancing
    master.balanceSwitch(false);
View Full Code Here

Examples of org.apache.hadoop.hbase.master.HMaster.balanceSwitch()

    master.balanceSwitch(true);
    assertTrue("Coprocessor should have been called on balance switch",
        cp.wasBalanceSwitchCalled());

    // force region rebalancing
    master.balanceSwitch(false);
    // move half the open regions from RS 0 to RS 1
    HRegionServer rs = cluster.getRegionServer(0);
    byte[] destRS = Bytes.toBytes(cluster.getRegionServer(1).getServerName().toString());
    //Make sure no regions are in transition now
    waitForRITtoBeZero(master);
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.