Java Code Examples for org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerApplicationAttempt#getApplicationId()
The following examples show how to use
org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerApplicationAttempt#getApplicationId() .
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: FSSchedulerNode.java From hadoop with Apache License 2.0 | 6 votes |
@Override public synchronized void unreserveResource( SchedulerApplicationAttempt application) { // Cannot unreserve for wrong application... ApplicationAttemptId reservedApplication = getReservedContainer().getContainer().getId().getApplicationAttemptId(); if (!reservedApplication.equals( application.getApplicationAttemptId())) { throw new IllegalStateException("Trying to unreserve " + " for application " + application.getApplicationId() + " when currently reserved " + " for application " + reservedApplication.getApplicationId() + " on node " + this); } setReservedContainer(null); this.reservedAppSchedulable = null; }
Example 2
Source File: FSSchedulerNode.java From big-c with Apache License 2.0 | 6 votes |
@Override public synchronized void unreserveResource( SchedulerApplicationAttempt application) { // Cannot unreserve for wrong application... ApplicationAttemptId reservedApplication = getReservedContainer().getContainer().getId().getApplicationAttemptId(); if (!reservedApplication.equals( application.getApplicationAttemptId())) { throw new IllegalStateException("Trying to unreserve " + " for application " + application.getApplicationId() + " when currently reserved " + " for application " + reservedApplication.getApplicationId() + " on node " + this); } setReservedContainer(null); this.reservedAppSchedulable = null; }
Example 3
Source File: FSSchedulerNode.java From hadoop with Apache License 2.0 | 5 votes |
@Override public synchronized void reserveResource( SchedulerApplicationAttempt application, Priority priority, RMContainer container) { // Check if it's already reserved RMContainer reservedContainer = getReservedContainer(); if (reservedContainer != null) { // Sanity check if (!container.getContainer().getNodeId().equals(getNodeID())) { throw new IllegalStateException("Trying to reserve" + " container " + container + " on node " + container.getReservedNode() + " when currently" + " reserved resource " + reservedContainer + " on node " + reservedContainer.getReservedNode()); } // Cannot reserve more than one application on a given node! if (!reservedContainer.getContainer().getId().getApplicationAttemptId() .equals(container.getContainer().getId().getApplicationAttemptId())) { throw new IllegalStateException("Trying to reserve" + " container " + container + " for application " + application.getApplicationId() + " when currently" + " reserved container " + reservedContainer + " on node " + this); } LOG.info("Updated reserved container " + container.getContainer().getId() + " on node " + this + " for application " + application); } else { LOG.info("Reserved container " + container.getContainer().getId() + " on node " + this + " for application " + application); } setReservedContainer(container); this.reservedAppSchedulable = (FSAppAttempt) application; }
Example 4
Source File: FSSchedulerNode.java From big-c with Apache License 2.0 | 5 votes |
@Override public synchronized void reserveResource( SchedulerApplicationAttempt application, Priority priority, RMContainer container) { // Check if it's already reserved RMContainer reservedContainer = getReservedContainer(); if (reservedContainer != null) { // Sanity check if (!container.getContainer().getNodeId().equals(getNodeID())) { throw new IllegalStateException("Trying to reserve" + " container " + container + " on node " + container.getReservedNode() + " when currently" + " reserved resource " + reservedContainer + " on node " + reservedContainer.getReservedNode()); } // Cannot reserve more than one application on a given node! if (!reservedContainer.getContainer().getId().getApplicationAttemptId() .equals(container.getContainer().getId().getApplicationAttemptId())) { throw new IllegalStateException("Trying to reserve" + " container " + container + " for application " + application.getApplicationId() + " when currently" + " reserved container " + reservedContainer + " on node " + this); } LOG.info("Updated reserved container " + container.getContainer().getId() + " on node " + this + " for application " + application); } else { LOG.info("Reserved container " + container.getContainer().getId() + " on node " + this + " for application " + application); } setReservedContainer(container); this.reservedAppSchedulable = (FSAppAttempt) application; }