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

Akira Ajisaka commented on ORC-436:
-----------------------------------

{noformat}
Caused by: java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 2
    at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3319)
    at java.base/java.lang.String.substring(String.java:1874)
    at org.apache.hadoop.util.Shell.<clinit>(Shell.java:52)
{noformat}
This failure is from hadoop-common-2.7.3.jar and the code is:
{code}
  private static boolean IS_JAVA7_OR_ABOVE =
      System.getProperty("java.version").substring(0, 3).compareTo("1.7") >= 0;
{code}
System.getProperty("java.version") returns 11, so the substring method fails. 
This code was removed in Hadoop 2.8.0 by HADOOP-10775.

I'm thinking it's better to skip this test in Java 11 because Hadoop 2.7 does 
not support Java 11.
Thank you for reporting this, [~ozawa]!

> A test failure of TestHadoopShimsPre2_7 with OpenJDK 11  
> ---------------------------------------------------------
>
>                 Key: ORC-436
>                 URL: https://issues.apache.org/jira/browse/ORC-436
>             Project: ORC
>          Issue Type: Bug
>            Reporter: Tsuyoshi Ozawa
>            Priority: Major
>
> Reproduced a test failure Owen said in [Hadoop 
> ML|http://mail-archives.apache.org/mod_mbox/hadoop-common-dev/201811.mbox/%3CCAHfHakGjmu2LuZ%2BU%3DF4-MVq7UL0vi4sPKno-ozBpvgig6SyWJg%40mail.gmail.com%3E?fbclid=IwAR18ZSzet969mHzrr9fk_q1a02c0T4qPiI-zZrglfYfI6BKytoIFsAqTj_M]
> {quote}
> $ java -version
> openjdk version "11" 2018-09-25
> OpenJDK Runtime Environment (build 11+24-Ubuntu-118.04)
> OpenJDK 64-Bit Server VM (build 11+24-Ubuntu-118.04, mixed mode, sharing)
> $ mvn test
> [INFO] Running org.apache.orc.impl.TestHadoopShimsPre2_7
> [ERROR] Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.207 
> s <<< FAILURE! - in org.apache.orc.impl.TestHadoopShimsPre2_7
> [ERROR] testHadoopKeyProvider(org.apache.orc.impl.TestHadoopShimsPre2_7)  
> Time elapsed: 0.101 s  <<< ERROR!
> java.lang.ExceptionInInitializerError
>       at 
> org.apache.orc.impl.TestHadoopShimsPre2_7.testHadoopKeyProvider(TestHadoopShimsPre2_7.java:77)
> Caused by: java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 2
>       at 
> org.apache.orc.impl.TestHadoopShimsPre2_7.testHadoopKeyProvider(TestHadoopShimsPre2_7.java:77)
> {quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to