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

Adam Antal commented on YARN-10130:
-----------------------------------

Thanks for the review [~snemeth], let me react to your comments.

1. The first, extra "s" was indeed a typo, but this function multiple xml 
files, so I'd like to keep the second "s" character, since it describes better 
what this function actually does.
2. The relative path does work, if it starts with "./". I don't know whether 
the tool supports relative path at all, but since other code places also 
constructs File object out of the String input parameter, it will work the same 
way.
3. Done
4. Done
5. Actually I realized that I totally messed up that function, so I modified a 
few things around there - I hope now it makes more sense.
6. At first I deleted the parts you mentioned, but then I realized that the 
input yarn-site.xml is not necessarily named as "yarn-site.xml" (see tests for 
examples, where the input parameter is named as test-yarn-site.xml). So I think 
it is important to check these cases separately, as in a general case the two 
names do not necessarily match.
7. Indeed, switched them.

> FS-CS converter: Do not allow output dir to be the same as input dir
> --------------------------------------------------------------------
>
>                 Key: YARN-10130
>                 URL: https://issues.apache.org/jira/browse/YARN-10130
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Szilard Nemeth
>            Assignee: Adam Antal
>            Priority: Major
>         Attachments: YARN-10130.001.patch, YARN-10130.002.patch, 
> YARN-10130.003.patch
>
>
> If the input dir where fair-scheduler.xml / yarn-site.xml sits is the same as 
> the output dir (defined by the -o switch), the fs2cs tool overwrites the 
> source config files, i.e. yarn-site.xml.
> Reproduce this is easy, just run fs2cs tool with this command: 
> {code:java}
> /bin/yarn fs2cs --cluster-resource memory-mb=18044928,vcores=16 
> --no-terminal-rule-check -y yarn-site.xml -f fair-scheduler.xml -o .
> {code}
> The following (or similar) is emitted by the tool:
> {code:java}
> WARNING: YARN_OPTS has been replaced by HADOOP_OPTS. Using value of 
> YARN_OPTS.WARNING: YARN_OPTS has been replaced by HADOOP_OPTS. Using value of 
> YARN_OPTS.20/02/10 12:51:42 INFO converter.FSConfigToCSConfigConverter: 
> Output directory for yarn-site.xml and capacity-scheduler.xml is: .20/02/10 
> 12:51:42 INFO converter.FSConfigToCSConfigConverter: Conversion rules file is 
> not defined, using default conversion config!20/02/10 12:51:42 ERROR 
> conf.Configuration: error parsing conf 
> yarn-site.xmlcom.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog at 
> [row,col,system-id]: [1,0,"yarn-site.xml"] at 
> com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:687) at 
> com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2220) at 
> com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2126) 
> at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1181) at 
> org.apache.hadoop.conf.Configuration$Parser.parseNext(Configuration.java:3343)
>  at 
> org.apache.hadoop.conf.Configuration$Parser.parse(Configuration.java:3137) at 
> org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:3030) at 
> org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2996) 
> at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2871) at 
> org.apache.hadoop.conf.Configuration.set(Configuration.java:1389) at 
> org.apache.hadoop.conf.Configuration.set(Configuration.java:1361) at 
> org.apache.hadoop.conf.Configuration.setBoolean(Configuration.java:1702) at 
> org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.converter.FSConfigToCSConfigConverter.createConfiguration(FSConfigToCSConfigConverter.java:166)
>  at 
> org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.converter.FSConfigToCSConfigConverter.convert(FSConfigToCSConfigConverter.java:98)
>  at 
> org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.converter.FSConfigToCSConfigArgumentHandler.parseAndConvert(FSConfigToCSConfigArgumentHandler.java:137)
>  at 
> org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.converter.FSConfigToCSConfigConverterMain.main(FSConfigToCSConfigConverterMain.java:40)20/02/10
>  12:51:42 ERROR converter.FSConfigToCSConfigConverterMain: Error while 
> starting FS configuration conversion!
> {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