Examples of HBaseEventType


Examples of org.apache.hadoop.hbase.executor.HBaseEventHandler.HBaseEventType

      String msg = "ZNode " + regionZNode + " does not exist in ZooKeeper, will NOT open region.";
      LOG.error(msg);
      throw new IOException(msg);
    }
    // if the ZNode is not in the closed state, something is wrong
    HBaseEventType rsEvent = HBaseEventType.fromByte(data[0]);
    if(rsEvent != HBaseEventType.RS2ZK_REGION_CLOSED && rsEvent != HBaseEventType.M2ZK_REGION_OFFLINE) {
      String msg = "ZNode " + regionZNode + " is not in CLOSED/OFFLINE state (state = " + rsEvent + "), will NOT open region.";
      LOG.error(msg);
      throw new IOException(msg);
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.executor.HBaseEventHandler.HBaseEventType

    if(oldData == null) {
      LOG.debug("While updating UNASSIGNED region " + regionName + " - node exists with no data" );
    }
    // If there is data in the ZNode, do not update if it is already correct
    else {
      HBaseEventType curState = HBaseEventType.fromByte(oldData[0]);
      HBaseEventType newState = HBaseEventType.fromByte(data[0]);
      // If the znode has the right state already, do not update it. Updating
      // the znode again and again will bump up the zk version. This may cause
      // the region server to fail. The RS expects that the znode is never
      // updated by anyone else while it is opening/closing a region.
      if(curState == newState) {
View Full Code Here

Examples of org.apache.hadoop.hbase.executor.HBaseEventHandler.HBaseEventType

      return;
    }
    String rgnInTransitNode = zkWrapper.getRegionInTransitionZNode();
    String region = zNodePath.substring(
        zNodePath.indexOf(rgnInTransitNode) + rgnInTransitNode.length() + 1);
    HBaseEventType rsEvent = HBaseEventType.fromByte(data[0]);
    LOG.debug("Got event type [ " + rsEvent + " ] for region " + region);

    // if the node was CLOSED then handle it
    if(rsEvent == HBaseEventType.RS2ZK_REGION_CLOSED) {
      new MasterCloseRegionHandler(rsEvent, serverManager, serverName, region, data).submit();
View Full Code Here

Examples of org.apache.hadoop.hbase.executor.HBaseEventHandler.HBaseEventType

    // create the unassigned region, throw up a region opened state for META
    String unassignedZNode = zkWrapper.getRegionInTransitionZNode();
    zkWrapper.createZNodeIfNotExists(unassignedZNode);
    byte[] data = null;
    HBaseEventType hbEventType = HBaseEventType.RS2ZK_REGION_OPENED;
    try {
      data = Writables.getBytes(new RegionTransitionEventData(hbEventType, HMaster.MASTER));
    } catch (IOException e) {
      LOG.error("Error creating event data for " + hbEventType, e);
    }
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.