YARN-8678. Queue Management API - rephrase error messages. Contributed by Prabhu Joseph.

This commit is contained in:
Abhishek Modi 2019-09-01 10:00:04 +05:30
parent d2d963f3d4
commit c7ef4fb74a
3 changed files with 7 additions and 7 deletions

View File

@ -629,8 +629,8 @@ public abstract class AbstractCSQueue implements CSQueue {
&& parentState != QueueState.RUNNING) {
throw new IllegalArgumentException(
"The parent queue:" + parent.getQueueName()
+ " state is STOPPED, child queue:" + queueName
+ " state cannot be RUNNING.");
+ " cannot be STOPPED as the child queue:" + queueName
+ " is in RUNNING state.");
} else {
updateQueueState(configuredState);
}

View File

@ -323,9 +323,9 @@ public class CapacitySchedulerQueueManager implements SchedulerQueueManager<
LOG.info("Deleting Queue " + queueName + ", as it is not"
+ " present in the modified capacity configuration xml");
} else{
throw new IOException(oldQueue.getQueuePath() + " is deleted from"
+ " the new capacity scheduler configuration, but the"
+ " queue is not yet in stopped state. " + "Current State : "
throw new IOException(oldQueue.getQueuePath() + " cannot be"
+ " deleted from the capacity scheduler configuration, as the"
+ " queue is not yet in stopped state. Current State : "
+ oldQueue.getState());
}
} else if (!oldQueue.getQueuePath().equals(newQueue.getQueuePath())) {

View File

@ -109,8 +109,8 @@ public class TestQueueState {
Assert.fail("Should throw an Exception.");
} catch (Exception ex) {
Assert.assertTrue(ex.getCause().getMessage().contains(
"The parent queue:q1 state is STOPPED, "
+ "child queue:q2 state cannot be RUNNING."));
"The parent queue:q1 cannot be STOPPED as the child" +
" queue:q2 is in RUNNING state."));
}
}