hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arnaud Linz (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HADOOP-13186) GenericOptionParser -libjar option validity check not always working because of bad local FS equality check
Date Fri, 20 May 2016 08:44:12 GMT
Arnaud Linz created HADOOP-13186:
------------------------------------

             Summary: GenericOptionParser -libjar option validity check not always working
because of bad local FS equality check
                 Key: HADOOP-13186
                 URL: https://issues.apache.org/jira/browse/HADOOP-13186
             Project: Hadoop Common
          Issue Type: Bug
          Components: util
    Affects Versions: 2.7.1, 2.6.0
         Environment: Occured on: CentOS 6.3 or Ubuntu 14.04, Oracle JDK 1.7.0_45 or 1.8.0_66
            Reporter: Arnaud Linz


_Class concerned :_
{{org.apache.hadoop.util.GenericOptionParser}}
_Method : _
{{public static URL[] getLibJars(final Configuration conf)}}
-Line : _
{{if (tmp.getFileSystem(conf).equals(FileSystem.getLocal(conf))) }}

In this method we check if the provided jar on the command line are on a local file system,
else we emit a warning log and ignore it.

I got the case where the two file systems retrieved (the one from the {{Path.getFileSystem(conf)}}
and the one returned by {{FileSystem.getLocal(conf))}} where two local file systems but different
objects, and the {{equals()}} method, not having been implemented, defaulted to the object
pointer equality, leading to my jar files not being taken into account.

I've quickly patched it to 
{{tmp.getFileSystem(conf).getUri().equals(FileSystem.getLocal(conf).getUri()}}
to have my application work.
I did not dig further into determining whether the objects should have been the same, or whether
the {{equals()}} method should have been implemented, but it has to be done.









--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-dev-help@hadoop.apache.org


Mime
View raw message