Package org.apache.hadoop.ha.HAServiceProtocol

Examples of org.apache.hadoop.ha.HAServiceProtocol.HAServiceState


final NamenodeJspHelper.NodeListJsp nodelistjsp = new NamenodeJspHelper.NodeListJsp();
NameNode nn = NameNodeHttpServer.getNameNodeFromContext(application);
String namenodeRole = nn.getRole().toString();
FSNamesystem fsn = nn.getNamesystem();
HAServiceState nnHAState = nn.getServiceState();
boolean isActive = (nnHAState == HAServiceState.ACTIVE);
String namenodeLabel = NamenodeJspHelper.getNameNodeLabel(nn);

      out.write("<!DOCTYPE html>\n<html>\n\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/static/hadoop.css\">\n<title>Hadoop ");
      out.print(namenodeRole);
View Full Code Here



  final NamenodeJspHelper.HealthJsp healthjsp  = new NamenodeJspHelper.HealthJsp();
  NameNode nn = NameNodeHttpServer.getNameNodeFromContext(application);
  FSNamesystem fsn = nn.getNamesystem();
  HAServiceState nnHAState = nn.getServiceState();
  boolean isActive = (nnHAState == HAServiceState.ACTIVE);
  String namenodeRole = nn.getRole().toString();
  String namenodeState = nnHAState.toString();
  String namenodeLabel = nn.getNameNodeAddress().getHostName() + ":" + nn.getNameNodeAddress().getPort();

      out.write("<!DOCTYPE html>\n<html>\n<head>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/static/hadoop.css\">\n<title>Hadoop ");
      out.print(namenodeRole);
      out.write("&nbsp;");
View Full Code Here

      throw new ServiceFailedException("HA for namenode is not enabled");
    }
    if (state == null) {
      return new HAServiceStatus(HAServiceState.INITIALIZING);
    }
    HAServiceState retState = state.getServiceState();
    HAServiceStatus ret = new HAServiceStatus(retState);
    if (retState == HAServiceState.STANDBY) {
      String safemodeTip = namesystem.getSafeModeTip();
      if (!safemodeTip.isEmpty()) {
        ret.setNotReadyToBecomeActive(
View Full Code Here

    Collection<String> rmIds =
        yarnConf.getStringCollection(YarnConfiguration.RM_HA_IDS);
    for (String currentId : rmIds) {
      yarnConf.set(YarnConfiguration.RM_HA_ID, currentId);
      try {
        HAServiceState haState = getHAState(yarnConf);
        if (haState.equals(HAServiceState.ACTIVE)) {
          return currentId;
        }
      } catch (Exception e) {
        // Couldn't check if this RM is active. Do nothing. Worst case,
        // we wouldn't find an Active RM and return null.
View Full Code Here

    yarnConf.set(CommonConfigurationKeys.HADOOP_SECURITY_SERVICE_USER_NAME_KEY,
        yarnConf.get(YarnConfiguration.RM_PRINCIPAL, ""));
    haServiceTarget = new RMHAServiceTarget(yarnConf);
    HAServiceProtocol proto =
        haServiceTarget.getProxy(yarnConf, rpcTimeoutForChecks);
    HAServiceState haState = proto.getServiceStatus().getState();
    return haState;
  }
View Full Code Here

      throw new ServiceFailedException("HA for namenode is not enabled");
    }
    if (state == null) {
      return new HAServiceStatus(HAServiceState.INITIALIZING);
    }
    HAServiceState retState = state.getServiceState();
    HAServiceStatus ret = new HAServiceStatus(retState);
    if (retState == HAServiceState.STANDBY) {
      String safemodeTip = namesystem.getSafeModeTip();
      if (!safemodeTip.isEmpty()) {
        ret.setNotReadyToBecomeActive(
View Full Code Here

      throw new ServiceFailedException("HA for namenode is not enabled");
    }
    if (state == null) {
      return new HAServiceStatus(HAServiceState.INITIALIZING);
    }
    HAServiceState retState = state.getServiceState();
    HAServiceStatus ret = new HAServiceStatus(retState);
    if (retState == HAServiceState.STANDBY) {
      String safemodeTip = namesystem.getSafeModeTip();
      if (!safemodeTip.isEmpty()) {
        ret.setNotReadyToBecomeActive(
View Full Code Here

  }

  @Override // NameNodeStatusMXBean
  public String getState() {
    String servStateStr = "";
    HAServiceState servState = getServiceState();
    if (null != servState) {
      servStateStr = servState.toString();
    }
    return servStateStr;
  }
View Full Code Here

   */


  NameNode nn = NameNodeHttpServer.getNameNodeFromContext(application);
  FSNamesystem fsn = nn.getNamesystem();
  HAServiceState nnHAState = nn.getServiceState();
  boolean isActive = (nnHAState == HAServiceState.ACTIVE);
  String namenodeRole = nn.getRole().toString();
  String namenodeLabel = nn.getNameNodeAddressHostPortString();
  Collection<FSNamesystem.CorruptFileBlockInfo> corruptFileBlocks =
  fsn.listCorruptFileBlocks("/", null);
View Full Code Here


  final NamenodeJspHelper.HealthJsp healthjsp  = new NamenodeJspHelper.HealthJsp();
  NameNode nn = NameNodeHttpServer.getNameNodeFromContext(application);
  FSNamesystem fsn = nn.getNamesystem();
  HAServiceState nnHAState = nn.getServiceState();
  boolean isActive = (nnHAState == HAServiceState.ACTIVE);
  String namenodeRole = nn.getRole().toString();
  String namenodeState = nnHAState.toString();
  String namenodeLabel = nn.getNameNodeAddressHostPortString();

      out.write("<!DOCTYPE html>\n<html>\n<head>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/static/hadoop.css\">\n<title>Hadoop ");
      out.print(namenodeRole);
      out.write("&nbsp;");
View Full Code Here

TOP

Related Classes of org.apache.hadoop.ha.HAServiceProtocol.HAServiceState

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.