当前位置: 首页>>代码示例>>Java>>正文


Java InvalidStateTransitonException类代码示例

本文整理汇总了Java中org.apache.hadoop.yarn.state.InvalidStateTransitonException的典型用法代码示例。如果您正苦于以下问题:Java InvalidStateTransitonException类的具体用法?Java InvalidStateTransitonException怎么用?Java InvalidStateTransitonException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


InvalidStateTransitonException类属于org.apache.hadoop.yarn.state包,在下文中一共展示了InvalidStateTransitonException类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: handle

import org.apache.hadoop.yarn.state.InvalidStateTransitonException; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void handle(PSAttemptEvent event) {
  if (LOG.isDebugEnabled()) {
    LOG.debug("Processing " + event.getPSAttemptId() + " of type " + event.getType());
  }
  writeLock.lock();
  try {
    final PSAttemptStateInternal oldState = getInternalState();
    try {
      stateMachine.doTransition(event.getType(), event);
    } catch (InvalidStateTransitonException e) {
      LOG.error("Can't handle this event at current state for " + this.attemptId, e);
      context.getEventHandler()
          .handle(
              new InternalErrorEvent(context.getApplicationId(), "Invalid event :"
                  + event.getType()));
    }
    if (oldState != getInternalState()) {
      LOG.info(attemptId + " PSAttempt Transitioned from " + oldState + " to "
          + getInternalState());
    }
  } finally {
    writeLock.unlock();
  }
}
 
开发者ID:Tencent,项目名称:angel,代码行数:27,代码来源:PSAttempt.java

示例2: handle

import org.apache.hadoop.yarn.state.InvalidStateTransitonException; //导入依赖的package包/类
@Override
public void handle(PSAgentAttemptEvent event) {
  LOG.debug("Processing " + event.getId() + " of type " + event.getType());
  writeLock.lock();
  try {
    final PSAgentAttemptState oldState = getState();
    try {
      stateMachine.doTransition(event.getType(), event);
    } catch (InvalidStateTransitonException e) {

    }
    if (oldState != getState()) {
      LOG.info(event.getId() + " AMPSAgent Transitioned from " + oldState + " to " + getState());
    }
  } finally {
    writeLock.unlock();
  }
}
 
开发者ID:Tencent,项目名称:angel,代码行数:19,代码来源:PSAgentAttempt.java

示例3: handle

import org.apache.hadoop.yarn.state.InvalidStateTransitonException; //导入依赖的package包/类
@Override
public void handle(WorkerAttemptEvent event) {
  LOG.debug("Processing " + event.getWorkerAttemptId() + " of type " + event.getType());

  writeLock.lock();
  try {
    final WorkerAttemptState oldState = getState();
    try {
      stateMachine.doTransition(event.getType(), event);
    } catch (InvalidStateTransitonException e) {
      LOG.error(e.getMessage());
    }
    if (oldState != getState()) {
      LOG.info(event.getWorkerAttemptId() + " psserver Transitioned from " + oldState + " to "
          + getState());
    }
  } finally {
    writeLock.unlock();
  }
}
 
开发者ID:Tencent,项目名称:angel,代码行数:21,代码来源:WorkerAttempt.java

示例4: handle

import org.apache.hadoop.yarn.state.InvalidStateTransitonException; //导入依赖的package包/类
@Override
public void handle(AMWorkerGroupEvent event) {
  LOG.debug("Processing " + event.getGroupId() + " of type " + event.getType());

  try {
    writeLock.lock();
    final AMWorkerGroupState oldState = getState();
    try {
      stateMachine.doTransition(event.getType(), event);
    } catch (InvalidStateTransitonException e) {

    }
    if (oldState != getState()) {
      LOG.info(event.getGroupId() + " psserver Transitioned from " + oldState + " to "
          + getState());
    }
  } finally {
    writeLock.unlock();
  }
}
 
开发者ID:Tencent,项目名称:angel,代码行数:21,代码来源:AMWorkerGroup.java

示例5: handle

