[
https://issues.apache.org/jira/browse/YARN-10507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17243813#comment-17243813
]
Andras Gyori commented on YARN-10507:
-------------------------------------
Thank you [~pbacsko] for the patch! The overall logic seems good to me, but I
have some minor addition to this:
* Console Mode and File Mode together confused me at first, but later found
out, that console mode works as a dry run option. However, warning message is
not extended to mapping-rules.json, like in the case of other xml
configurations. It might be a good idea to give a sign of this behaviour.
* A very minor nit, but getOutputStreamForJson could be reduced a little bit
to this:
{code:java}
if (consoleMode && rulesToFile) {
return System.out;
} else if (rulesToFile) {
File mappingRulesFile = new File(outputDirectory,
MAPPING_RULES_JSON);
return new FileOutputStream(mappingRulesFile);
} else {
return new ByteArrayOutputStream();
}{code}
* In TestFSConfigToCSConfigConverter, this line is not used anymore, I suppose:
{code:java}
ByteArrayOutputStream jsonOutStream = new ByteArrayOutputStream();
converter.setMappingRulesOutputStream(jsonOutStream);
{code}
Because you are getting the json file from the config afterwards as a string.
> Add the capability to fs2cs to write the converted placement rules inside
> capacity-scheduler.xml
> ------------------------------------------------------------------------------------------------
>
> Key: YARN-10507
> URL: https://issues.apache.org/jira/browse/YARN-10507
> Project: Hadoop YARN
> Issue Type: Sub-task
> Reporter: Peter Bacsko
> Assignee: Peter Bacsko
> Priority: Major
> Labels: fs2cs
> Attachments: YARN-10507-001.patch, YARN-10507-002.patch,
> YARN-10507-003.patch, YARN-10507-004.patch, YARN-10507-005.patch,
> YARN-10507-006.patch
>
>
> Currently, fs2cs tool generates a separate {{mapping-rules.json}} file when
> it converts the placement rules.
> However, we also support having the JSON inlined inside
> {{capacity-scheduler.xml}}. Add a command line switch so that we can choose
> the desired output.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]