[jira] [Comment Edited] (YARN-9899) Migration tool that help to generate CS config based on FS config [Phase 2]

2019-10-30 Thread Peter Bacsko (Jira)


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

Peter Bacsko edited comment on YARN-9899 at 10/30/19 2:59 PM:
--

[~snemeth] this is the help text that you get with this patch:

{noformat}
usage: General options are:
 -c,--cluster-resourceNeeds to be given if maxResources is
   defined as percentages for any queue,
   otherwise this parameter can be omitted.
 -f,--fsconfigPath to a valid fair-scheduler.xml config
   file
 -h,--help Displays the list of options
 -o,--output-directoryOutput directory for yarn-site.xml and
   capacity-scheduler.xml files.Must have
   write permission for user who is running
   this script.
 -p,--printIf defined, the converted configuration
   will only be emitted to the console.
 -r,--rulesconfig Optional parameter. If given, should
   specify a valid path to the conversion
   rules file (property format).
 -y,--yarnsiteconfig  Path to a valid yarn-site.xml config file
{noformat}

I will address your comments soon.


was (Author: pbacsko):
[~snemeth] this is the help text that you get with this patch:

{noformat}
usage: General options are:
 -c,--cluster-resourceNeeds to be given if maxResources is
   defined as percentages for any queue,
   otherwise this parameter can be omitted.
 -f,--fsconfigPath to a valid fair-scheduler.xml config
   file
 -h,--help Displays the list of options
 -o,--output-directoryOutput directory for yarn-site.xml and
   capacity-scheduler.xml files.Must have
   write permission for user who is running
   this script.
 -p,--printIf defined, the converted configuration
   will only be emitted to the console.
 -r,--rulesconfig Optional parameter. If given, should
   specify a valid path to the conversion
   rules file (property format).
 -y,--yarnsiteconfig  Path to a valid yarn-site.xml config file
{noformat}

> Migration tool that help to generate CS config based on FS config [Phase 2] 
> 
>
> Key: YARN-9899
> URL: https://issues.apache.org/jira/browse/YARN-9899
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Reporter: Szilard Nemeth
>Assignee: Peter Bacsko
>Priority: Major
> Attachments: YARN-9899-001.patch, YARN-9899-002.patch
>
>
> YARN-9699 laid down the groundworks of a converter from FS to CS config.
> During the development of the converter, we came up with the following things 
> to fix. 
> 1. If we don't specify a mandatory option, we have this stacktrace for 
> example:
>  
> {code:java}
> org.apache.commons.cli.MissingOptionException: Missing required option: o
>  at org.apache.commons.cli.Parser.checkRequiredOptions(Parser.java:299)
>  at org.apache.commons.cli.Parser.parse(Parser.java:231)
>  at org.apache.commons.cli.Parser.parse(Parser.java:85)
>  at 
> org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.converter.FSConfigToCSConfigArgumentHandler.parseAndConvert(FSConfigToCSConfigArgumentHandler.java:100)
>  at 
> org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.main(ResourceManager.java:1572){code}
>  
> We should provide a more concise and meaningful error message (without 
> stacktrace on the CLI, but we should log the exception with stacktrace to the 
> RM log).
> An explanation of the missing option is also required.
> 2. We may think about how to handle exceptions from commons CLI: 
> MissingArgumentException vs. MissingOptionException
> 3. We need to provide a -h / --help option for the CLI that prints all the 
> possible options / arguments.
> 4. Last but not least: We should move the CLI command to a more reasonable 
> place:
> As YARN-9699 implemented it, the command can be invoked like: 
> {code:java}
> /opt/hadoop/bin/yarn resourcemanager -convert-fs-configuration -y 
> /opt/hadoop/etc/hadoop/yarn-site.xml -f 
> /opt/hadoop/etc/hadoop/fair-scheduler.xml -r 
> ~systest/sample-rules-config.properties -o /tmp/fs-cs-output
> {code}
> This is problematic, as if YARN RM is already running, we need to stop it in 
> order to start the RM again with the conversion switch.
> 5. Add unit test coverage for {{QueuePlacementConverter}}
> 6. 

[jira] [Comment Edited] (YARN-9899) Migration tool that help to generate CS config based on FS config [Phase 2]

2019-10-14 Thread Peter Bacsko (Jira)


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

Peter Bacsko edited comment on YARN-9899 at 10/14/19 8:29 PM:
--

