|
@@ -870,8 +870,8 @@ public class TestApplicationLimits {
|
|
+ "submission of application: " + app3.getApplicationId(),
|
|
+ "submission of application: " + app3.getApplicationId(),
|
|
app3.getDiagnostics().toString());
|
|
app3.getDiagnostics().toString());
|
|
|
|
|
|
- // based on Global limit of queue usert application is rejected
|
|
|
|
- RMApp app11 = MockRMAppSubmitter.submit(rm,
|
|
|
|
|
|
+ // based on per user max app settings, app should be rejected instantly
|
|
|
|
+ RMApp app13 = MockRMAppSubmitter.submit(rm,
|
|
MockRMAppSubmissionData.Builder.createWithMemory(GB, rm)
|
|
MockRMAppSubmissionData.Builder.createWithMemory(GB, rm)
|
|
.withAppName("app")
|
|
.withAppName("app")
|
|
.withUser("user")
|
|
.withUser("user")
|
|
@@ -880,36 +880,36 @@ public class TestApplicationLimits {
|
|
.withWaitForAppAcceptedState(false)
|
|
.withWaitForAppAcceptedState(false)
|
|
.build());
|
|
.build());
|
|
rm.drainEvents();
|
|
rm.drainEvents();
|
|
- rm.waitForState(app11.getApplicationId(), RMAppState.ACCEPTED);
|
|
|
|
- assertEquals(RMAppState.ACCEPTED, app11.getState());
|
|
|
|
- RMApp app12 = MockRMAppSubmitter.submit(rm,
|
|
|
|
|
|
+ rm.waitForState(app13.getApplicationId(), RMAppState.FAILED);
|
|
|
|
+ assertEquals(RMAppState.FAILED, app13.getState());
|
|
|
|
+ assertEquals(
|
|
|
|
+ "org.apache.hadoop.security.AccessControlException: Queue"
|
|
|
|
+ + " root.d already has 0 applications from user user cannot"
|
|
|
|
+ + " accept submission of application: " + app13.getApplicationId(),
|
|
|
|
+ app13.getDiagnostics().toString());
|
|
|
|
+
|
|
|
|
+ RMApp app11 = MockRMAppSubmitter.submit(rm,
|
|
MockRMAppSubmissionData.Builder.createWithMemory(GB, rm)
|
|
MockRMAppSubmissionData.Builder.createWithMemory(GB, rm)
|
|
.withAppName("app")
|
|
.withAppName("app")
|
|
- .withUser("user")
|
|
|
|
|
|
+ .withUser("user2")
|
|
.withAcls(null)
|
|
.withAcls(null)
|
|
- .withQueue("d")
|
|
|
|
|
|
+ .withQueue("a2")
|
|
.withWaitForAppAcceptedState(false)
|
|
.withWaitForAppAcceptedState(false)
|
|
.build());
|
|
.build());
|
|
rm.drainEvents();
|
|
rm.drainEvents();
|
|
- rm.waitForState(app12.getApplicationId(), RMAppState.ACCEPTED);
|
|
|
|
- assertEquals(RMAppState.ACCEPTED, app12.getState());
|
|
|
|
- RMApp app13 = MockRMAppSubmitter.submit(rm,
|
|
|
|
|
|
+ rm.waitForState(app11.getApplicationId(), RMAppState.ACCEPTED);
|
|
|
|
+ assertEquals(RMAppState.ACCEPTED, app11.getState());
|
|
|
|
+ RMApp app12 = MockRMAppSubmitter.submit(rm,
|
|
MockRMAppSubmissionData.Builder.createWithMemory(GB, rm)
|
|
MockRMAppSubmissionData.Builder.createWithMemory(GB, rm)
|
|
.withAppName("app")
|
|
.withAppName("app")
|
|
- .withUser("user")
|
|
|
|
|
|
+ .withUser("user2")
|
|
.withAcls(null)
|
|
.withAcls(null)
|
|
- .withQueue("d")
|
|
|
|
|
|
+ .withQueue("a2")
|
|
.withWaitForAppAcceptedState(false)
|
|
.withWaitForAppAcceptedState(false)
|
|
.build());
|
|
.build());
|
|
rm.drainEvents();
|
|
rm.drainEvents();
|
|
- rm.waitForState(app13.getApplicationId(), RMAppState.FAILED);
|
|
|
|
- assertEquals(RMAppState.FAILED, app13.getState());
|
|
|
|
- assertEquals(
|
|
|
|
- "org.apache.hadoop.security.AccessControlException: Queue"
|
|
|
|
- + " root.d already has 2 applications from user user cannot"
|
|
|
|
- + " accept submission of application: " + app13.getApplicationId(),
|
|
|
|
- app13.getDiagnostics().toString());
|
|
|
|
-
|
|
|
|
|
|
+ rm.waitForState(app12.getApplicationId(), RMAppState.ACCEPTED);
|
|
|
|
+ assertEquals(RMAppState.ACCEPTED, app12.getState());
|
|
// based on system max limit application is rejected
|
|
// based on system max limit application is rejected
|
|
RMApp app14 = MockRMAppSubmitter.submit(rm,
|
|
RMApp app14 = MockRMAppSubmitter.submit(rm,
|
|
MockRMAppSubmissionData.Builder.createWithMemory(GB, rm)
|
|
MockRMAppSubmissionData.Builder.createWithMemory(GB, rm)
|
|
@@ -938,7 +938,6 @@ public class TestApplicationLimits {
|
|
app15.getDiagnostics().toString());
|
|
app15.getDiagnostics().toString());
|
|
|
|
|
|
rm.killApp(app2.getApplicationId());
|
|
rm.killApp(app2.getApplicationId());
|
|
- rm.killApp(app11.getApplicationId());
|
|
|
|
rm.killApp(app13.getApplicationId());
|
|
rm.killApp(app13.getApplicationId());
|
|
rm.killApp(app14.getApplicationId());
|
|
rm.killApp(app14.getApplicationId());
|
|
rm.stop();
|
|
rm.stop();
|