[jira] [Commented] (YARN-10014) Refactor boolean flag based approach in SchedConfCLI#run

2020-01-02 Thread Oleg Bonar (Jira)


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

Oleg Bonar commented on YARN-10014:
---

[~prabhujoseph], thanks for the review. I have just refactored that.

> Refactor boolean flag based approach in SchedConfCLI#run
> 
>
> Key: YARN-10014
> URL: https://issues.apache.org/jira/browse/YARN-10014
> Project: Hadoop YARN
>  Issue Type: Improvement
>Reporter: Prabhu Joseph
>Priority: Major
>
> Boolean-flag based approach in 
> org.apache.hadoop.yarn.client.cli.SchedConfCLI#run: 
> Everything is controlled with boolean flags here.
> The flag hasOption is set to true in each of the if-clauses just to make the 
> condition below the hasOption-conditions happy. The flag is set to true even 
> for parameter that don't have an option (like 'getConf') at all, this is very 
> misleading and hard to understand for the first read.
> Need below refactoring:
> a. Eliminates the hasOption boolean flag
> b. Where an option is misused, fail-fast: Have a method that contains this 
> code and call it for every option, in-place:
> {code}
> if (!hasOption) {
>  System.err.println("Invalid Command Usage: ");
>  printUsage();
>  return -1;
>  }
> {code}
> c. Remove the boolean flags: format and getConf as well. These are 
> unnecessary.
> cc [~snemeth]



--
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



[jira] [Commented] (YARN-9998) Code cleanup in LeveldbConfigurationStore

2019-12-19 Thread Oleg Bonar (Jira)


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

Oleg Bonar commented on YARN-9998:
--

HI [~snemeth]. Is this still needed? If so, can I take it?

> Code cleanup in LeveldbConfigurationStore
> -
>
> Key: YARN-9998
> URL: https://issues.apache.org/jira/browse/YARN-9998
> Project: Hadoop YARN
>  Issue Type: Improvement
>Reporter: Szilard Nemeth
>Assignee: Szilard Nemeth
>Priority: Minor
>
> Many things can be improved:
> * Field compactionTimer could be a local variable
> * Field versiondb should be camelcase
> * initDatabase is a very long method: Initialize db / versionDb should be in 
> separate methods, split this method into smaller chunks
> * Remove TODOs
> * Remove duplicated code block in 
> LeveldbConfigurationStore.CompactionTimerTask
> * Any other cleanup



--
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



[jira] [Commented] (YARN-10014) Refactor boolean flag based approach in SchedConfCLI#run

2019-12-09 Thread Oleg Bonar (Jira)


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

Oleg Bonar commented on YARN-10014:
---

Need a review. Thanks.

> Refactor boolean flag based approach in SchedConfCLI#run
> 
>
> Key: YARN-10014
> URL: https://issues.apache.org/jira/browse/YARN-10014
> Project: Hadoop YARN
>  Issue Type: Improvement
>Reporter: Prabhu Joseph
>Priority: Major
>
> Boolean-flag based approach in 
> org.apache.hadoop.yarn.client.cli.SchedConfCLI#run: 
> Everything is controlled with boolean flags here.
> The flag hasOption is set to true in each of the if-clauses just to make the 
> condition below the hasOption-conditions happy. The flag is set to true even 
> for parameter that don't have an option (like 'getConf') at all, this is very 
> misleading and hard to understand for the first read.
> Need below refactoring:
> a. Eliminates the hasOption boolean flag
> b. Where an option is misused, fail-fast: Have a method that contains this 
> code and call it for every option, in-place:
> {code}
> if (!hasOption) {
>  System.err.println("Invalid Command Usage: ");
>  printUsage();
>  return -1;
>  }
> {code}
> c. Remove the boolean flags: format and getConf as well. These are 
> unnecessary.
> cc [~snemeth]



--
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



[jira] [Comment Edited] (YARN-9781) SchedConfCli to get current stored scheduler configuration

2019-12-09 Thread Oleg Bonar (Jira)


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

Oleg Bonar edited comment on YARN-9781 at 12/9/19 10:07 AM:


Hi [~snemeth]! I'm not sure if it is off-topic or not but you said

??What I don't like is that this flag is set to true even for parameter that 
don't have an option (like your new one, 'getConf') at all??.
 It seems that there is a little misunderstanding on the meaning of the flag. 
Please see my comment and proposals on YARN-10014.