import org.apache.hadoop.yarn.state.InvalidStateTransitonException; //导入依赖的package包/类
@Override
public void handle(ResourceEvent event) {
  try {
    this.writeLock.lock();

    Path resourcePath = event.getLocalResourceRequest().getPath();
    LOG.debug("Processing " + resourcePath + " of type " + event.getType());

    ResourceState oldState = this.stateMachine.getCurrentState();
    ResourceState newState = null;
    try {
      newState = this.stateMachine.doTransition(event.getType(), event);
    } catch (InvalidStateTransitonException e) {
      LOG.warn("Can't handle this event at current state", e);
    }
    if (oldState != newState) {
      LOG.info("Resource " + resourcePath + (localPath != null ? 
        "(->" + localPath + ")": "") + " transitioned from " + oldState
          + " to " + newState);
    }
  } finally {
    this.writeLock.unlock();
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:25,代码来源:LocalizedResource.java

示例6: handle

import org.apache.hadoop.yarn.state.InvalidStateTransitonException; //导入依赖的package包/类
@Override
public void handle(ApplicationEvent event) {

  this.writeLock.lock();

  try {
    ApplicationId applicationID = event.getApplicationID();
    LOG.debug("Processing " + applicationID + " of type " + event.getType());

    ApplicationState oldState = stateMachine.getCurrentState();
    ApplicationState newState = null;
    try {
      // queue event requesting init of the same app
      newState = stateMachine.doTransition(event.getType(), event);
    } catch (InvalidStateTransitonException e) {
      LOG.warn("Can't handle this event at current state", e);
    }
    if (oldState != newState) {
      LOG.info("Application " + applicationID + " transitioned from "
          + oldState + " to " + newState);
    }
  } finally {
    this.writeLock.unlock();
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:26,代码来源:ApplicationImpl.java

示例7: handle

import org.apache.hadoop.yarn.state.InvalidStateTransitonException; //导入依赖的package包/类
@Override
public void handle(ContainerEvent event) {
  try {
    this.writeLock.lock();

    ContainerId containerID = event.getContainerID();
    LOG.debug("Processing " + containerID + " of type " + event.getType());

    ContainerState oldState = stateMachine.getCurrentState();
    ContainerState newState = null;
    try {
      newState =
          stateMachine.doTransition(event.getType(), event);
    } catch (InvalidStateTransitonException e) {
      LOG.warn("Can't handle this event at current state: Current: ["
          + oldState + "], eventType: [" + event.getType() + "]", e);
    }
    if (oldState != newState) {
      LOG.info("Container " + containerID + " transitioned from "
          + oldState
          + " to " + newState);
    }
  } finally {
    this.writeLock.unlock();
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:27,代码来源:ContainerImpl.java

示例8: handle

import org.apache.hadoop.yarn.state.InvalidStateTransitonException; //导入依赖的package包/类
@Override
public void handle(RMContainerEvent event) {
  LOG.debug("Processing " + event.getContainerId() + " of type " + event.getType());
  try {
    writeLock.lock();
    RMContainerState oldState = getState();
    try {
       stateMachine.doTransition(event.getType(), event);
    } catch (InvalidStateTransitonException e) {
      LOG.error("Can't handle this event at current state", e);
      LOG.error("Invalid event " + event.getType() + 
          " on container " + this.containerId);
    }
    if (oldState != getState()) {
      LOG.info(event.getContainerId() + " Container Transitioned from "
          + oldState + " to " + getState());
    }
  }
  
  finally {
    writeLock.unlock();
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:24,代码来源:RMContainerImpl.java

示例9: handle

import org.apache.hadoop.yarn.state.InvalidStateTransitonException; //导入依赖的package包/类
public void handle(RMNodeEvent event) {
  LOG.debug("Processing " + event.getNodeId() + " of type " + event.getType());
  try {
    writeLock.lock();
    NodeState oldState = getState();
    try {
       stateMachine.doTransition(event.getType(), event);
    } catch (InvalidStateTransitonException e) {
      LOG.error("Can't handle this event at current state", e);
      LOG.error("Invalid event " + event.getType() + 
          " on Node  " + this.nodeId);
    }
    if (oldState != getState()) {
      LOG.info(nodeId + " Node Transitioned from " + oldState + " to "
               + getState());
    }
  }
  
  finally {
    writeLock.unlock();
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:23,代码来源:RMNodeImpl.java

示例10: handle

import org.apache.hadoop.yarn.state.InvalidStateTransitonException; //导入依赖的package包/类
@Override
public void handle(RMAppEvent event) {

  this.writeLock.lock();

  try {
    ApplicationId appID = event.getApplicationId();
    LOG.debug("Processing event for " + appID + " of type "
        + event.getType());
    final RMAppState oldState = getState();
    try {
      /* keep the master in sync with the state machine */
      this.stateMachine.doTransition(event.getType(), event);
    } catch (InvalidStateTransitonException e) {
      LOG.error("Can't handle this event at current state", e);
      /* TODO fail the application on the failed transition */
    }

    if (oldState != getState()) {
      LOG.info(appID + " State change from " + oldState + " to "
          + getState());
    }
  } finally {
    this.writeLock.unlock();
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:27,代码来源:RMAppImpl.java

示例11: handle

import org.apache.hadoop.yarn.state.InvalidStateTransitonException; //导入依赖的package包/类
@Override
public void handle(RMAppAttemptEvent event) {

  this.writeLock.lock();

  try {
    ApplicationAttemptId appAttemptID = event.getApplicationAttemptId();
    LOG.debug("Processing event for " + appAttemptID + " of type "
        + event.getType());
    final RMAppAttemptState oldState = getAppAttemptState();
    try {
      /* keep the master in sync with the state machine */
      this.stateMachine.doTransition(event.getType(), event);
    } catch (InvalidStateTransitonException e) {
      LOG.error("Can't handle this event at current state", e);
      /* TODO fail the application on the failed transition */
    }

    if (oldState != getAppAttemptState()) {
      LOG.info(appAttemptID + " State change from " + oldState + " to "
          + getAppAttemptState());
    }
  } finally {
    this.writeLock.unlock();
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:27,代码来源:RMAppAttemptImpl.java

示例12: handleStoreEvent

import org.apache.hadoop.yarn.state.InvalidStateTransitonException; //导入依赖的package包/类
protected void handleStoreEvent(RMStateStoreEvent event) {
  this.writeLock.lock();
  try {

    if (LOG.isDebugEnabled()) {
      LOG.debug("Processing event of type " + event.getType());
    }

    final RMStateStoreState oldState = getRMStateStoreState();

    this.stateMachine.doTransition(event.getType(), event);

    if (oldState != getRMStateStoreState()) {
      LOG.info("RMStateStore state change from " + oldState + " to "
          + getRMStateStoreState());
    }

  } catch (InvalidStateTransitonException e) {
    LOG.error("Can't handle this event at current state", e);
  } finally {
    this.writeLock.unlock();
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:24,代码来源:RMStateStore.java

示例13: handle

import org.apache.hadoop.yarn.state.InvalidStateTransitonException; //导入依赖的package包/类
@Override
public void handle(TaskEvent event) {
  if (LOG.isDebugEnabled()) {
    LOG.debug("Processing " + event.getTaskID() + " of type "
        + event.getType());
  }
  try {
    writeLock.lock();
    TaskStateInternal oldState = getInternalState();
    try {
      stateMachine.doTransition(event.getType(), event);
    } catch (InvalidStateTransitonException e) {
      LOG.error("Can't handle this event at current state for "
          + this.taskId, e);
      internalError(event.getType());
    }
    if (oldState != getInternalState()) {
      LOG.info(taskId + " Task Transitioned from " + oldState + " to "
          + getInternalState());
    }

  } finally {
    writeLock.unlock();
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:26,代码来源:TaskImpl.java

示例14: handle

import org.apache.hadoop.yarn.state.InvalidStateTransitonException; //导入依赖的package包/类
@Override
public void handle(ResourceEvent event) {
  try {
    this.writeLock.lock();

    Path resourcePath = event.getLocalResourceRequest().getPath();
    LOG.debug("Processing " + resourcePath + " of type " + event.getType());

    ResourceState oldState = this.stateMachine.getCurrentState();
    ResourceState newState = null;
    try {
      newState = this.stateMachine.doTransition(event.getType(), event);
    } catch (InvalidStateTransitonException e) {
      LOG.warn("Can't handle this event at current state", e);
    }
    if (oldState != newState) {
      LOG.info("Resource " + resourcePath + " transitioned from "
          + oldState
          + " to " + newState);
    }
  } finally {
    this.writeLock.unlock();
  }
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:25,代码来源:LocalizedResource.java


注:本文中的org.apache.hadoop.yarn.state.InvalidStateTransitonException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。