[
https://issues.apache.org/jira/browse/HADOOP-9909?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13754143#comment-13754143
]
Andrew Wang commented on HADOOP-9909:
-------------------------------------
Looks pretty good, just a few comments:
{code}
+ /** get the environment variable
+ * @return the environment variable of the command
+ */
{code}
Our Javadoc style looks more like this, with another newline and
capitalization. It's also okay to skip the {{@return}} if it's not adding any
information.
{code}
+ /**
+ * Get the environment variable
+ */
{code}
I'd also rather {{Map getEnvironment()}} be {{String getEnvironment(String)}},
so we're not exposing the entire map (which can be modified).
> org.apache.hadoop.fs.Stat should permit other LANG
> --------------------------------------------------
>
> Key: HADOOP-9909
> URL: https://issues.apache.org/jira/browse/HADOOP-9909
> Project: Hadoop Common
> Issue Type: Improvement
> Components: fs
> Affects Versions: 3.0.0
> Environment: CentOS 6.4 / LANG=ja_JP.UTF-8
> Reporter: Shinichi Yamashita
> Attachments: console.log, HADOOP-9909.patch, HADOOP-9909.patch,
> HADOOP-9909.patch, HADOOP-9909.patch
>
>
> I executed "hdfs dfs -put" command and displayed following warning message.
> And "hdfs dfs -put" command was success.
> This is because Stat.parseExecResult() check a message of stat command from
> only English.
> {code}
> [hadoop@trunk ~]$ hdfs dfs -put fugafuga.txt .
> 13/08/27 16:24:36 WARN util.NativeCodeLoader: Unable to load native-hadoop
> library for your platform... using builtin-java classes where applicable
> 13/08/27 16:24:37 WARN fs.FSInputChecker: Problem opening checksum file:
> file:/home/hadoop/fugafuga.txt. Ignoring exception:
> java.io.IOException: Unexpected stat output: stat: cannot stat
> `/home/hadoop/.fugafuga.txt.crc': そのようなファイルやディレクトリはありません
> at org.apache.hadoop.fs.Stat.parseExecResult(Stat.java:163)
> at org.apache.hadoop.util.Shell.runCommand(Shell.java:489)
> at org.apache.hadoop.util.Shell.run(Shell.java:417)
> at org.apache.hadoop.fs.Stat.getFileStatus(Stat.java:68)
> at
> org.apache.hadoop.fs.RawLocalFileSystem.getNativeFileLinkStatus(RawLocalFileSystem.java:806)
> at
> org.apache.hadoop.fs.RawLocalFileSystem.getFileLinkStatusInternal(RawLocalFileSystem.java:738)
> at
> org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:523)
> at org.apache.hadoop.fs.FileSystem.exists(FileSystem.java:1397)
> at
> org.apache.hadoop.fs.RawLocalFileSystem.open(RawLocalFileSystem.java:210)
> at
> org.apache.hadoop.fs.ChecksumFileSystem$ChecksumFSInputChecker.<init>(ChecksumFileSystem.java:143)
> at
> org.apache.hadoop.fs.ChecksumFileSystem.open(ChecksumFileSystem.java:339)
> at org.apache.hadoop.fs.FileSystem.open(FileSystem.java:763)
> at
> org.apache.hadoop.fs.shell.CommandWithDestination.copyFileToTarget(CommandWithDestination.java:239)
> at
> org.apache.hadoop.fs.shell.CommandWithDestination.processPath(CommandWithDestination.java:183)
> at
> org.apache.hadoop.fs.shell.CommandWithDestination.processPath(CommandWithDestination.java:168)
> at org.apache.hadoop.fs.shell.Command.processPaths(Command.java:310)
> at
> org.apache.hadoop.fs.shell.Command.processPathArgument(Command.java:282)
> at
> org.apache.hadoop.fs.shell.CommandWithDestination.processPathArgument(CommandWithDestination.java:163)
> at
> org.apache.hadoop.fs.shell.Command.processArgument(Command.java:264)
> at
> org.apache.hadoop.fs.shell.Command.processArguments(Command.java:248)
> at
> org.apache.hadoop.fs.shell.CommandWithDestination.processArguments(CommandWithDestination.java:140)
> at
> org.apache.hadoop.fs.shell.CopyCommands$Put.processArguments(CopyCommands.java:224)
> at
> org.apache.hadoop.fs.shell.Command.processRawArguments(Command.java:194)
> at org.apache.hadoop.fs.shell.Command.run(Command.java:155)
> at org.apache.hadoop.fs.FsShell.run(FsShell.java:255)
> at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
> at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
> at org.apache.hadoop.fs.FsShell.main(FsShell.java:308)
> Caused by: java.lang.NumberFormatException: For input string: "stat: cannot
> stat `/home/hadoop/.fugafuga.txt.crc': そのようなファイルやディレクトリはありません"
> at
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
> at java.lang.Long.parseLong(Long.java:441)
> at java.lang.Long.parseLong(Long.java:483)
> at org.apache.hadoop.fs.Stat.parseExecResult(Stat.java:128)
> ... 27 more
> {code}
--
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