app.getApplicationPriority().getPriority()); entityInfo.put(ApplicationMetricsConstants.AM_NODE_LABEL_EXPRESSION, app.getAmNodeLabelExpression()); entityInfo.put(ApplicationMetricsConstants.APP_NODE_LABEL_EXPRESSION, app.getAppNodeLabelExpression());
when(app.getAMResourceRequests()) .thenReturn(Collections.singletonList(amReq)); when(app.getAmNodeLabelExpression()).thenCallRealMethod(); when(app.getApplicationPriority()).thenReturn(Priority.newInstance(10)); when(app.getCallerContext())
entity.getConfigs().put( ApplicationMetricsConstants.AM_NODE_LABEL_EXPRESSION, app.getAmNodeLabelExpression()); entity.getConfigs().put( ApplicationMetricsConstants.APP_NODE_LABEL_EXPRESSION,
protected RMApp submitApp(String user, String queue, String nodeLabel) throws Exception { RMApp app = mockRM.submitApp(GB, "test-auto-queue-creation" + RandomUtils.nextInt(0, 100), user, null, queue, nodeLabel); Assert.assertEquals(app.getAmNodeLabelExpression(), nodeLabel); // check preconditions List<ApplicationAttemptId> appsInC = cs.getAppsInQueue(PARENT_QUEUE); assertEquals(1, appsInC.size()); assertNotNull(cs.getQueue(queue)); return app; }
Assert.assertEquals(app.getAmNodeLabelExpression(), entity.getOtherInfo() .get(ApplicationMetricsConstants.AM_NODE_LABEL_EXPRESSION));