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


Java HAServiceProtocol.StateChangeRequestInfo方法代码示例

本文整理汇总了Java中org.apache.hadoop.ha.HAServiceProtocol.StateChangeRequestInfo方法的典型用法代码示例。如果您正苦于以下问题:Java HAServiceProtocol.StateChangeRequestInfo方法的具体用法?Java HAServiceProtocol.StateChangeRequestInfo怎么用?Java HAServiceProtocol.StateChangeRequestInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.ha.HAServiceProtocol的用法示例。


在下文中一共展示了HAServiceProtocol.StateChangeRequestInfo方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: transitionToStandby

import org.apache.hadoop.ha.HAServiceProtocol; //导入方法依赖的package包/类
@Override
public synchronized void transitionToStandby(
    HAServiceProtocol.StateChangeRequestInfo reqInfo) throws IOException {
  // call refreshAdminAcls before HA state transition
  // for the case that adminAcls have been updated in previous active RM
  try {
    refreshAdminAcls(false);
  } catch (YarnException ex) {
    throw new ServiceFailedException("Can not execute refreshAdminAcls", ex);
  }
  UserGroupInformation user = checkAccess("transitionToStandby");
  checkHaStateChange(reqInfo);
  try {
    rm.transitionToStandby(true);
    RMAuditLogger.logSuccess(user.getShortUserName(),
        "transitionToStandby", "RMHAProtocolService");
  } catch (Exception e) {
    RMAuditLogger.logFailure(user.getShortUserName(), "transitionToStandby",
        "", "RMHAProtocolService",
        "Exception transitioning to standby");
    throw new ServiceFailedException(
        "Error when transitioning to Standby mode", e);
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:25,代码来源:AdminService.java

示例2: transitionToStandby

import org.apache.hadoop.ha.HAServiceProtocol; //导入方法依赖的package包/类
@Override
public synchronized void transitionToStandby(
    HAServiceProtocol.StateChangeRequestInfo reqInfo) throws IOException {
  // call refreshAdminAcls before HA state transition
  // for the case that adminAcls have been updated in previous active RM
  try {
    refreshAdminAcls(false);
  } catch (YarnException ex) {
    throw new ServiceFailedException("Can not execute refreshAdminAcls", ex);
  }
  UserGroupInformation user = checkAccess("transitionToStandby");
  checkHaStateChange(reqInfo);
  try {
    rm.transitionToStandby(true);
    RMAuditLogger.logSuccess(user.getShortUserName(),
        "transitionToStandby", "RMHAProtocolService");
  } catch (Exception e) {
    RMAuditLogger.logFailure(user.getShortUserName(), "transitionToStandby",
        adminAcl.toString(), "RMHAProtocolService",
        "Exception transitioning to standby");
    throw new ServiceFailedException(
        "Error when transitioning to Standby mode", e);
  }
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:25,代码来源:AdminService.java

示例3: transitionToStandby

import org.apache.hadoop.ha.HAServiceProtocol; //导入方法依赖的package包/类
@Override
public synchronized void transitionToStandby(
    HAServiceProtocol.StateChangeRequestInfo reqInfo) throws IOException {
  // call refreshAdminAcls before HA state transition
  // for the case that adminAcls have been updated in previous active RM
  try {
    refreshAdminAcls(false);
  } catch (YarnException ex) {
    throw new ServiceFailedException("Can not execute refreshAdminAcls", ex);
  }
  UserGroupInformation user = checkAccess("transitionToStandby");
  checkHaStateChange(reqInfo);
  try {
    rm.transitionToStandby(true);
    RMAuditLogger.logSuccess(user.getShortUserName(),
        "transitionToStandby", "RM");
  } catch (Exception e) {
    RMAuditLogger.logFailure(user.getShortUserName(), "transitionToStandby",
        "", "RM",
        "Exception transitioning to standby");
    throw new ServiceFailedException(
        "Error when transitioning to Standby mode", e);
  }
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:25,代码来源:AdminService.java

示例4: transitionToActive

import org.apache.hadoop.ha.HAServiceProtocol; //导入方法依赖的package包/类
@Override
public synchronized void transitionToActive(
    HAServiceProtocol.StateChangeRequestInfo reqInfo) throws IOException {
  // call refreshAdminAcls before HA state transition
  // for the case that adminAcls have been updated in previous active RM
  try {
    refreshAdminAcls(false);
  } catch (YarnException ex) {
    throw new ServiceFailedException("Can not execute refreshAdminAcls", ex);
  }

  UserGroupInformation user = checkAccess("transitionToActive");
  checkHaStateChange(reqInfo);
  try {
    rm.transitionToActive();
    // call all refresh*s for active RM to get the updated configurations.
    refreshAll();
    RMAuditLogger.logSuccess(user.getShortUserName(),
        "transitionToActive", "RMHAProtocolService");
  } catch (Exception e) {
    RMAuditLogger.logFailure(user.getShortUserName(), "transitionToActive",
        "", "RMHAProtocolService",
        "Exception transitioning to active");
    throw new ServiceFailedException(
        "Error when transitioning to Active mode", e);
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:28,代码来源:AdminService.java

示例5: transitionToActive

import org.apache.hadoop.ha.HAServiceProtocol; //导入方法依赖的package包/类
@Override
public synchronized void transitionToActive(
    HAServiceProtocol.StateChangeRequestInfo reqInfo) throws IOException {
  // call refreshAdminAcls before HA state transition
  // for the case that adminAcls have been updated in previous active RM
  try {
    refreshAdminAcls(false);
  } catch (YarnException ex) {
    throw new ServiceFailedException("Can not execute refreshAdminAcls", ex);
  }

  UserGroupInformation user = checkAccess("transitionToActive");
  checkHaStateChange(reqInfo);
  try {
    rm.transitionToActive();
    // call all refresh*s for active RM to get the updated configurations.
    refreshAll();
    RMAuditLogger.logSuccess(user.getShortUserName(),
        "transitionToActive", "RMHAProtocolService");
  } catch (Exception e) {
    RMAuditLogger.logFailure(user.getShortUserName(), "transitionToActive",
        adminAcl.toString(), "RMHAProtocolService",
        "Exception transitioning to active");
    throw new ServiceFailedException(
        "Error when transitioning to Active mode", e);
  }
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:28,代码来源:AdminService.java

示例6: transitionToActive

import org.apache.hadoop.ha.HAServiceProtocol; //导入方法依赖的package包/类
@Override
public synchronized void transitionToActive(
    HAServiceProtocol.StateChangeRequestInfo reqInfo) throws IOException {
  // call refreshAdminAcls before HA state transition
  // for the case that adminAcls have been updated in previous active RM
  try {
    refreshAdminAcls(false);
  } catch (YarnException ex) {
    throw new ServiceFailedException("Can not execute refreshAdminAcls", ex);
  }
  throw new UnsupportedOperationException("not implemented yet");
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:13,代码来源:GroupMembershipService.java

示例7: transitionToStandby

import org.apache.hadoop.ha.HAServiceProtocol; //导入方法依赖的package包/类
@Override
public synchronized void transitionToStandby(
    HAServiceProtocol.StateChangeRequestInfo reqInfo) throws IOException {
  // call refreshAdminAcls before HA state transition
  // for the case that adminAcls have been updated in previous active RM
  try {
    refreshAdminAcls(false);
  } catch (YarnException ex) {
    throw new ServiceFailedException("Can not execute refreshAdminAcls", ex);
  }
  throw new UnsupportedOperationException("not implemented yet");
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:13,代码来源:GroupMembershipService.java


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