hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jordan Sissel (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-6876) Path.suffix(...) on a path url with no "path" results in NullPointerException
Date Thu, 22 Jul 2010 23:16:50 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-6876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12891390#action_12891390
] 

Jordan Sissel commented on HADOOP-6876:
---------------------------------------

Updated my own code and confirmed that my suggested workaround does work.

> Path.suffix(...) on a path url with no "path" results in NullPointerException
> -----------------------------------------------------------------------------
>
>                 Key: HADOOP-6876
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6876
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 0.20.2
>            Reporter: Jordan Sissel
>
> I can most briefly demo this using the hbase jruby shell (as it has hadoop in the classpath:
> {noformat}
> hbase(main):001:0> path = org.apache.hadoop.fs.Path.new("hdfs://testing/")
> => #<Java::OrgApacheHadoopFs::Path:0x6128453c @java_object=#<Java::JavaObject:0x1ad997f9>>
> hbase(main):002:0> path.suffix("Test")
> NativeException: java.lang.NullPointerException: null
> {noformat}
> I expected instead that path.suffix("Test") would simply generate a new path with 'Test'
appended. For above, this would be the path "hdfs://testing/Test"
> Workaround: This should work - instead of using path.suffix(), use this (java):
> {noformat}
>    Path newpath = new Path(oldpath.toString() + "mysuffix");
> {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message