[
https://issues.apache.org/jira/browse/HADOOP-9818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13730545#comment-13730545
]
Kousuke Saruta commented on HADOOP-9818:
----------------------------------------
I'm writing the test for DF and I've noticed things which may be defects.
1. DF#getFilesystem() behaves differently depending on calling the method
before / after calling DF#getMount().
I think that is because getMount() calls DF#run() and DF#parseOutput() but
getFilesystem() don't.
2. DF#getMount() calls DF#run(). Thus, df command will be executed every we
call DF#getMount().
I think it's inefficient. Why only getMount() calls run() in itself?
I think run() and parseOutput() should be called in constructor of DF so
that df command will be executed when DF is instantiated.
> Remove usage of "bash -c" from oah.fs.DF
> ----------------------------------------
>
> Key: HADOOP-9818
> URL: https://issues.apache.org/jira/browse/HADOOP-9818
> Project: Hadoop Common
> Issue Type: Improvement
> Affects Versions: 3.0.0, 2.1.0-beta
> Reporter: Andrew Wang
> Assignee: Kousuke Saruta
> Labels: newbie
> Attachments: HADOOP-9818.patch
>
>
> {{DF}} uses "bash -c" to shell out to the unix {{df}} command. This is
> potentially unsafe; let's think about removing it.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira