Example usage for org.apache.hadoop.yarn.api.records Priority UNDEFINED

List of usage examples for org.apache.hadoop.yarn.api.records Priority UNDEFINED

Introduction

In this page you can find the example usage for org.apache.hadoop.yarn.api.records Priority UNDEFINED.

Prototype

Priority UNDEFINED

To view the source code for org.apache.hadoop.yarn.api.records Priority UNDEFINED.

Click Source Link

Usage

From source file:org.apache.flink.yarn.YarnResourceManagerTest.java

License:Apache License

private static Container mockContainer(String host, int port, int containerId) {
    Container mockContainer = mock(Container.class);

    NodeId mockNodeId = NodeId.newInstance(host, port);
    ContainerId mockContainerId = ContainerId.newInstance(
            ApplicationAttemptId.newInstance(ApplicationId.newInstance(System.currentTimeMillis(), 1), 1),
            containerId);/*from w  ww . j  ava2s  . c o m*/

    when(mockContainer.getId()).thenReturn(mockContainerId);
    when(mockContainer.getNodeId()).thenReturn(mockNodeId);
    when(mockContainer.getResource()).thenReturn(Resource.newInstance(200, 1));
    when(mockContainer.getPriority()).thenReturn(Priority.UNDEFINED);

    return mockContainer;
}