[ 
https://issues.apache.org/jira/browse/HDDS-2179?focusedWorklogId=318564&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-318564
 ]

ASF GitHub Bot logged work on HDDS-2179:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 25/Sep/19 20:08
            Start Date: 25/Sep/19 20:08
    Worklog Time Spent: 10m 
      Work Description: adoroszlai commented on pull request #1525: HDDS-2179. 
ConfigFileGenerator fails with Java 10 or newer
URL: https://github.com/apache/hadoop/pull/1525
 
 
   ## What changes were proposed in this pull request?
   
   Allow building HDDS Config (and Ozone in general) with newer JDKs.
   
   https://issues.apache.org/jira/browse/HDDS-2179
   
   ## How was this patch tested?
   
   Tested HDDS Config build with Java 8, 10, 11, 13.
   
   ```
   $ mvn -f pom.ozone.xml -DskipTests -am -pl :hadoop-hdds-config clean package
   ...
   [INFO] Apache Hadoop Ozone Main ........................... SUCCESS [  0.472 
s]
   [INFO] Apache Hadoop HDDS ................................. SUCCESS [  1.718 
s]
   [INFO] Apache Hadoop HDDS Config .......................... SUCCESS [  1.651 
s]
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   
   $ wc hadoop-hdds/config/target/test-classes/ozone-default-generated.xml
         33      63    1060 
hadoop-hdds/config/target/test-classes/ozone-default-generated.xml
   ```
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 318564)
    Remaining Estimate: 0h
            Time Spent: 10m

> ConfigFileGenerator fails with Java 10 or newer
> -----------------------------------------------
>
>                 Key: HDDS-2179
>                 URL: https://issues.apache.org/jira/browse/HDDS-2179
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: build
>            Reporter: Doroszlai, Attila
>            Assignee: Doroszlai, Attila
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> {code:title=mvn -f pom.ozone.xml -DskipTests -am -pl :hadoop-hdds-config 
> clean package}
> ...
> [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ 
> hadoop-hdds-config ---
> [INFO] Compiling 3 source files to hadoop-hdds/config/target/test-classes
> ...
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile 
> (default-testCompile) on project hadoop-hdds-config: Compilation failure
> [ERROR] Can't generate the config file from annotation: 
> hadoop-hdds/config/target/test-classes/ozone-default-generated.xml
> {code}
> The root cause is that new Java (I guess it's 9+, but tried only on 10+) 
> throws a different {{IOException}} subclass: {{NoSuchFileException}} instead 
> of {{FileNotFoundException}}.
> {code}
> java.nio.file.NoSuchFileException: 
> hadoop-hdds/config/target/test-classes/ozone-default-generated.xml
>       at 
> java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
>       at 
> java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
>       at 
> java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
>       at 
> java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219)
>       at java.base/java.nio.file.Files.newByteChannel(Files.java:374)
>       at java.base/java.nio.file.Files.newByteChannel(Files.java:425)
>       at 
> java.base/java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:420)
>       at java.base/java.nio.file.Files.newInputStream(Files.java:159)
>       at 
> jdk.compiler/com.sun.tools.javac.file.PathFileObject.openInputStream(PathFileObject.java:461)
>       at 
> java.compiler@13/javax.tools.ForwardingFileObject.openInputStream(ForwardingFileObject.java:74)
>       at 
> org.apache.hadoop.hdds.conf.ConfigFileGenerator.process(ConfigFileGenerator.java:62)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to