[
https://issues.apache.org/jira/browse/OOZIE-3081?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16198532#comment-16198532
]
Peter Bacsko commented on OOZIE-3081:
-------------------------------------
Looks good. Two things:
1. Weird formatting:
{noformat}
+ else {
+ assertEquals("test", queue);
+ } }
{noformat}
2. If it's possible to import, you can use the constant
{{org.apache.hadoop.yarn.conf.YarnConfiguration.RM_SCHEDULER}} in order to
avoid the property being hard-coded.
> testSubmitWithLauncherQueue fails when FairScheduler is used
> ------------------------------------------------------------
>
> Key: OOZIE-3081
> URL: https://issues.apache.org/jira/browse/OOZIE-3081
> Project: Oozie
> Issue Type: Bug
> Components: tests
> Affects Versions: 5.0.0
> Reporter: Attila Sasvari
> Assignee: Attila Sasvari
> Priority: Trivial
> Attachments: OOZIE-3081-001.patch
>
>
> Running TestJavaActionExecutor fails with fair scheduler
> {code}
> Failed tests:
> testSubmitWithLauncherQueue(org.apache.oozie.action.hadoop.TestJavaActionExecutor):
>
> expected:<[]test> but was:<[root.]test>
> {code}
> Reason: FairScheduler adds a "root." prefix to the queue name in
> [org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.QueueManager.ensureRootPrefix()|https://github.com/apache/hadoop/blob/99292adcefdc6b8f280b8e100605fb39f755c38a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/QueueManager.java#L165]
> A potential way to fix the test case:
> - we can add a new function
> {code}
> private boolean isFairSchedulerUsed(Configuration conf) {
> return
> conf.get("yarn.resourcemanager.scheduler.class").contains(FairScheduler.class.getName());
> }
> {code}
> that can be called from {{testSubmitWithLauncherQueue()}}:
> {code}
> ...
> if (isFairSchedulerUsed(conf)) {
> assertEquals("root.test", queue);
> }
> else {
> assertEquals("test", queue);
> }
> ...
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)