[
https://issues.apache.org/jira/browse/YETUS-304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15145485#comment-15145485
]
Allen Wittenauer commented on YETUS-304:
----------------------------------------
bq. the compilation error is because a method signature was changed in Hadoop
Common in HDFS-9801, and somehow the precommit script only updated the code
change in hadoop-hdfs, breaking the build. I locally verified that the build
should pass if built from Hadoop root directory.
... and this is a "You can't you have it both ways."
You'll note that your documentation patch only ran mvn site. It did not run
mvn install, which would have compiled all of hadoop and then put all new jars
into the maven repo.
So if there is a fix to be made here, it's that when using maven, we always
need to do the maven install step, regardless of what type of patch it is.
> Documentation-only patch should not compile Java code
> -----------------------------------------------------
>
> Key: YETUS-304
> URL: https://issues.apache.org/jira/browse/YETUS-304
> Project: Yetus
> Issue Type: Bug
> Components: Test Patch
> Reporter: Wei-Chiu Chuang
>
> I saw an issue in the rev01 patch in this JIRA:
> https://issues.apache.org/jira/browse/HADOOP-12793
> This is a documentation-only patch, but precommit failed.
> {noformat}
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-site-plugin:3.4:site (default-site) on project
> hadoop-hdfs: failed to get report for
> org.apache.maven.plugins:maven-dependency-plugin: Failed to execute goal
> org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile)
> on project hadoop-hdfs: Compilation failure: Compilation failure:
> [ERROR]
> /testptch/hadoop/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java:[258,7]
> error: DataNode is not abstract and does not override abstract method
> reconfigurePropertyImpl(String,String) in ReconfigurableBase
> [ERROR]
> /testptch/hadoop/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java:[511,16]
> error: reconfigurePropertyImpl(String,String) in DataNode cannot override
> reconfigurePropertyImpl(String,String) in ReconfigurableBase
> [ERROR] return type String is not compatible with void
> [ERROR]
> /testptch/hadoop/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java:[510,2]
> error: method does not override or implement a method from a supertype
> [ERROR] -> [Help 1]
> {noformat}
> There are two issues that I can see:
> * documentation patch should not need to recompile Java code
> * the compilation error is because a method signature was changed in Hadoop
> Common in HDFS-9801, and somehow the precommit script only updated the code
> change in hadoop-hdfs, breaking the build. I locally verified that the build
> should pass if built from Hadoop root directory.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)