was (Author: oleg_bonar):
Hi [~snemeth]! I'm not sure if it is offtopic or not but you said

??What I don't like is that this flag is set to true even for parameter that 
don't have an option (like your new one, 'getConf') at all??.
 It seems that there is a little misunderstanding on the meaning of the flag. 
Please see my comment and proposals on YARN-10014.

> SchedConfCli to get current stored scheduler configuration
> --
>
> Key: YARN-9781
> URL: https://issues.apache.org/jira/browse/YARN-9781
> Project: Hadoop YARN
>  Issue Type: Sub-task
>  Components: capacity scheduler
>Affects Versions: 3.3.0
>Reporter: Prabhu Joseph
>Assignee: Prabhu Joseph
>Priority: Major
> Fix For: 3.3.0
>
> Attachments: YARN-9781-001.patch, YARN-9781-002.patch, 
> YARN-9781-003.patch, YARN-9781-004.patch, YARN-9781-005.patch, 
> YARN-9781-006.patch, YARN-9781-007.patch, YARN-9781-008.patch
>
>
> SchedConfCLI currently allows to add / remove / remove queue. It does not 
> support get configuration which RMWebServices provides as part of YARN-8559.



--
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



[jira] [Comment Edited] (YARN-9781) SchedConfCli to get current stored scheduler configuration

2019-12-09 Thread Oleg Bonar (Jira)


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

Oleg Bonar edited comment on YARN-9781 at 12/9/19 10:06 AM:


Hi [~snemeth]! I'm not sure if it is offtopic or not but you said

??What I don't like is that this flag is set to true even for parameter that 
don't have an option (like your new one, 'getConf') at all??.
 It seems that there is a little misunderstanding on the meaning of the flag. 
Please see my comment and proposals on YARN-10014.


was (Author: oleg_bonar):
Hi [~snemeth]! I'm not sure if it is oftopic or not but you said

??What I don't like is that this flag is set to true even for parameter that 
don't have an option (like your new one, 'getConf') at all??.
 It seems that there is a little misunderstanding on the meaning of the flag. 
Please see my comment and proposals on YARN-10014.

> SchedConfCli to get current stored scheduler configuration
> --
>
> Key: YARN-9781
> URL: https://issues.apache.org/jira/browse/YARN-9781
> Project: Hadoop YARN
>  Issue Type: Sub-task
>  Components: capacity scheduler
>Affects Versions: 3.3.0
>Reporter: Prabhu Joseph
>Assignee: Prabhu Joseph
>Priority: Major
> Fix For: 3.3.0
>
> Attachments: YARN-9781-001.patch, YARN-9781-002.patch, 
> YARN-9781-003.patch, YARN-9781-004.patch, YARN-9781-005.patch, 
> YARN-9781-006.patch, YARN-9781-007.patch, YARN-9781-008.patch
>
>
> SchedConfCLI currently allows to add / remove / remove queue. It does not 
> support get configuration which RMWebServices provides as part of YARN-8559.



--
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



[jira] [Commented] (YARN-9781) SchedConfCli to get current stored scheduler configuration

2019-12-09 Thread Oleg Bonar (Jira)


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

Oleg Bonar commented on YARN-9781:
--

Hi [~snemeth]! I'm not sure if it is oftopic or not but you said

??What I don't like is that this flag is set to true even for parameter that 
don't have an option (like your new one, 'getConf') at all??.
 It seems that there is a little misunderstanding on the meaning of the flag. 
Please see my comment and proposals on YARN-10014.

> SchedConfCli to get current stored scheduler configuration
> --
>
> Key: YARN-9781
> URL: https://issues.apache.org/jira/browse/YARN-9781
> Project: Hadoop YARN
>  Issue Type: Sub-task
>  Components: capacity scheduler
>Affects Versions: 3.3.0
>Reporter: Prabhu Joseph
>Assignee: Prabhu Joseph
>Priority: Major
> Fix For: 3.3.0
>
> Attachments: YARN-9781-001.patch, YARN-9781-002.patch, 
> YARN-9781-003.patch, YARN-9781-004.patch, YARN-9781-005.patch, 
> YARN-9781-006.patch, YARN-9781-007.patch, YARN-9781-008.patch
>
>
> SchedConfCLI currently allows to add / remove / remove queue. It does not 
> support get configuration which RMWebServices provides as part of YARN-8559.



--
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



[jira] [Commented] (YARN-10014) Refactor boolean flag based approach in SchedConfCLI#run

