Java Code Examples for org.apache.hadoop.yarn.client.api.AMRMClient.ContainerRequest#getNodes()
The following examples show how to use
org.apache.hadoop.yarn.client.api.AMRMClient.ContainerRequest#getNodes() .
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: BlacklistBasedResourceRequestHandler.java From Bats with Apache License 2.0 | 5 votes |
private void recreateContainerRequest(Map<StreamingContainerAgent.ContainerStartRequest, MutablePair<Integer, ContainerRequest>> requestedResources, int loopCounter, ResourceRequestHandler resourceRequestor, List<ContainerRequest> removedContainerRequests) { for (Map.Entry<StreamingContainerAgent.ContainerStartRequest, MutablePair<Integer, ContainerRequest>> entry : requestedResources.entrySet()) { if ((loopCounter - entry.getValue().getKey()) > NUMBER_MISSED_HEARTBEATS) { StreamingContainerAgent.ContainerStartRequest csr = entry.getKey(); removedContainerRequests.add(entry.getValue().getRight()); ContainerRequest cr = resourceRequestor.createContainerRequest(csr, false); if (cr.getNodes() != null && !cr.getNodes().isEmpty()) { addHostSpecificRequest(csr, cr); } else { otherContainerRequests.put(cr, csr); } } } }
Example 2
Source File: BlacklistBasedResourceRequestHandler.java From Bats with Apache License 2.0 | 5 votes |
@Override public void addContainerRequest(Map<StreamingContainerAgent.ContainerStartRequest, MutablePair<Integer, ContainerRequest>> requestedResources, int loopCounter, List<ContainerRequest> containerRequests, StreamingContainerAgent.ContainerStartRequest csr, ContainerRequest cr) { if (cr.getNodes() != null && !cr.getNodes().isEmpty()) { // Put it in a Map to check if multiple requests can be combined addHostSpecificRequest(csr, cr); } else { LOG.info("No node specific request ", cr); otherContainerRequests.put(cr, csr); } }
Example 3
Source File: BlacklistBasedResourceRequestHandler.java From attic-apex-core with Apache License 2.0 | 5 votes |
private void recreateContainerRequest(Map<StreamingContainerAgent.ContainerStartRequest, MutablePair<Integer, ContainerRequest>> requestedResources, int loopCounter, ResourceRequestHandler resourceRequestor, List<ContainerRequest> removedContainerRequests) { for (Map.Entry<StreamingContainerAgent.ContainerStartRequest, MutablePair<Integer, ContainerRequest>> entry : requestedResources.entrySet()) { if ((loopCounter - entry.getValue().getKey()) > NUMBER_MISSED_HEARTBEATS) { StreamingContainerAgent.ContainerStartRequest csr = entry.getKey(); removedContainerRequests.add(entry.getValue().getRight()); ContainerRequest cr = resourceRequestor.createContainerRequest(csr, false); if (cr.getNodes() != null && !cr.getNodes().isEmpty()) { addHostSpecificRequest(csr, cr); } else { otherContainerRequests.put(cr, csr); } } } }
Example 4
Source File: BlacklistBasedResourceRequestHandler.java From attic-apex-core with Apache License 2.0 | 5 votes |
@Override public void addContainerRequest(Map<StreamingContainerAgent.ContainerStartRequest, MutablePair<Integer, ContainerRequest>> requestedResources, int loopCounter, List<ContainerRequest> containerRequests, StreamingContainerAgent.ContainerStartRequest csr, ContainerRequest cr) { if (cr.getNodes() != null && !cr.getNodes().isEmpty()) { // Put it in a Map to check if multiple requests can be combined addHostSpecificRequest(csr, cr); } else { LOG.info("No node specific request ", cr); otherContainerRequests.put(cr, csr); } }