SLIDER-480. Add a fun test to ensure that containers are restarted on nodes with correct labels
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/0419a5a9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/0419a5a9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/0419a5a9 Branch: refs/heads/feature/SLIDER-149_Support_a_YARN_service_registry Commit: 0419a5a90afea0e3e7eab0f2d5ea09ab5aad7f89 Parents: 961e170 Author: Sumit Mohanty <[email protected]> Authored: Mon Oct 6 21:12:36 2014 -0700 Committer: Sumit Mohanty <[email protected]> Committed: Mon Oct 6 21:12:36 2014 -0700 ---------------------------------------------------------------------- .../AppsThroughAgentQueueAndLabelsIT.groovy | 26 ++++++++++++++++++++ 1 file changed, 26 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/0419a5a9/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AppsThroughAgentQueueAndLabelsIT.groovy ---------------------------------------------------------------------- diff --git a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AppsThroughAgentQueueAndLabelsIT.groovy b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AppsThroughAgentQueueAndLabelsIT.groovy index f3f6612..a3b0ccb 100644 --- a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AppsThroughAgentQueueAndLabelsIT.groovy +++ b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AppsThroughAgentQueueAndLabelsIT.groovy @@ -29,6 +29,32 @@ import org.apache.slider.funtest.framework.SliderShell import org.junit.After import org.junit.Test +/** + * SETUP FOR THE TEST + * Create valid labels, red and blue [yarn rmadmin -addLabels red,blue] + * Add nodes with label [yarn rmadmin -setNodeToLabels host1:blue] + * Perform refresh queue [yarn rmadmin -refreshQueues] + * + * Create a queue with access to labels - these are changes to capacity scheduler configuration + * Add a queue in addition to default + * yarn.scheduler.capacity.root.queues=default,labeled + * Provide capacity, take out from default + * yarn.scheduler.capacity.root.labeled.capacity=80 + * yarn.scheduler.capacity.root.default.capacity=20 + * Provide standard queue specs + * yarn.scheduler.capacity.root.labeled.state=RUNNING + * yarn.scheduler.capacity.root.labeled.maximum-capacity=80 + * Have queue access the label + * yarn.scheduler.capacity.root.labeled.labels=red,blue + * + * After specifying the new configuration call refresh [yarn rmadmin -refreshQueues] + * + * See resources_queue_labels.json for label configuration required for the test + * Label expression for slider-appmaster is also the default for all containers + * if they do not specify own label expressions + * "yarn.label.expression":"red" + * + */ @CompileStatic @Slf4j public class AppsThroughAgentQueueAndLabelsIT extends AgentCommandTestBase
