Package org.apache.hadoop.hbase.executor

Examples of org.apache.hadoop.hbase.executor.RegionTransitionEventData


  private void updateZKWithEventData(HBaseEventType hbEventType, HMsg hmsg) throws IOException {
    // update the data for "regionName" ZNode in unassigned to "hbEventType"
    byte[] data = null;
    try {
      data = Writables.getBytes(new RegionTransitionEventData(hbEventType, regionServerName, hmsg));
    } catch (IOException e) {
      LOG.error("Error creating event data for " + hbEventType, e);
    }
    LOG.debug("Updating ZNode " + regionZNode +
              " with [" + hbEventType + "]" +
View Full Code Here


    if (!master.getShutdownRequested().get()) {
      synchronized (regionsInTransition) {
        String regionName = HRegionInfo.ROOT_REGIONINFO.getRegionNameAsString();
        byte[] data = null;
        try {
          data = Writables.getBytes(new RegionTransitionEventData(HBaseEventType.M2ZK_REGION_OFFLINE, HMaster.MASTER));
        } catch (IOException e) {
          LOG.error("Error creating event data for " + HBaseEventType.M2ZK_REGION_OFFLINE, e);
        }
        zkWrapper.createOrUpdateUnassignedRegion(
            HRegionInfo.ROOT_REGIONINFO.getEncodedName(), data);
View Full Code Here

    LOG.info("Assigning region " + regionName + " to " + sinfo.getServerName());
    rs.setPendingOpen(sinfo.getServerName());
    synchronized (this.regionsInTransition) {
      byte[] data = null;
      try {
        data = Writables.getBytes(new RegionTransitionEventData(HBaseEventType.M2ZK_REGION_OFFLINE, HMaster.MASTER));
      } catch (IOException e) {
        LOG.error("Error creating event data for " + HBaseEventType.M2ZK_REGION_OFFLINE, e);
      }
      zkWrapper.createOrUpdateUnassignedRegion(
          rs.getRegionInfo().getEncodedName(), data);
View Full Code Here

    synchronized(this.regionsInTransition) {
      s = regionsInTransition.get(info.getRegionNameAsString());
      if (s == null) {
        byte[] data = null;
        try {
          data = Writables.getBytes(new RegionTransitionEventData(HBaseEventType.M2ZK_REGION_OFFLINE, HMaster.MASTER));
        } catch (IOException e) {
          // TODO: Review what we should do here.  If Writables work this
          //       should never happen
          LOG.error("Error creating event data for " + HBaseEventType.M2ZK_REGION_OFFLINE, e);
        }
View Full Code Here

    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);
    }
    zkWrapper.createOrUpdateUnassignedRegion(
        HRegionInfo.ROOT_REGIONINFO.getEncodedName(), data);
View Full Code Here

  }
 
  private void handleRegionClosedEvent() {
    try {
      if(hbEventData == null) {
        hbEventData = new RegionTransitionEventData();
        Writables.getWritable(serializedData, hbEventData);
      }
    } catch (IOException e) {
      LOG.error("Could not deserialize additional args for Close region", e);
    }
View Full Code Here

  }

  private void handleRegionOpenedEvent() {
    try {
      if(hbEventData == null) {
        hbEventData = new RegionTransitionEventData();
        Writables.getWritable(serializedData, hbEventData);
      }
    } catch (IOException e) {
      LOG.error("Could not deserialize additional args for Open region", e);
    }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.executor.RegionTransitionEventData

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.