Java Code Examples for org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse#newInstance()
The following examples show how to use
org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse#newInstance() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ProtocolHATestBase.java From hadoop with Apache License 2.0 | 5 votes |
public RegisterApplicationMasterResponse createFakeRegisterApplicationMasterResponse() { Resource minCapability = Resource.newInstance(2048, 2, 0); Resource maxCapability = Resource.newInstance(4096, 4, 4); Map<ApplicationAccessType, String> acls = new HashMap<ApplicationAccessType, String>(); acls.put(ApplicationAccessType.MODIFY_APP, "*"); ByteBuffer key = ByteBuffer.wrap("fake_key".getBytes()); return RegisterApplicationMasterResponse.newInstance(minCapability, maxCapability, acls, key, new ArrayList<Container>(), "root", new ArrayList<NMToken>()); }
Example 2
Source File: TestRMContainerAllocator.java From hadoop with Apache License 2.0 | 5 votes |
@Override public RegisterApplicationMasterResponse registerApplicationMaster( RegisterApplicationMasterRequest request) throws YarnException, IOException { return RegisterApplicationMasterResponse.newInstance( Resource.newInstance(512, 1), Resource.newInstance(512000, 1024), Collections.<ApplicationAccessType,String>emptyMap(), ByteBuffer.wrap("fake_key".getBytes()), Collections.<Container>emptyList(), "default", Collections.<NMToken>emptyList()); }
Example 3
Source File: ProtocolHATestBase.java From big-c with Apache License 2.0 | 5 votes |
public RegisterApplicationMasterResponse createFakeRegisterApplicationMasterResponse() { Resource minCapability = Resource.newInstance(2048, 2); Resource maxCapability = Resource.newInstance(4096, 4); Map<ApplicationAccessType, String> acls = new HashMap<ApplicationAccessType, String>(); acls.put(ApplicationAccessType.MODIFY_APP, "*"); ByteBuffer key = ByteBuffer.wrap("fake_key".getBytes()); return RegisterApplicationMasterResponse.newInstance(minCapability, maxCapability, acls, key, new ArrayList<Container>(), "root", new ArrayList<NMToken>()); }
Example 4
Source File: TestRMContainerAllocator.java From big-c with Apache License 2.0 | 5 votes |
@Override public RegisterApplicationMasterResponse registerApplicationMaster( RegisterApplicationMasterRequest request) throws YarnException, IOException { return RegisterApplicationMasterResponse.newInstance( Resource.newInstance(512, 1), Resource.newInstance(512000, 1024), Collections.<ApplicationAccessType,String>emptyMap(), ByteBuffer.wrap("fake_key".getBytes()), Collections.<Container>emptyList(), "default", Collections.<NMToken>emptyList()); }