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

Steve Loughran commented on HDFS-5088:
--------------------------------------

What could be done is get the class, not cast it, but instead call 
{{FileSystem.concat()}}, expecting an {{UnsupportedOperationException}} if it 
isn't implemented, and downgrade that to an {{exit(-1)}}. That way: FS 
independent, and fails with some meaningful message. If anyone did ever 
implement concat on other filesystems, then it could get used.

Even so, it is {{HDFSConcat}} for a reason: there is no expectation that it 
works elsewhere
                
> Exception in thread "main" java.lang.ClassCastException:occurs when running 
> java org.apache.hadoop.hdfs.tools.HDFSConcat 
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-5088
>                 URL: https://issues.apache.org/jira/browse/HDFS-5088
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs-client
>         Environment: Fedora 19, 16 bit
>            Reporter: Leo
>
> When I run this command, 
> java org.apache.hadoop.hdfs.tools.HDFSConcat 
> I get the following exception
> Exception in thread "main" java.lang.ClassCastException: 
> org.apache.hadoop.fs.LocalFileSystem cannot be cast to 
> org.apache.hadoop.hdfs.DistributedFileSystem 
>       at org.apache.hadoop.hdfs.tools.HDFSConcat.main(HDFSConcat.java:46) 
> It's because that the default fs is localfs instead of hdfs.

--
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

Reply via email to