hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Bacsko (Jira)" <j...@apache.org>
Subject [jira] [Commented] (YARN-10674) fs2cs: should support auto created queue deletion.
Date Thu, 18 Mar 2021 10:33:00 GMT

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

Peter Bacsko commented on YARN-10674:
-------------------------------------

Thanks [~zhuqi] for the patch. I think we are very close.

I still have some comments:
 1.
{noformat}
	  private FSConfigToCSConfigConverterParams.
	      PreemptionMode disablePreemption;
	  private FSConfigToCSConfigConverterParams.
	      PreemptionMode preemptionMode;
{noformat}
We don't need two enums. We need only one which covers all states (enabled / observeonly /
nopolicy).

You can extend {{PreemptionMode}} with a new variable which says whether it's enabled or disabled:
{noformat}
  public enum PreemptionMode {
    ENABLE("enable", true),
    NO_POLICY("nopolicy", false),
    OBSERVE_ONLY("observeonly", false);

    private String cliOption;
    private boolean enabled;

    PreemptionMode(String cliOption, boolean enabled) {
      this.cliOption = cliOption;
      this.enabled = enabled;
    }

    public String getCliOption() {
      return cliOption;
    }

    public boolean isEnabled() {
      return enabled;
    }
{noformat}
So you just call {{preemptionMode.isEnabled()}} and don't need two variables just to hold
the information whether it's enabled or not.

2. {{public static PreemptionMode fromString(String cliOption)}} --> this method never
returns ENABLED, which is important (also, pls change "ENABLE" to "ENABLED", note the "D"
at the end).

cc [~gandras] please review patch v14.

> 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
>              Labels: fs2cs
>         Attachments: YARN-10674.001.patch, YARN-10674.002.patch, YARN-10674.003.patch,
YARN-10674.004.patch, YARN-10674.005.patch, YARN-10674.006.patch, YARN-10674.007.patch, YARN-10674.008.patch,
YARN-10674.009.patch, YARN-10674.010.patch, YARN-10674.011.patch, YARN-10674.012.patch, YARN-10674.013.patch,
YARN-10674.014.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-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org


Mime
View raw message