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

ASF subversion and git services commented on SOLR-10966:
--------------------------------------------------------

Commit c221a596fe23088ae8cee1ff41e7dcf186e3b402 in lucene-solr's branch 
refs/heads/branch_6x from [~thetaphi]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=c221a59 ]

SOLR-11261, SOLR-10966: Upgrade to Hadoop 2.7.4 to fix incompatibility with 
Java 9.
This also reverts commit 85a27a231fdddb118ee178baac170da0097a02c0.


> Add workaround for Hadoop-Common 2.7.2 incompatibility with Java 9
> ------------------------------------------------------------------
>
>                 Key: SOLR-10966
>                 URL: https://issues.apache.org/jira/browse/SOLR-10966
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Hadoop Integration, hdfs
>    Affects Versions: 6.6
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>            Priority: Critical
>             Fix For: 7.0, 6.7, 6.6.1
>
>         Attachments: SOLR-10966.patch, SOLR-10966.patch
>
>
> I did some testing to work around HADOOP-14586 and found a temporary 
> solution. All tests pass with Java 9 build 175 (HDFS, Hadoop Auth / Kerberos).
> This is a temporary workaround until we can upgrade Hadoop, see SOLR-10951
> The trick here is a hack: The Hadoop Shell class  tries to parse 
> {{java.version}} system property, which is simply {{"9"}} on the Java 9 GA / 
> release candidate. It contains no dots and is shorter than 3 characters. 
> Hadoop tries to get the {{substring(0,3)}} and fails with an 
> IndexOutOfBoundsException in clinit. To work around this, we do the following 
> on early Solr startup / test startup (in a static analyzer, like we do for 
> logging initialization):
> - set {{java.version}} system property to {{"1.9"}}
> - initialize the Shell class in Hadoop
> - restore the old value of {{java.version}}
> The whole thing is done in a doPrivileged. I ran some tests on Policeman 
> Jenkins, everything works. The hack is only done, if _we_ detect Java 9.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to