Examples of ZKTableStateManager


Examples of org.apache.hadoop.hbase.zookeeper.ZKTableStateManager

  @Override
  public TableStateManager getTableStateManager() throws InterruptedException,
      CoordinatedStateException {
    try {
      return new ZKTableStateManager(server.getZooKeeper());
    } catch (KeeperException e) {
      throw new CoordinatedStateException(e);
    }
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.zookeeper.ZKTableStateManager

    List<HRegionInfo> regionsThatShouldBeOffline = new ArrayList<HRegionInfo>();

    log("Beginning to mock scenarios");

    // Disable the disabledTable in ZK
    TableStateManager zktable = new ZKTableStateManager(zkw);
    zktable.setTableState(disabledTable, ZooKeeperProtos.Table.State.DISABLED);

    /*
     *  ZK = OFFLINE
     */

 
View Full Code Here

Examples of org.apache.hadoop.hbase.zookeeper.ZKTableStateManager

    List<HRegionInfo> regionsThatShouldBeOffline = new ArrayList<HRegionInfo>();

    log("Beginning to mock scenarios");

    // Disable the disabledTable in ZK
    TableStateManager zktable = new ZKTableStateManager(zkw);
    zktable.setTableState(disabledTable, ZooKeeperProtos.Table.State.DISABLED);

    assertTrue(" The enabled table should be identified on master fail over.",
        zktable.isTableState(TableName.valueOf("enabledTable"),
          ZooKeeperProtos.Table.State.ENABLED));

    /*
     * ZK = CLOSING
     */
 
View Full Code Here

Examples of org.apache.hadoop.hbase.zookeeper.ZKTableStateManager

        new RegionState(region.getRegionInfo(), RegionState.State.OPEN,
          System.currentTimeMillis(), server.getServerName()));
      // create a node with OPENED state
      zkw = HBaseTestingUtility.createAndForceNodeToOpenedState(TEST_UTIL,
          region, server.getServerName());
      when(am.getTableStateManager()).thenReturn(new ZKTableStateManager(zkw));
      Stat stat = new Stat();
      String nodeName = ZKAssign.getNodeName(zkw, region.getRegionInfo()
          .getEncodedName());
      ZKUtil.getDataAndWatch(zkw, nodeName, stat);
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.