Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HADOOP-16558. [COMMON+HDFS] use protobuf-maven-plugin to generate protobuf classes #1494

Merged
merged 4 commits into from Sep 23, 2019

Conversation

vinayakumarb
Copy link
Contributor

Use "protoc-maven-plugin" to dynamically download protobuf executable to generate protobuf classes from proto files.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 74 Docker mode activated.
_ Prechecks _
+1 dupname 2 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 2 new or modified test files.
_ trunk Compile Tests _
0 mvndep 67 Maven dependency ordering for branch
+1 mvninstall 1217 trunk passed
+1 compile 1173 trunk passed
+1 mvnsite 300 trunk passed
-1 shadedclient 2816 branch has errors when building and testing our client artifacts.
+1 javadoc 294 trunk passed
_ Patch Compile Tests _
0 mvndep 24 Maven dependency ordering for patch
+1 mvninstall 222 the patch passed
+1 compile 1170 the patch passed
+1 cc 1170 the patch passed
+1 javac 1170 the patch passed
+1 mvnsite 309 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 xml 7 The patch has no ill-formed XML file.
-1 shadedclient 184 patch has errors when building and testing our client artifacts.
+1 javadoc 294 the patch passed
_ Other Tests _
+1 unit 22 hadoop-project in the patch passed.
+1 unit 588 hadoop-common in the patch passed.
+1 unit 137 hadoop-hdfs-client in the patch passed.
-1 unit 7099 hadoop-hdfs in the patch failed.
+1 unit 1619 hadoop-hdfs-rbf in the patch passed.
+1 asflicense 67 The patch does not generate ASF License warnings.
15113
Reason Tests
Failed junit tests hadoop.hdfs.TestDFSShell
hadoop.hdfs.server.namenode.ha.TestBootstrapStandby
hadoop.hdfs.server.balancer.TestBalancer
hadoop.hdfs.server.namenode.TestFSImage
Subsystem Report/Notes
Docker Client=19.03.2 Server=19.03.2 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1494/1/artifact/out/Dockerfile
GITHUB PR #1494
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient xml cc
uname Linux bca8f6791a8e 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / aa93866
Default Java 1.8.0_222
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1494/1/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1494/1/testReport/
Max. process+thread count 3078 (vs. ulimit of 5500)
modules C: hadoop-project hadoop-common-project/hadoop-common hadoop-hdfs-project/hadoop-hdfs-client hadoop-hdfs-project/hadoop-hdfs hadoop-hdfs-project/hadoop-hdfs-rbf U: .
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1494/1/console
versions git=2.7.4 maven=3.3.9
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@vinayakumarb
Copy link
Contributor Author

Test failures are unrelated.

shaded-client failures are due to protoc 2.5.0 missing in Docker image. This run didnt pickup the commit of HADOOP-16589.

Next run https://builds.apache.org/job/hadoop-multibranch/job/PR-1494/2/artifact/out/patch-shadedclient.txt passed for shaded client verification, but next unfortunately took more time and jenkins aborted it.

@vinayakumarb vinayakumarb self-assigned this Sep 21, 2019
<protoSourceRoot>${basedir}/src/main/proto</protoSourceRoot>
<outputDirectory>${project.build.directory}/generated-sources/java</outputDirectory>
<clearOutputDirectory>false</clearOutputDirectory>
<skip>true</skip>
Copy link
Contributor

@Apache9 Apache9 Sep 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this? I suppose this is under the PluginMangement tag, so unless we declare this plugin explicitly in the pom of a sub module, it will not be executed?
And maybe we can add the test complie execution here with the skip = true configuration, and in the sub module which also need to generate test protos can use skip = false to enable the execution.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this? I suppose this is under the PluginMangement tag, so unless we declare this plugin explicitly in the pom of a sub module, it will not be executed?

Yes! you are right. Need to add plugin and execution with "skip=false" explicitly in submodule to enable this. The reason for keeping in plugin management is, all other configuration items could be controlled from one place for all modules. Whatever needs to be specific to submodule, could be controlled in specific module.

And maybe we can add the test complie execution here with the skip = true configuration, and in the sub module which also need to generate test protos can use skip = false to enable the execution.

Yes you are right. I will do this change.

<skip>false</skip>
<additionalProtoPathElements>
<additionalProtoPathElement>
${basedir}/../../hadoop-common-project/hadoop-common/src/main/proto
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we also attach the proto along in the jar, we do not need to add this configuration. This may change the behavior but I think it is fine? Of course, keep the old way is also fine, not a big problem. Just want to make the pom simpler. As in the old way, you need make sure that we also depend on hadoop-common in the dependencies section, otherwise the protoc generating is fine but there will be compile error...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I agree that keeping proto files in jar may be fine for now.
It would be better to specify explicitly which proto files are required for successfull proto generation. So I preferred to NOT to include in jars.