[~snemeth] my proposal is:
 # Modify {{hadoop-yarn-project/hadoop-yarn/bin/yarn}} and make 
{{convert-fs-configuration}} a true subcommand, not a switch for Resource 
Manager.
 # Providing help (-h / --help): it's not trivial. Since you define required 
CLI switches, you end up with an exception if you only give "-h". Possible 
solutions:
 ** Abandon using required properties for {{GnuParser}} and then check manually 
whether the required ones have been defined.
 ** Switch to another parser library which can recognize -h or --help
 ** Parse the arguments by hand (I don't recommend this)
 ** Just give up on the "help" switch - if we catch an exception from the 
parser, we print out the usage (see here: 
[https://github.com/apache/hadoop/blob/7b57f2f71fbaa5af4897309597cca70a95b04edd/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/GenericOptionsParser.java#L575-L579])
 # Exception handling: it's simple, we just have to catch {{ParseException}} 
which is a parent of {{MissingArgumentException}} and 
{{MissingOptionException}}.


was (Author: pbacsko):
[~snemeth] my proposal is:
 # Modify {{hadoop-yarn-project/hadoop-yarn/bin/yarn}} and make 
{{convert-fs-configuration}} a true subcommand, not a switch for Resource 
Manager.
 # Providing help (-h / --help): it's not trivial. Since you define required 
CLI switches, you end up with an exception if you only give "-h". Possible 
solutions:
 ** Abandon using required properties for {{GnuParser}} and then check manually 
whether the required ones have been defined.
 ** Switch to another parser library which can recognize {{-h}} or {{--help}}
 ** Parse the arguments by hand (I don't recommend this)
 ** Just give up on the "help" switch - if we catch an exception from the 
parser, we print out the usage (see here: 
[https://github.com/apache/hadoop/blob/7b57f2f71fbaa5af4897309597cca70a95b04edd/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/GenericOptionsParser.java#L575-L579])
 # Exception handling: it's simple, we just have to catch {{ParseException}} 
which is a parent of {{MissingArgumentException}} and 
{{MissingOptionException}}.

> Migration tool that help to generate CS config based on FS config [Phase 2] 
> 
>
> Key: YARN-9899
> URL: https://issues.apache.org/jira/browse/YARN-9899
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Reporter: Szilard Nemeth
>Assignee: Peter Bacsko
>Priority: Major
>
> YARN-9699 laid down the groundworks of a converter from FS to CS config.
> During the development of the converter, we came up with the following things 
> to fix. 
> 1. If we don't specify a mandatory option, we have this stacktrace for 
> example:
>  
> {code:java}
> org.apache.commons.cli.MissingOptionException: Missing required option: o
>  at org.apache.commons.cli.Parser.checkRequiredOptions(Parser.java:299)
>  at org.apache.commons.cli.Parser.parse(Parser.java:231)
>  at org.apache.commons.cli.Parser.parse(Parser.java:85)
>  at 
> org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.converter.FSConfigToCSConfigArgumentHandler.parseAndConvert(FSConfigToCSConfigArgumentHandler.java:100)
>  at 
> org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.main(ResourceManager.java:1572){code}
>  
> We should provide a more concise and meaningful error message (without 
> stacktrace on the CLI, but we should log the exception with stacktrace to the 
> RM log).
> An explanation of the missing option is also required.
> 2. We may think about how to handle exceptions from commons CLI: 
> MissingArgumentException vs. MissingOptionException
> 3. We need to provide a -h / --help option for the CLI that prints all the 
> possible options / arguments.
> 4. Last but not least: We should move the CLI command to a more reasonable 
> place:
> As YARN-9699 implemented it, the command can be invoked like: 
> {code:java}
> /opt/hadoop/bin/yarn resourcemanager -convert-fs-configuration -y 
> /opt/hadoop/etc/hadoop/yarn-site.xml -f 
> /opt/hadoop/etc/hadoop/fair-scheduler.xml -r 
> ~systest/sample-rules-config.properties -o /tmp/fs-cs-output
> {code}
> This is problematic, as if YARN RM is already running, we need to stop it in 
> order to start the RM again with the conversion switch.
>  
> 5. Close some feature gaps.
>  



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

[jira] [Comment Edited] (YARN-9899) Migration tool that help to generate CS config based on FS config [Phase 2]

2019-10-14 Thread Peter Bacsko (Jira)


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

Peter Bacsko edited comment on YARN-9899 at 10/14/19 8:28 PM:
--

[~snemeth] my proposal is:
 # Modify {{hadoop-yarn-project/hadoop-yarn/bin/yarn}} and make 
{{convert-fs-configuration}} a true subcommand, not a switch for Resource 
Manager.
 # Providing help (-h / --help): it's not trivial. Since you define required 
CLI switches, you end up with an exception if you only give "-h". Possible 
solutions:
 ** Abandon using required properties for {{GnuParser}} and then check manually 
whether the required ones have been defined.
 ** Switch to another parser library which can recognize {{-h}} or {{--help}}
 ** Parse the arguments by hand (I don't recommend this)
 ** Just give up on the "help" switch - if we catch an exception from the 
parser, we print out the usage (see here: 
[https://github.com/apache/hadoop/blob/7b57f2f71fbaa5af4897309597cca70a95b04edd/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/GenericOptionsParser.java#L575-L579])
 # Exception handling: it's simple, we just have to catch {{ParseException}} 
which is a parent of {{MissingArgumentException}} and 
{{MissingOptionException}}.


was (Author: pbacsko):
[~snemeth] my proposal is:
 # Modify {{hadoop-yarn-project/hadoop-yarn/bin/yarn}} and make 
{{convert-fs-configuration}} a true subcommand, not a switch for Resource 
Manager.
 # Providing help (-h / --help): it's not trivial. Since you define required 
CLI switches, you end up with an exception if you only give "-h". Possible 
solutions:
 ** Abandon using required properties for {{GnuParser}} and then check manually 
whether the required ones have been defined.
 ** Switch to another parser library which can recognize {{-h-}} or {{-help}}
 ** Parse the arguments by hand (I don't recommend this)
 ** Just give up on the "help" switch - if we catch an exception from the 
parser, we print out the usage (see here: 
[https://github.com/apache/hadoop/blob/7b57f2f71fbaa5af4897309597cca70a95b04edd/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/GenericOptionsParser.java#L575-L579])
 # Exception handling: it's simple, we just have to catch {{ParseException}} 
which is a parent of {{MissingArgumentException}} and 
{{MissingOptionException}}.

> Migration tool that help to generate CS config based on FS config [Phase 2] 
> 
>
> Key: YARN-9899
> URL: https://issues.apache.org/jira/browse/YARN-9899
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Reporter: Szilard Nemeth
>Assignee: Peter Bacsko
>Priority: Major
>
> YARN-9699 laid down the groundworks of a converter from FS to CS config.
> During the development of the converter, we came up with the following things 
> to fix. 
> 1. If we don't specify a mandatory option, we have this stacktrace for 
> example:
>  
> {code:java}
> org.apache.commons.cli.MissingOptionException: Missing required option: o
>  at org.apache.commons.cli.Parser.checkRequiredOptions(Parser.java:299)
>  at org.apache.commons.cli.Parser.parse(Parser.java:231)
>  at org.apache.commons.cli.Parser.parse(Parser.java:85)
>  at 
> org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.converter.FSConfigToCSConfigArgumentHandler.parseAndConvert(FSConfigToCSConfigArgumentHandler.java:100)
>  at 
> org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.main(ResourceManager.java:1572){code}
>  
> We should provide a more concise and meaningful error message (without 
> stacktrace on the CLI, but we should log the exception with stacktrace to the 
> RM log).
> An explanation of the missing option is also required.
> 2. We may think about how to handle exceptions from commons CLI: 
> MissingArgumentException vs. MissingOptionException
> 3. We need to provide a -h / --help option for the CLI that prints all the 
> possible options / arguments.
> 4. Last but not least: We should move the CLI command to a more reasonable 
> place:
> As YARN-9699 implemented it, the command can be invoked like: 
> {code:java}
> /opt/hadoop/bin/yarn resourcemanager -convert-fs-configuration -y 
> /opt/hadoop/etc/hadoop/yarn-site.xml -f 
> /opt/hadoop/etc/hadoop/fair-scheduler.xml -r 
> ~systest/sample-rules-config.properties -o /tmp/fs-cs-output
> {code}
> This is problematic, as if YARN RM is already running, we need to stop it in 
> order to start the RM again with the conversion switch.
>  
> 5. Close some feature gaps.
>  



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

[jira] [Comment Edited] (YARN-9899) Migration tool that help to generate CS config based on FS config [Phase 2]

2019-10-14 Thread Peter Bacsko (Jira)


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

Peter Bacsko edited comment on YARN-9899 at 10/14/19 2:40 PM:
--

[~snemeth] my proposal is:
 # Modify {{hadoop-yarn-project/hadoop-yarn/bin/yarn}} and make 
{{convert-fs-configuration}} a true subcommand, not a switch for Resource 
Manager.
 # Providing help (-h / --help): it's not trivial. Since you define required 
CLI switches, you end up with an exception if you only give "-h". Possible 
solutions:
 ** Abandon using required properties for {{GnuParser}} and then check manually 
whether the required ones have been defined.
 ** Switch to another parser library which can recognize {{-h-}} or {{-help}}
 ** Parse the arguments by hand (I don't recommend this)
 ** Just give up on the "help" switch - if we catch an exception from the 
parser, we print out the usage (see here: 
[https://github.com/apache/hadoop/blob/7b57f2f71fbaa5af4897309597cca70a95b04edd/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/GenericOptionsParser.java#L575-L579])
 # Exception handling: it's simple, we just have to catch {{ParseException}} 
which is a parent of {{MissingArgumentException}} and 
{{MissingOptionException}}.


was (Author: pbacsko):
[~snemeth] my proposal is:
 # Modify {{hadoop-yarn-project/hadoop-yarn/bin/yarn}} and make 
{{convert-fs-configuration}} a true subcommand, not a switch for Resource 
Manager.
 # Providing help (-h / --help): it's not trivial. Since you define required 
properties, you end up with an exception if you only give "-h". Possible 
solutions:
 ** Abandon using required properties for {{GnuParser}} and then check manually 
whether the required ones have been defined.
 ** Switch to another parser library which can recognize {{-h}} or {{--help}}
 ** Parse the arguments by hand (I don't recommend this)
 ** Just give up on the "help" switch - if we catch an exception from the 
parser, we print out the usage (see here: 
[https://github.com/apache/hadoop/blob/7b57f2f71fbaa5af4897309597cca70a95b04edd/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/GenericOptionsParser.java#L575-L579])
 # Exception handling: it's simple, we just have to catch {{ParseException}} 
which is a parent of {{MissingArgumentException}} and 
{{MissingOptionException}}.

> Migration tool that help to generate CS config based on FS config [Phase 2] 
> 
>
> Key: YARN-9899
> URL: https://issues.apache.org/jira/browse/YARN-9899
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Reporter: Szilard Nemeth
>Assignee: Peter Bacsko
>Priority: Major
>
> YARN-9699 laid down the groundworks of a converter from FS to CS config.
> During the development of the converter, we came up with the following things 
> to fix. 
> 1. If we don't specify a mandatory option, we have this stacktrace for 
> example:
>  
> {code:java}
> org.apache.commons.cli.MissingOptionException: Missing required option: o
>  at org.apache.commons.cli.Parser.checkRequiredOptions(Parser.java:299)
>  at org.apache.commons.cli.Parser.parse(Parser.java:231)
>  at org.apache.commons.cli.Parser.parse(Parser.java:85)
>  at 
> org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.converter.FSConfigToCSConfigArgumentHandler.parseAndConvert(FSConfigToCSConfigArgumentHandler.java:100)
>  at 
> org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.main(ResourceManager.java:1572){code}
>  
> We should provide a more concise and meaningful error message (without 
> stacktrace on the CLI, but we should log the exception with stacktrace to the 
> RM log).
> An explanation of the missing option is also required.
> 2. We may think about how to handle exceptions from commons CLI: 
> MissingArgumentException vs. MissingOptionException
> 3. We need to provide a -h / --help option for the CLI that prints all the 
> possible options / arguments.
> 4. Last but not least: We should move the CLI command to a more reasonable 
> place:
> As YARN-9699 implemented it, the command can be invoked like: 
> {code:java}
> /opt/hadoop/bin/yarn resourcemanager -convert-fs-configuration -y 
> /opt/hadoop/etc/hadoop/yarn-site.xml -f 
> /opt/hadoop/etc/hadoop/fair-scheduler.xml -r 
> ~systest/sample-rules-config.properties -o /tmp/fs-cs-output
> {code}
> This is problematic, as if YARN RM is already running, we need to stop it in 
> order to start the RM again with the conversion switch.
>  
> 5. Close some feature gaps.
>  



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