List of usage examples for org.apache.hadoop.yarn.api.records Container getResource
@Public @Stable public abstract Resource getResource();
Resource
allocated to the container. From source file:org.springframework.yarn.boot.MockUtils.java
License:Apache License
public static Container getMockContainer(ContainerId containerId, NodeId nodeId, Resource resource, Priority priority) {//from w w w .j a v a2 s. c om Container container = mock(Container.class); when(container.getId()).thenReturn(containerId); when(container.getNodeId()).thenReturn(nodeId); when(container.getResource()).thenReturn(resource); when(container.getPriority()).thenReturn(priority); return container; }