Example usage for org.apache.hadoop.yarn.server.resourcemanager.rmnode RMNode getHttpPort

List of usage examples for org.apache.hadoop.yarn.server.resourcemanager.rmnode RMNode getHttpPort

Introduction

In this page you can find the example usage for org.apache.hadoop.yarn.server.resourcemanager.rmnode RMNode getHttpPort.

Prototype

public int getHttpPort();

Source Link

Document

the http port for this node

Usage

From source file:org.apache.myriad.scheduler.fgs.NMHeartBeatHandlerTest.java

License:Apache License

private RMNodeStatusEvent getRMStatusEvent(RMNode node) {
    NodeId id = node.getNodeID();//ww w  .  ja va  2  s .c  o  m
    NodeHealthStatus hStatus = NodeHealthStatusPBImpl.newInstance(true, "HEALTHY", System.currentTimeMillis());
    List<ContainerStatus> cStatus = Lists.newArrayList(getContainerStatus(node));
    List<ApplicationId> keepAliveIds = Lists.newArrayList(getApplicationId(node.getHttpPort()));
    NodeHeartbeatResponse response = new NodeHeartbeatResponsePBImpl();

    return new RMNodeStatusEvent(id, hStatus, cStatus, keepAliveIds, response);
}

From source file:org.apache.myriad.TestObjectFactory.java

License:Apache License

public static RMNodeStatusEvent getRMStatusEvent(RMNode node) {
    NodeId id = node.getNodeID();//from  w w w  . java2s .c  o  m
    NodeHealthStatus hStatus = NodeHealthStatusPBImpl.newInstance(true, "HEALTHY", System.currentTimeMillis());
    List<ContainerStatus> cStatus = Lists.newArrayList(getContainerStatus(node));
    List<ApplicationId> keepAliveIds = Lists.newArrayList(getApplicationId(node.getHttpPort()));
    NodeHeartbeatResponse response = new NodeHeartbeatResponsePBImpl();

    return new RMNodeStatusEvent(id, hStatus, cStatus, keepAliveIds, response);
}