hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-14586) org.apache.hadoop.util.Shell in 2.7 breaks <clinit> on Java 9 RC build; backport HADOOP-10775 to 2.7.x
Date Wed, 28 Jun 2017 12:11:00 GMT

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

Uwe Schindler commented on HADOOP-14586:
----------------------------------------

Hi,
Thanks [~stevel@apache.org] - this is the problem we had. We do not install Hadoop anywhere
or we run Solr inside Apache Solr, we are just users using the client library (and parts of
its tests, e.g. the MiniDFSCluster for testing - which works on Java 9). The used client library
has a bug that breaks a component that uses it. So - as said before, I'd not backport anything
complex, I'd just apply the bugfix simple patch that changes the static constant to "true"
and all should be happy. There is no risk at all, as Hadoop 2.7 has a minimum requirement
of Java 7, so the constant is "true".

As users of the hadoop client library: We just don't want to break our "Java 9 compatible"
Solr Core that uses the Hadoop libraries for some authentication stuff and allows to store
indexes on HDFS. Another problem why we don't necessarily want to upgrade Hadoop in stable
Solr (6.x), because how behaves a newer Hadoop client when talking to an older version. So
we can't just raise version number.

We don't tell our users that you can use Solr with Hadoop on Java 9, but Solr on its own should
run with Java 9 and dependent libraries should not fail on classloading. So we have two possibilities:

- Remove all of hadoop support from Solr Core (not a good idea)
- Just fix the "Shell" class with a one-liner so it can actually just "load" successfully
on Java 9 and not break other stuff (like StringUtils, Kerberos Auth,...). One possibility
to do this is to fork hadoop-common in github and ship Solr with a patched version. But I
don't like to do this!

So I would really hope that you could apply the simple one-liner patch! Thanks :-)

>  org.apache.hadoop.util.Shell in 2.7 breaks <clinit> on Java 9 RC build; backport
HADOOP-10775 to 2.7.x
> -------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-14586
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14586
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: common
>    Affects Versions: 2.7.2
>         Environment: Java 9, build 175 (Java 9 release candidate as of June 25th, 2017)
>            Reporter: Uwe Schindler
>            Assignee: Akira Ajisaka
>            Priority: Minor
>              Labels: Java9
>         Attachments: HADOOP-14586-branch-2.7-01.patch, HADOOP-14586-branch-2.7-02.patch
>
>
> You cannot use any pre-Hadoop 2.8 component anymore with the latest release candidate
build of Java 9, because it fails with an StringIndexOutOfBoundsException in {{org.apache.hadoop.util.Shell#<clinit>}}.
This leads to a whole cascade of failing classes (next in chain is StringUtils).
> The reason is that the release candidate build of Java 9 no longer has "-ea" in the version
string and the system property "java.version" is now simply "9". This causes the following
line to fail fatally:
> {code:java}
>   private static boolean IS_JAVA7_OR_ABOVE =
>       System.getProperty("java.version").substring(0, 3).compareTo("1.7") >= 0;
> {code}
> Analysis:
> - This code looks wrong, as comparing a version this way is incorrect.
> - The {{substring(0, 3)}} is not needed, {{compareTo}} also works without it, although
it is still an invalid way to compare a version.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message