As in the old way, you need make sure that we also depend on hadoop-common in the dependencies section, otherwise the protoc generating is fine but there will be compile error...

hadoop-common in dependency section is anyway required, irrespective of whether proto files are part of jar or not.

…rate protobuf classes.

Moved test-compile-protoc to hadoop-project/pom.xml
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 79 Docker mode activated.
_ Prechecks _
+1 dupname 1 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 2 new or modified test files.
_ trunk Compile Tests _
0 mvndep 70 Maven dependency ordering for branch
+1 mvninstall 1210 trunk passed
+1 compile 1050 trunk passed
+1 mvnsite 278 trunk passed
+1 shadedclient 3388 branch has no errors when building and testing our client artifacts.
+1 javadoc 288 trunk passed
_ Patch Compile Tests _
0 mvndep 22 Maven dependency ordering for patch
+1 mvninstall 205 the patch passed
+1 compile 1008 the patch passed
-1 cc 1008 root generated 2 new + 24 unchanged - 2 fixed = 26 total (was 26)
+1 javac 1008 the patch passed
+1 mvnsite 280 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 xml 7 The patch has no ill-formed XML file.
+1 shadedclient 819 patch has no errors when building and testing our client artifacts.
+1 javadoc 303 the patch passed
_ Other Tests _
+1 unit 24 hadoop-project in the patch passed.
+1 unit 606 hadoop-common in the patch passed.
+1 unit 133 hadoop-hdfs-client in the patch passed.
-1 unit 7225 hadoop-hdfs in the patch failed.
+1 unit 1716 hadoop-hdfs-rbf in the patch passed.
-1 asflicense 79 The patch generated 8 ASF License warnings.
16374
Reason Tests
Failed junit tests hadoop.hdfs.server.namenode.TestAddOverReplicatedStripedBlocks
hadoop.hdfs.TestLeaseRecovery2
hadoop.hdfs.shortcircuit.TestShortCircuitLocalRead
hadoop.hdfs.server.namenode.TestReencryption
hadoop.hdfs.TestDFSStripedOutputStreamWithRandomECPolicy
hadoop.hdfs.server.namenode.TestPersistentStoragePolicySatisfier
hadoop.hdfs.TestReplication
hadoop.hdfs.TestLease
hadoop.hdfs.server.namenode.TestAddStripedBlocks
hadoop.hdfs.server.namenode.TestProcessCorruptBlocks
hadoop.hdfs.TestReadStripedFileWithDNFailure
hadoop.hdfs.TestSafeModeWithStripedFile
hadoop.hdfs.server.namenode.TestNameNodeMXBean
Subsystem Report/Notes
Docker Client=19.03.2 Server=19.03.2 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1494/3/artifact/out/Dockerfile
GITHUB PR #1494
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient xml cc
uname Linux 9a05a3ba85e4 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 659c888
Default Java 1.8.0_222
cc https://builds.apache.org/job/hadoop-multibranch/job/PR-1494/3/artifact/out/diff-compile-cc-root.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1494/3/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1494/3/testReport/
asflicense https://builds.apache.org/job/hadoop-multibranch/job/PR-1494/3/artifact/out/patch-asflicense-problems.txt
Max. process+thread count 2644 (vs. ulimit of 5500)
modules C: hadoop-project hadoop-common-project/hadoop-common hadoop-hdfs-project/hadoop-hdfs-client hadoop-hdfs-project/hadoop-hdfs hadoop-hdfs-project/hadoop-hdfs-rbf U: .
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1494/3/console
versions git=2.7.4 maven=3.3.9
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@Apache9 Apache9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1.

</configuration>
</execution>
<execution>
<id>test-compile-protoc</id>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: let's align the names? Either we change this to src-test-compile-protoc, or we change the above to compile-protoc, I know that this will introduce conflicts with the plugin defined in yarn-csi, but let's do things cleanly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I will update id as per your suggestion, "src-test-compile-protoc" and merge :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Will rebase #1496 after you merge this.

@vinayakumarb
Copy link
Contributor Author

Test failures are not related. Most of them are due to "Unable to create native thread"

@vinayakumarb vinayakumarb merged commit 07c81e9 into apache:trunk Sep 23, 2019
@vinayakumarb
Copy link
Contributor Author

Merged. Thanks @Apache9 for the reviews.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 0 Docker mode activated.
-1 patch 11 #1494 does not apply to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hadoop/HowToContribute for help.
Subsystem Report/Notes
GITHUB PR #1494
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1494/4/console
versions git=2.17.1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

amahussein pushed a commit to amahussein/hadoop that referenced this pull request Oct 29, 2019
RogPodge pushed a commit to RogPodge/hadoop that referenced this pull request Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants