[ 
https://issues.apache.org/jira/browse/YARN-10674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17297148#comment-17297148
 ] 

Andras Gyori commented on YARN-10674:
-------------------------------------

Hi [~zhuqi] thanks for the patch. I agree with this approach. I think there is 
a typo in the monitor resolution. The 
{code:java}
yarnSiteConfig.set(YarnConfiguration.RM_SCHEDULER_MONITOR_POLICIES,
        yarnSiteConfig.get(YarnConfiguration.
            RM_SCHEDULER_MONITOR_POLICIES) != null ?
            yarnSiteConfig.get(YarnConfiguration.
                RM_SCHEDULER_MONITOR_POLICIES) + "," : ""
            + AutoCreatedQueueDeletionPolicy.
            class.getCanonicalName());
{code}
will not work for the cases, where the monitor policies are set. My suggestion 
is to use something like this, which is more readable in my opinion:
{code:java}
    String policies = 
yarnSiteConfig.get(YarnConfiguration.RM_SCHEDULER_MONITOR_POLICIES);
    if (policies == null) {
      policies = AutoCreatedQueueDeletionPolicy.
          class.getCanonicalName();
    } else {
      policies += "," + AutoCreatedQueueDeletionPolicy.
          class.getCanonicalName();
    }

{code}
Also, could you add a test case for this as well?

> fs2cs: should support auto created queue deletion.
> --------------------------------------------------
>
>                 Key: YARN-10674
>                 URL: https://issues.apache.org/jira/browse/YARN-10674
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Qi Zhu
>            Assignee: Qi Zhu
>            Priority: Major
>         Attachments: YARN-10674.001.patch
>
>
> In FS the auto deletion check interval is 10s.
> {code:java}
> @Override
> public void onCheck() {
>   queueMgr.removeEmptyDynamicQueues();
>   queueMgr.removePendingIncompatibleQueues();
> }
> while (running) {
>   try {
>     synchronized (this) {
>       reloadListener.onCheck();
>     }
> ...
> Thread.sleep(reloadIntervalMs);
> }
> /** Time to wait between checks of the allocation file */
> public static final long ALLOC_RELOAD_INTERVAL_MS = 10 * 1000;{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to