Example usage for org.apache.hadoop.yarn.server.api.protocolrecords.impl.pb NodeHeartbeatResponsePBImpl NodeHeartbeatResponsePBImpl

List of usage examples for org.apache.hadoop.yarn.server.api.protocolrecords.impl.pb NodeHeartbeatResponsePBImpl NodeHeartbeatResponsePBImpl

Introduction

In this page you can find the example usage for org.apache.hadoop.yarn.server.api.protocolrecords.impl.pb NodeHeartbeatResponsePBImpl NodeHeartbeatResponsePBImpl.

Prototype

public NodeHeartbeatResponsePBImpl() 

Source Link

Usage

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

License:Apache License

private RMNodeStatusEvent getRMStatusEvent(RMNode node) {
    NodeId id = node.getNodeID();//from   w  ww. j av  a 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  ww w. j a v  a 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);
}