2019-12-06 Thread Oleg Bonar (Jira)


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

Oleg Bonar commented on YARN-10014:
---

[~prabhujoseph], looks like we must preserve the ability to pass multiple (add, 
remove, etc.) options in one command call. And hasOption flag does exactly that.

If we indeed want to get rid of hasOption flag we may do a pre-check to look if 
any of mandatory options are set and fail overwise. What do you think?

> Refactor boolean flag based approach in SchedConfCLI#run
> 
>
> Key: YARN-10014
> URL: https://issues.apache.org/jira/browse/YARN-10014
> Project: Hadoop YARN
>  Issue Type: Improvement
>Reporter: Prabhu Joseph
>Priority: Major
>
> Boolean-flag based approach in 
> org.apache.hadoop.yarn.client.cli.SchedConfCLI#run: 
> Everything is controlled with boolean flags here.
> The flag hasOption is set to true in each of the if-clauses just to make the 
> condition below the hasOption-conditions happy. The flag is set to true even 
> for parameter that don't have an option (like 'getConf') at all, this is very 
> misleading and hard to understand for the first read.
> Need below refactoring:
> a. Eliminates the hasOption boolean flag
> b. Where an option is misused, fail-fast: Have a method that contains this 
> code and call it for every option, in-place:
> {code}
> if (!hasOption) {
>  System.err.println("Invalid Command Usage: ");
>  printUsage();
>  return -1;
>  }
> {code}
> c. Remove the boolean flags: format and getConf as well. These are 
> unnecessary.
> cc [~snemeth]



--
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



[jira] [Commented] (YARN-10014) Refactor boolean flag based approach in SchedConfCLI#run

2019-12-06 Thread Oleg Bonar (Jira)


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

Oleg Bonar commented on YARN-10014:
---

Ok. I'm working on this issue.

> Refactor boolean flag based approach in SchedConfCLI#run
> 
>
> Key: YARN-10014
> URL: https://issues.apache.org/jira/browse/YARN-10014
> Project: Hadoop YARN
>  Issue Type: Improvement
>Reporter: Prabhu Joseph
>Priority: Major
>
> Boolean-flag based approach in 
> org.apache.hadoop.yarn.client.cli.SchedConfCLI#run: 
> Everything is controlled with boolean flags here.
> The flag hasOption is set to true in each of the if-clauses just to make the 
> condition below the hasOption-conditions happy. The flag is set to true even 
> for parameter that don't have an option (like 'getConf') at all, this is very 
> misleading and hard to understand for the first read.
> Need below refactoring:
> a. Eliminates the hasOption boolean flag
> b. Where an option is misused, fail-fast: Have a method that contains this 
> code and call it for every option, in-place:
> {code}
> if (!hasOption) {
>  System.err.println("Invalid Command Usage: ");
>  printUsage();
>  return -1;
>  }
> {code}
> c. Remove the boolean flags: format and getConf as well. These are 
> unnecessary.
> cc [~snemeth]



--
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



[jira] [Commented] (YARN-10014) Refactor boolean flag based approach in SchedConfCLI#run

2019-12-06 Thread Oleg Bonar (Jira)


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

Oleg Bonar commented on YARN-10014:
---

Hi [~prabhujoseph]! May I take this one to get started with contributing?

> Refactor boolean flag based approach in SchedConfCLI#run
> 
>
> Key: YARN-10014
> URL: https://issues.apache.org/jira/browse/YARN-10014
> Project: Hadoop YARN
>  Issue Type: Improvement
>Reporter: Prabhu Joseph
>Priority: Major
>
> Boolean-flag based approach in 
> org.apache.hadoop.yarn.client.cli.SchedConfCLI#run: 
> Everything is controlled with boolean flags here.
> The flag hasOption is set to true in each of the if-clauses just to make the 
> condition below the hasOption-conditions happy. The flag is set to true even 
> for parameter that don't have an option (like 'getConf') at all, this is very 
> misleading and hard to understand for the first read.
> Need below refactoring:
> a. Eliminates the hasOption boolean flag
> b. Where an option is misused, fail-fast: Have a method that contains this 
> code and call it for every option, in-place:
> {code}
> if (!hasOption) {
>  System.err.println("Invalid Command Usage: ");
>  printUsage();
>  return -1;
>  }
> {code}
> c. Remove the boolean flags: format and getConf as well. These are 
> unnecessary.
> cc [~snemeth]



--
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