[
https://issues.apache.org/jira/browse/HADOOP-20061?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HADOOP-20061:
------------------------------------
Labels: pull-request-available (was: )
> hadoop fs -count -e fails with NullPointerException when the file system
> reports no erasure coding policy
> ---------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-20061
> URL: https://issues.apache.org/jira/browse/HADOOP-20061
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Yang Jie
> Priority: Minor
> Labels: pull-request-available
>
> {{hadoop fs -count -e file:///tmp}} fails with "-count: Fatal internal error"
> and a NullPointerException from ContentSummary#toErasureCodingPolicy. The
> same happens on s3a://, abfs://, a viewfs internal directory, and WebHDFS
> against a server older than 3.3.0. The ContentSummary returned there has no
> erasure coding policy, and Count#processPath calls toErasureCodingPolicy()
> without checking. Because the NPE is not an IOException, FsShell prints a
> stack trace and skips the remaining paths.
> {{ls -e}} had the same NPE, and HDFS-13661 fixed it by reporting "FileSystem
> X does not support Erasure Coding". This change makes {{count -e}} report the
> same message as an IOException, so the error is printed for that path, the
> remaining paths are still processed, and the command exits with 1.
> FileSystemShell.md is updated to describe this.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]