Skip to content

HADOOP-18487. protobuf 2.5.0 marked as provided. #4996

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

Conversation

steveloughran
Copy link
Contributor

@steveloughran steveloughran commented Oct 10, 2022

The option protobuf.scope defines whether the protobuf 2.5.0 dependency is marked as provided or not.

  • all declarations except those in yarn-csi are updated
  • those modules which don't compile without their own explicit import (hadoop-hdfs-client, hadoop-hdfs-rbf)

It's actually interesting to see where/how that compile fails

hadoop-hdfs-client: ClientNamenodeProtocolTranslatorPB hadoop-hdfs-rbf:RouterAdminProtocolTranslatorPB

both with "class file for com.google.protobuf.ServiceException not found", even though neither class uses it

what they do have is references to ProtobufHelper.getRemoteException(), which is overloaded to both the shaded ServiceException and the original one

Hypothesis: the javac overload resolution needs to look at the entire class hierarchy before it can decide which one to use.

Proposed: add a new method
ioe extractException(org.apache.hadoop.thirdparty.protobuf.ServiceException)
and move our own code to it. Without the overloading the classes should not be needed

Change-Id: I70354abfe3f1fdc03c418dac88e60f8cc4929a33

How was this patch tested?

local compile, now looking at yetus runs

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

@steveloughran steveloughran marked this pull request as draft October 10, 2022 16:45
@steveloughran
Copy link
Contributor Author

having just seen #2026 i'm not convinced we can remove protobuf2.5 off the classpath of anything using the RPC classes. There's a lot of internal probing for object types and dynamic choice of shaded/unshaded classes.

It might be possible to pull out the code from the shared classes (server, rpcwritable...) so be confident that rpc clients only using the shaded libraries and the RpcEngine2 were safely isolated, but right now I am not convinced that is true. Certainly hdfs, mr and yarn servers and clients MUST export protobuf2, even if hadoop-common downgrades it.

@steveloughran
Copy link
Contributor Author

we can't cut an unshaded protobuf of some form without RPC not linking, so hbase/hive/ozone are in trouble here. changes to RPC.java required to somehow add ability to probe a class for being a subclass of com.google.protobuf.Message without having com.google.protobuf.Message on the classpath would be needed.

this does not need to be protobuf 2.5.

I propose

  1. changing some of the imports of hadoop-common to exclude it (cloud components)
  2. changing retention here back to compile
    that way someone can turn it off if they want to, but it is not something we do in normal asf releases.

@steveloughran steveloughran force-pushed the feature/HADOOP-18487-downgrade-protobuf-2.5 branch from c837155 to 8309ad3 Compare October 20, 2022 14:16
@steveloughran steveloughran marked this pull request as ready for review October 20, 2022 17:04
@steveloughran steveloughran force-pushed the feature/HADOOP-18487-downgrade-protobuf-2.5 branch 2 times, most recently from e6c4fb9 to dad1ddb Compare October 26, 2022 12:01
@steveloughran
Copy link
Contributor Author

...not targeting 3.3.5 for this; not a blocker

@steveloughran steveloughran force-pushed the feature/HADOOP-18487-downgrade-protobuf-2.5 branch from 79fd97a to ad02499 Compare March 6, 2023 10:20
@apache apache deleted a comment from hadoop-yetus Mar 6, 2023
@apache apache deleted a comment from hadoop-yetus Mar 6, 2023
@apache apache deleted a comment from hadoop-yetus Mar 6, 2023
@apache apache deleted a comment from hadoop-yetus Mar 6, 2023
@apache apache deleted a comment from hadoop-yetus Mar 6, 2023
@apache apache deleted a comment from hadoop-yetus Mar 6, 2023
@steveloughran
Copy link
Contributor Author

spotbugs still unhappy. will have to explicitly exclude

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 43s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 2s No case conflicting files found.
+0 🆗 codespell 0m 2s codespell was not available.
+0 🆗 detsecrets 0m 2s detect-secrets was not available.
+0 🆗 xmllint 0m 2s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 3 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 18m 25s Maven dependency ordering for branch
+1 💚 mvninstall 37m 6s trunk passed
+1 💚 compile 18m 47s trunk passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 compile 17m 22s trunk passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+1 💚 checkstyle 4m 37s trunk passed
+1 💚 mvnsite 15m 2s trunk passed
+1 💚 javadoc 13m 16s trunk passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 javadoc 13m 18s trunk passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+0 🆗 spotbugs 0m 52s branch/hadoop-project no spotbugs output file (spotbugsXml.xml)
+1 💚 shadedclient 38m 1s branch has no errors when building and testing our client artifacts.
-0 ⚠️ patch 38m 30s Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 34s Maven dependency ordering for patch
-1 ❌ mvninstall 0m 32s /patch-mvninstall-hadoop-hdfs-project_hadoop-hdfs-rbf.txt hadoop-hdfs-rbf in the patch failed.
-1 ❌ compile 11m 41s /patch-compile-root-jdkUbuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1.txt root in the patch failed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1.
-1 ❌ javac 11m 41s /patch-compile-root-jdkUbuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1.txt root in the patch failed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1.
-1 ❌ compile 10m 10s /patch-compile-root-jdkPrivateBuild-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09.txt root in the patch failed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09.
-1 ❌ javac 10m 10s /patch-compile-root-jdkPrivateBuild-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09.txt root in the patch failed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09.
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 4m 21s root: The patch generated 0 new + 272 unchanged - 5 fixed = 272 total (was 277)
-1 ❌ mvnsite 0m 39s /patch-mvnsite-hadoop-hdfs-project_hadoop-hdfs-rbf.txt hadoop-hdfs-rbf in the patch failed.
+1 💚 javadoc 9m 41s the patch passed with JDK Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1
+1 💚 javadoc 8m 57s the patch passed with JDK Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
+0 🆗 spotbugs 0m 23s hadoop-project has no data from spotbugs
-1 ❌ spotbugs 0m 37s /patch-spotbugs-hadoop-hdfs-project_hadoop-hdfs-rbf.txt hadoop-hdfs-rbf in the patch failed.
+1 💚 shadedclient 37m 45s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 25s hadoop-project in the patch passed.
+1 💚 unit 19m 33s hadoop-common in the patch passed.
+1 💚 unit 2m 33s hadoop-hdfs-client in the patch passed.
+1 💚 unit 214m 42s hadoop-hdfs in the patch passed.
+1 💚 unit 3m 8s hadoop-hdfs-nfs in the patch passed.
+1 💚 unit 5m 53s hadoop-yarn-common in the patch passed.
+1 💚 unit 3m 39s hadoop-yarn-server-common in the patch passed.
+1 💚 unit 99m 31s hadoop-yarn-server-resourcemanager in the patch passed.
-1 ❌ unit 177m 27s /patch-unit-hadoop-mapreduce-project_hadoop-mapreduce-client.txt hadoop-mapreduce-client in the patch passed.
+1 💚 unit 4m 37s hadoop-mapreduce-client-hs in the patch passed.
-1 ❌ unit 1m 1s /patch-unit-hadoop-hdfs-project_hadoop-hdfs-rbf.txt hadoop-hdfs-rbf in the patch failed.
+1 💚 unit 21m 36s hadoop-yarn-services-core in the patch passed.
+1 💚 unit 1m 5s hadoop-yarn-csi in the patch passed.
+1 💚 asflicense 1m 5s The patch does not generate ASF License warnings.
894m 10s
Reason Tests
Failed junit tests hadoop.mapreduce.v2.TestUberAM
hadoop.mapreduce.v2.TestMRJobsWithProfiler
hadoop.mapreduce.v2.TestMRJobs
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4996/15/artifact/out/Dockerfile
GITHUB PR #4996
Optional Tests dupname asflicense codespell detsecrets xmllint compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle
uname Linux df3b96528f0a 4.15.0-212-generic #223-Ubuntu SMP Tue May 23 13:09:22 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / ca82091
Default Java Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.19+7-post-Ubuntu-0ubuntu120.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_362-8u372-gaus1-0ubuntu120.04-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4996/15/testReport/
Max. process+thread count 3433 (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-nfs hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager hadoop-mapreduce-project/hadoop-mapreduce-client hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs hadoop-hdfs-project/hadoop-hdfs-rbf hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core hadoop-yarn-project/hadoop-yarn/hadoop-yarn-csi U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4996/15/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@steveloughran
Copy link
Contributor Author

steveloughran commented Jul 18, 2023

test Failures are all in TestMRJobsWithProfiler, covered exactly in MAPREDUCE-7436 and therefore unrelated.

@apache apache deleted a comment from hadoop-yetus Jul 18, 2023
@apache apache deleted a comment from hadoop-yetus Jul 18, 2023
@apache apache deleted a comment from hadoop-yetus Jul 18, 2023
@apache apache deleted a comment from hadoop-yetus Jul 18, 2023
@steveloughran
Copy link
Contributor Author

rbf compile failure is very much related

rbf: [ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/jenkins/jenkins-home/workspace/hadoop-multibranch_PR-4996/ubuntu-focal/src/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/protocolPB/RouterAdminProtocolTranslatorPB.java:[174,29] cannot find symbol
  symbol:   variable ProtobufHelper
  location: class org.apache.hadoop.hdfs.protocolPB.RouterAdminProtocolTranslatorPB
[INFO] 1 error
[INFO] ---------------------------------

@steveloughran steveloughran force-pushed the feature/HADOOP-18487-downgrade-protobuf-2.5 branch from ca82091 to 6ce5309 Compare August 14, 2023 18:57
@steveloughran
Copy link
Contributor Author

tests are unrelated.

this pr is ready to go in, followed by one switching protobuf 2.5 to provided

Copy link
Contributor

@pjfanning pjfanning left a comment

Choose a reason for hiding this comment

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

Seems good to me. I'm no expert on this part of the code base but it seems like this is required even if needs a few code changes.

* Helper methods for protobuf related RPC implementation.
* This is deprecated because it references protobuf 2.5 classes
* as well as the shaded one -and may need an unshaded protobuf
* JAR on the classpath during complicated.
Copy link
Contributor

Choose a reason for hiding this comment

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

during compilation - instead complicated

@steveloughran
Copy link
Contributor Author

@pjfanning thanks -reviewed all the javadocs and corrected any issues I could see, made sure everything had a doc and used MUST NOT USE in the class javadoc.

@steveloughran steveloughran force-pushed the feature/HADOOP-18487-downgrade-protobuf-2.5 branch from 6ce5309 to 74b2a60 Compare August 21, 2023 15:17
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 53s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 2s No case conflicting files found.
+0 🆗 codespell 0m 2s codespell was not available.
+0 🆗 detsecrets 0m 2s detect-secrets was not available.
+0 🆗 xmllint 0m 2s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 3 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 15m 4s Maven dependency ordering for branch
+1 💚 mvninstall 59m 17s trunk passed
+1 💚 compile 17m 39s trunk passed with JDK Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu120.04
+1 💚 compile 16m 9s trunk passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
+1 💚 checkstyle 4m 25s trunk passed
+1 💚 mvnsite 15m 20s trunk passed
+1 💚 javadoc 13m 56s trunk passed with JDK Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu120.04
+1 💚 javadoc 13m 22s trunk passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
+0 🆗 spotbugs 0m 51s branch/hadoop-project no spotbugs output file (spotbugsXml.xml)
+1 💚 shadedclient 34m 55s branch has no errors when building and testing our client artifacts.
-0 ⚠️ patch 35m 24s Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 33s Maven dependency ordering for patch
+1 💚 mvninstall 9m 0s the patch passed
+1 💚 compile 16m 32s the patch passed with JDK Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu120.04
+1 💚 javac 16m 32s the patch passed
+1 💚 compile 16m 2s the patch passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
+1 💚 javac 16m 2s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 4m 22s root: The patch generated 0 new + 272 unchanged - 5 fixed = 272 total (was 277)
+1 💚 mvnsite 15m 21s the patch passed
+1 💚 javadoc 13m 56s the patch passed with JDK Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu120.04
+1 💚 javadoc 13m 19s the patch passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
+0 🆗 spotbugs 0m 44s hadoop-project has no data from spotbugs
+1 💚 shadedclient 35m 19s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 46s hadoop-project in the patch passed.
+1 💚 unit 19m 21s hadoop-common in the patch passed.
+1 💚 unit 2m 53s hadoop-hdfs-client in the patch passed.
+1 💚 unit 248m 1s hadoop-hdfs in the patch passed.
+1 💚 unit 3m 46s hadoop-hdfs-nfs in the patch passed.
+1 💚 unit 6m 18s hadoop-yarn-common in the patch passed.
+1 💚 unit 4m 20s hadoop-yarn-server-common in the patch passed.
+1 💚 unit 119m 47s hadoop-yarn-server-resourcemanager in the patch passed.
-1 ❌ unit 176m 50s /patch-unit-hadoop-mapreduce-project_hadoop-mapreduce-client.txt hadoop-mapreduce-client in the patch passed.
+1 💚 unit 4m 59s hadoop-mapreduce-client-hs in the patch passed.
+1 💚 unit 23m 25s hadoop-hdfs-rbf in the patch passed.
+1 💚 unit 22m 8s hadoop-yarn-services-core in the patch passed.
+1 💚 unit 1m 31s hadoop-yarn-csi in the patch passed.
+1 💚 asflicense 1m 37s The patch does not generate ASF License warnings.
1014m 16s
Reason Tests
Failed junit tests hadoop.mapreduce.v2.TestMRJobsWithProfiler
hadoop.mapreduce.v2.TestMRJobs
hadoop.mapreduce.v2.TestUberAM
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4996/17/artifact/out/Dockerfile
GITHUB PR #4996
Optional Tests dupname asflicense codespell detsecrets xmllint compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle
uname Linux 9019b70f446b 4.15.0-212-generic #223-Ubuntu SMP Tue May 23 13:09:22 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 74b2a60
Default Java Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4996/17/testReport/
Max. process+thread count 3152 (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-nfs hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager hadoop-mapreduce-project/hadoop-mapreduce-client hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs hadoop-hdfs-project/hadoop-hdfs-rbf hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core hadoop-yarn-project/hadoop-yarn/hadoop-yarn-csi U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4996/17/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

Copy link
Member

@ayushtkn ayushtkn left a comment

Choose a reason for hiding this comment

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

Minor stuff nothing major, you can ignore whichever you want. I tried compiling locally with provided scope & it is all calm.

Do you expect any complications in Old client new Server scenarios? If so, I can quickly do some basic tests by deploying your branch and try a 3.3.6 client.

In general looks good at least to me, but I will try some normal tests post deploying this locally to see how things are

Comment on lines +93 to +94
<common.protobuf2.scope>compile</common.protobuf2.scope>
<!-- Protobuf scope in other modules which explicitly import the libarary -->
<transient.protobuf2.scope>${common.protobuf2.scope}</transient.protobuf2.scope>
Copy link
Member

Choose a reason for hiding this comment

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

you hardcoded compile, how do you test later that the compilation doesn't break by any change in future? may be a github action just doing the build with provided?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1
Same question.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i have a future plan to move to provided, but by making it a separate patch it becomes easier to revert if needed

@ayushtkn
Copy link
Member

Ohh, I forgot some:
Additional to previous ones
I think you should update the Building.txt file (https://github.com/apache/hadoop/blob/trunk/BUILDING.txt) and mention about this.
Second question: Do you want to keep providing scope optional or should we wrap this up under a profile?
Third: We still expect protobuf-2.5.0 to be packaged even if the scope is provided, right?

@steveloughran
Copy link
Contributor Author

Do you want to keep providing scope optional or should we wrap this up under a profile?

  1. the scope in this PR doesn't actually change protobuf 2.5 being exported
  2. i had a goal of a followup pr which did that, something isolated so easy to revert
  3. but yes, a protobuf-2.5.scope variable would let people switch from provided to compile on the command line.

now, if we make it a switch, should i do it in this pr or that followup I was thinking about

@ayushtkn
Copy link
Member

anything is good with me, can do in the followup pr as well

@apurtell
Copy link
Contributor

apurtell commented Aug 28, 2023

we can't cut an unshaded protobuf of some form without RPC not linking, so hbase/hive/ozone are in trouble here.

HBase branch-3 and trunk are fine, we use our own shaded protobuf everywhere. The major version increment allowed it.

For HBase branch-2, all the 2.x releases, and Apache Phoenix, the com.google.protobuf API classes are part of the RPC side of the Coprocessor API so indeed these would all be in trouble in theory. Internally even in 2.x releases we use protobuf 3 for actual RPC. The PB 2.5 classes are only required due to interface compatibility constraints and therefore its on us to ensure the dependencies are imported. We should not (and do not) depend on Hadoop providing an explicit export of PB 2.5 anyway.

When I made a similar change where I work in an internal fork of Hadoop 3 I removed the legacy RPC classes (ProtobufRpcEngine and such) so linkage without any PB 2.5 imports at the Hadoop level in any scope (compile, test, provided, whatever) was not an issue. I couldn't find any users of the legacy RPC classes in any of our downstream code. The only users were some Hadoop test classes, which could either be dropped as moot or modified to use ProtobufRpcEngine2. This is a much more isolated ecosystem than the public Hadoop one so YMMV, Spark is there but not Hive, and so on. Switching PB 2.5 to 'provided' would be a good careful initial step.


import org.apache.hadoop.thirdparty.protobuf.RpcController;
import org.apache.hadoop.thirdparty.protobuf.ServiceException;

import static org.apache.hadoop.ipc.internal.ShadedProtobufHelper.getRemoteException;
Copy link
Contributor

Choose a reason for hiding this comment

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

A minor nit. There is an inconsistency where the other helper methods in ShadedProtobufHelper are invoked without static import, but for some reason getRemoteException() is an exception. :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

switched back in this class. generally i was trying to make the diff smaller; must have got a bit over-enthusiastic here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually, done something more elegant

Comment on lines +93 to +94
<common.protobuf2.scope>compile</common.protobuf2.scope>
<!-- Protobuf scope in other modules which explicitly import the libarary -->
<transient.protobuf2.scope>${common.protobuf2.scope}</transient.protobuf2.scope>
Copy link
Contributor

Choose a reason for hiding this comment

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

+1
Same question.

@steveloughran
Copy link
Contributor Author

updated pr tries to address reviews, including building.txt details.

regarding @apurtell's comment about static vs qualified import of getRemoteException() I started to convert, but got fed up with the needless repetition. So upgraded the RPC invocations to java 8 language level (!!) by adding a new operation ipc() to take a lambda expression and do the invocation, translating the result

  public static <T> T ipc(IpcCall<T> call) throws IOException {
    try {
      return call.call();
    } catch (ServiceException e) {
      throw getRemoteException(e);
    }
  }

this lets us have far simpler invocations in the code

    status = ipc(() -> rpcProxy.getServiceStatus(NULL_CONTROLLER,
        GET_SERVICE_STATUS_REQ));

I've done this for hadoop-common; if all are happy then I will do for the rest of the modules

Copy link
Member

@ayushtkn ayushtkn left a comment

Choose a reason for hiding this comment

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

Thanx @steveloughran for the update. If the build comes green. Changes LGTM.

Regarding getRemoteException() I don't have any strong opinions around any approach, just be consistent through out the project.

Feel free to commit once you have a green build and you sort out getRemoteException for the entire project

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 53s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+0 🆗 xmllint 0m 1s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 3 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 14m 29s Maven dependency ordering for branch
+1 💚 mvninstall 31m 18s trunk passed
+1 💚 compile 17m 33s trunk passed with JDK Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu120.04
+1 💚 compile 15m 58s trunk passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
+1 💚 checkstyle 4m 28s trunk passed
+1 💚 mvnsite 19m 58s trunk passed
+1 💚 javadoc 8m 42s trunk passed with JDK Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu120.04
+1 💚 javadoc 7m 39s trunk passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
+0 🆗 spotbugs 0m 24s branch/hadoop-project no spotbugs output file (spotbugsXml.xml)
+1 💚 shadedclient 61m 45s branch has no errors when building and testing our client artifacts.
-0 ⚠️ patch 62m 11s Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 33s Maven dependency ordering for patch
+1 💚 mvninstall 38m 42s the patch passed
+1 💚 compile 16m 43s the patch passed with JDK Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu120.04
+1 💚 javac 16m 43s the patch passed
+1 💚 compile 16m 3s the patch passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
+1 💚 javac 16m 3s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 4m 41s /results-checkstyle-root.txt root: The patch generated 6 new + 269 unchanged - 8 fixed = 275 total (was 277)
+1 💚 mvnsite 15m 39s the patch passed
-1 ❌ javadoc 1m 28s /patch-javadoc-root-jdkUbuntu-11.0.20+8-post-Ubuntu-1ubuntu120.04.txt root in the patch failed with JDK Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu120.04.
+1 💚 javadoc 8m 4s the patch passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
+0 🆗 spotbugs 0m 20s hadoop-project has no data from spotbugs
+1 💚 shadedclient 66m 15s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 819m 58s /patch-unit-root.txt root in the patch passed.
+1 💚 asflicense 1m 56s The patch does not generate ASF License warnings.
1229m 9s
Reason Tests
Failed junit tests hadoop.yarn.server.resourcemanager.reservation.TestCapacityOverTimePolicy
hadoop.mapreduce.v2.TestMRJobsWithProfiler
hadoop.mapreduce.v2.TestMRJobs
hadoop.mapreduce.v2.TestUberAM
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4996/18/artifact/out/Dockerfile
GITHUB PR #4996
Optional Tests dupname asflicense codespell detsecrets xmllint compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle
uname Linux 10fc48a083be 4.15.0-212-generic #223-Ubuntu SMP Tue May 23 13:09:22 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 8f3ffd1
Default Java Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4996/18/testReport/
Max. process+thread count 3152 (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-nfs hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager hadoop-mapreduce-project/hadoop-mapreduce-client hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs hadoop-hdfs-project/hadoop-hdfs-rbf hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core hadoop-yarn-project/hadoop-yarn/hadoop-yarn-csi . U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4996/18/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@steveloughran
Copy link
Contributor Author

@ayushtkn thanks. i will do it everywhere; its the same as the s3a invoker stuff and it is more elegant, especially for anyone writing new rpc stuff

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 0s Docker mode activated.
-1 ❌ patch 0m 23s #4996 does not apply to trunk. Rebase required? Wrong Branch? See https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute for help.
Subsystem Report/Notes
GITHUB PR #4996
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4996/19/console
versions git=2.17.1
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

…ency.

The option common.protobuf.scope defines whether the protobuf 2.5.0
dependency is marked as provided or not.

* New package org.apache.hadoop.ipc.internal for internal only protobuf classes
  ...with a ShadedProtobufHelper in there which has shaded protobuf refs
  only, so guaranteed not to need protobuf-2.5 on the CP
* All uses of org.apache.hadoop.ipc.ProtobufHelper have
  been replaced by uses of org.apache.hadoop.ipc.internal.ShadedProtobufHelper
* The scope of protobuf-2.5 is set by the option common.protobuf2.scope
  In this patch is it is still "compile"
* There is explicit reference to it in modules where it may be needed.
*  The maven scope of the dependency can be set with the common.protobuf2.scope
   option. It can be set to "provided" in a build:
       -Dcommon.protobuf2.scope=provided
* * Add new ipc(callable) method to catch and convert shaded protobuf
  exceptions raised during invocation of the supplied lambda expression
* This is adopted in the code where the migration is not traumatically
  over-complex. RouterAdminProtocolTranslatorPB is left alone for this
  reason.
@steveloughran steveloughran force-pushed the feature/HADOOP-18487-downgrade-protobuf-2.5 branch from 12a0cca to a70ceff Compare October 6, 2023 10:30
@steveloughran
Copy link
Contributor Author

rebased for a retest, then will merge.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 53s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 2s No case conflicting files found.
+0 🆗 codespell 0m 2s codespell was not available.
+0 🆗 detsecrets 0m 2s detect-secrets was not available.
+0 🆗 xmllint 0m 2s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 3 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 14m 9s Maven dependency ordering for branch
+1 💚 mvninstall 31m 57s trunk passed
+1 💚 compile 17m 22s trunk passed with JDK Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu120.04
+1 💚 compile 16m 2s trunk passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
+1 💚 checkstyle 4m 25s trunk passed
+1 💚 mvnsite 19m 20s trunk passed
+1 💚 javadoc 8m 55s trunk passed with JDK Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu120.04
+1 💚 javadoc 7m 32s trunk passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
+0 🆗 spotbugs 0m 23s branch/hadoop-project no spotbugs output file (spotbugsXml.xml)
+1 💚 shadedclient 62m 25s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 33s Maven dependency ordering for patch
+1 💚 mvninstall 38m 11s the patch passed
+1 💚 compile 16m 50s the patch passed with JDK Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu120.04
+1 💚 javac 16m 50s the patch passed
+1 💚 compile 16m 9s the patch passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
+1 💚 javac 16m 9s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 4m 19s /results-checkstyle-root.txt root: The patch generated 7 new + 269 unchanged - 8 fixed = 276 total (was 277)
+1 💚 mvnsite 15m 3s the patch passed
-1 ❌ javadoc 1m 26s /patch-javadoc-root-jdkUbuntu-11.0.20+8-post-Ubuntu-1ubuntu120.04.txt root in the patch failed with JDK Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu120.04.
+1 💚 javadoc 7m 36s the patch passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
+0 🆗 spotbugs 0m 23s hadoop-project has no data from spotbugs
+1 💚 shadedclient 61m 54s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 787m 19s /patch-unit-root.txt root in the patch passed.
+1 💚 asflicense 1m 58s The patch does not generate ASF License warnings.
1190m 50s
Reason Tests
Failed junit tests hadoop.yarn.server.resourcemanager.reservation.TestCapacityOverTimePolicy
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4996/20/artifact/out/Dockerfile
GITHUB PR #4996
Optional Tests dupname asflicense codespell detsecrets xmllint compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle
uname Linux c983f319195e 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / a70ceff
Default Java Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4996/20/testReport/
Max. process+thread count 3162 (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-nfs hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager hadoop-mapreduce-project/hadoop-mapreduce-client hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs hadoop-hdfs-project/hadoop-hdfs-rbf hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core hadoop-yarn-project/hadoop-yarn/hadoop-yarn-csi . U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4996/20/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@steveloughran
Copy link
Contributor Author

test failure seems unrelated.
style

./hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/protocolPB/GenericRefreshProtocolClientSideTranslatorPB.java:62:      .setIdentifier(identifier): '.' has incorrect indentation level 6, expected level should be 8. [Indentation]
./hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/protocolPB/GenericRefreshProtocolClientSideTranslatorPB.java:63:      .addAllArgs(argList): '.' has incorrect indentation level 6, expected level should be 8. [Indentation]
./hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/protocolPB/GenericRefreshProtocolClientSideTranslatorPB.java:64:      .build();: '.' has incorrect indentation level 6, expected level should be 8. [Indentation]
./hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/protocolPB/GenericRefreshProtocolClientSideTranslatorPB.java:66:    GenericRefreshResponseCollectionProto resp = ipc(() -> rpcProxy.refresh(NULL_CONTROLLER, request));: Line is longer than 100 characters (found 103). [LineLength]
./hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/tools/protocolPB/GetUserMappingsProtocolClientSideTranslatorPB.java:27:import org.apache.hadoop.ipc.internal.ShadedProtobufHelper;:8: Unused import - org.apache.hadoop.ipc.internal.ShadedProtobufHelper. [UnusedImports]
./hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/tools/protocolPB/GetUserMappingsProtocolClientSideTranslatorPB.java:33:import org.apache.hadoop.thirdparty.protobuf.ServiceException;:8: Unused import - org.apache.hadoop.thirdparty.protobuf.ServiceException. [UnusedImports]
./hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocolPB/ClientDatanodeProtocolTranslatorPB.java:243:      ipc(() -> rpcProxy.shutdownDatanode(NULL_CONTROLLER, request));: 'method def' child has incorrect indentation level 6, expected level should be 4. [Indentation]

javadocs

[ERROR] in your comments are valid in HTML5, and remove the -html4 option.
[ERROR] /home/jenkins/jenkins-home/workspace/hadoop-multibranch_PR-4996/ubuntu-focal/src/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/ProtobufHelper.java:39: error: unknown tag: Deprecated:
[ERROR]  * @Deprecated: hadoop code MUST use {@link ShadedProtobufHelper}.

maybe its the :

Change-Id: I775e4836a61be60c2bb4c8c1c0133bef43111b5b
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 55s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+0 🆗 xmllint 0m 1s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 3 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 14m 31s Maven dependency ordering for branch
+1 💚 mvninstall 31m 40s trunk passed
+1 💚 compile 16m 32s trunk passed with JDK Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu120.04
+1 💚 compile 15m 25s trunk passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
+1 💚 checkstyle 4m 36s trunk passed
+1 💚 mvnsite 18m 53s trunk passed
+1 💚 javadoc 8m 42s trunk passed with JDK Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu120.04
+1 💚 javadoc 7m 32s trunk passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
+0 🆗 spotbugs 0m 23s branch/hadoop-project no spotbugs output file (spotbugsXml.xml)
+1 💚 shadedclient 64m 9s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 33s Maven dependency ordering for patch
+1 💚 mvninstall 38m 11s the patch passed
+1 💚 compile 16m 24s the patch passed with JDK Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu120.04
+1 💚 javac 16m 24s the patch passed
+1 💚 compile 16m 12s the patch passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
+1 💚 javac 16m 12s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 4m 58s root: The patch generated 0 new + 269 unchanged - 8 fixed = 269 total (was 277)
+1 💚 mvnsite 15m 22s the patch passed
+1 💚 javadoc 8m 33s the patch passed with JDK Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu120.04
+1 💚 javadoc 7m 29s the patch passed with JDK Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
+0 🆗 spotbugs 0m 23s hadoop-project has no data from spotbugs
+1 💚 shadedclient 61m 38s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 800m 7s /patch-unit-root.txt root in the patch passed.
+1 💚 asflicense 1m 53s The patch does not generate ASF License warnings.
1210m 5s
Reason Tests
Failed junit tests hadoop.hdfs.TestRollingUpgrade
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4996/21/artifact/out/Dockerfile
GITHUB PR #4996
Optional Tests dupname asflicense codespell detsecrets xmllint compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle
uname Linux d5886f541f8c 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 06b4b12
Default Java Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.20+8-post-Ubuntu-1ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_382-8u382-ga-1~20.04.1-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4996/21/testReport/
Max. process+thread count 3071 (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-nfs hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager hadoop-mapreduce-project/hadoop-mapreduce-client hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs hadoop-hdfs-project/hadoop-hdfs-rbf hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core hadoop-yarn-project/hadoop-yarn/hadoop-yarn-csi . U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4996/21/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@steveloughran
Copy link
Contributor Author

dfs upgrade test is flaky (and has a history), created HDFS-17224 to cover the new failure and verified it works standalone

@steveloughran steveloughran merged commit 9bc159f into apache:trunk Oct 13, 2023
steveloughran added a commit to steveloughran/hadoop that referenced this pull request Oct 13, 2023
…he#4996)

Protobuf 2.5 JAR is no longer needed at runtime.

The option common.protobuf.scope defines whether the protobuf 2.5.0
dependency is marked as provided or not.

* New package org.apache.hadoop.ipc.internal for internal only protobuf classes
  ...with a ShadedProtobufHelper in there which has shaded protobuf refs
  only, so guaranteed not to need protobuf-2.5 on the CP
* All uses of org.apache.hadoop.ipc.ProtobufHelper have
  been replaced by uses of org.apache.hadoop.ipc.internal.ShadedProtobufHelper
* The scope of protobuf-2.5 is set by the option common.protobuf2.scope
  In this patch is it is still "compile"
* There is explicit reference to it in modules where it may be needed.
*  The maven scope of the dependency can be set with the common.protobuf2.scope
   option. It can be set to "provided" in a build:
       -Dcommon.protobuf2.scope=provided
* Add new ipc(callable) method to catch and convert shaded protobuf
  exceptions raised during invocation of the supplied lambda expression
* This is adopted in the code where the migration is not traumatically
  over-complex. RouterAdminProtocolTranslatorPB is left alone for this
  reason.

Contributed by Steve Loughran

Change-Id: I7268580c3a6b40a1a72de79e36de58d2efb0b76e
steveloughran added a commit that referenced this pull request Oct 17, 2023
Protobuf 2.5 JAR is no longer needed at runtime.

The option common.protobuf.scope defines whether the protobuf 2.5.0
dependency is marked as provided or not.

* New package org.apache.hadoop.ipc.internal for internal only protobuf classes
  ...with a ShadedProtobufHelper in there which has shaded protobuf refs
  only, so guaranteed not to need protobuf-2.5 on the CP
* All uses of org.apache.hadoop.ipc.ProtobufHelper have
  been replaced by uses of org.apache.hadoop.ipc.internal.ShadedProtobufHelper
* The scope of protobuf-2.5 is set by the option common.protobuf2.scope
  In this patch is it is still "compile"
* There is explicit reference to it in modules where it may be needed.
*  The maven scope of the dependency can be set with the common.protobuf2.scope
   option. It can be set to "provided" in a build:
       -Dcommon.protobuf2.scope=provided
* Add new ipc(callable) method to catch and convert shaded protobuf
  exceptions raised during invocation of the supplied lambda expression
* This is adopted in the code where the migration is not traumatically
  over-complex. RouterAdminProtocolTranslatorPB is left alone for this
  reason.

Contributed by Steve Loughran
jiajunmao pushed a commit to jiajunmao/hadoop-MLEC that referenced this pull request Feb 6, 2024
…he#4996)


Protobuf 2.5 JAR is no longer needed at runtime. 

The option common.protobuf.scope defines whether the protobuf 2.5.0
dependency is marked as provided or not.

* New package org.apache.hadoop.ipc.internal for internal only protobuf classes
  ...with a ShadedProtobufHelper in there which has shaded protobuf refs
  only, so guaranteed not to need protobuf-2.5 on the CP
* All uses of org.apache.hadoop.ipc.ProtobufHelper have
  been replaced by uses of org.apache.hadoop.ipc.internal.ShadedProtobufHelper
* The scope of protobuf-2.5 is set by the option common.protobuf2.scope
  In this patch is it is still "compile"
* There is explicit reference to it in modules where it may be needed.
*  The maven scope of the dependency can be set with the common.protobuf2.scope
   option. It can be set to "provided" in a build:
       -Dcommon.protobuf2.scope=provided
* Add new ipc(callable) method to catch and convert shaded protobuf
  exceptions raised during invocation of the supplied lambda expression
* This is adopted in the code where the migration is not traumatically
  over-complex. RouterAdminProtocolTranslatorPB is left alone for this
  reason.

Contributed by Steve Loughran
prabhjyotsingh pushed a commit to acceldata-io/hadoop that referenced this pull request Mar 11, 2025
…ncy. (apache#4996)

Protobuf 2.5 JAR is no longer needed at runtime.

The option common.protobuf.scope defines whether the protobuf 2.5.0
dependency is marked as provided or not.

* New package org.apache.hadoop.ipc.internal for internal only protobuf classes
  ...with a ShadedProtobufHelper in there which has shaded protobuf refs
  only, so guaranteed not to need protobuf-2.5 on the CP
* All uses of org.apache.hadoop.ipc.ProtobufHelper have
  been replaced by uses of org.apache.hadoop.ipc.internal.ShadedProtobufHelper
* The scope of protobuf-2.5 is set by the option common.protobuf2.scope
  In this patch is it is still "compile"
* There is explicit reference to it in modules where it may be needed.
*  The maven scope of the dependency can be set with the common.protobuf2.scope
   option. It can be set to "provided" in a build:
       -Dcommon.protobuf2.scope=provided
* Add new ipc(callable) method to catch and convert shaded protobuf
  exceptions raised during invocation of the supplied lambda expression
* This is adopted in the code where the migration is not traumatically
  over-complex. RouterAdminProtocolTranslatorPB is left alone for this
  reason.

Contributed by Steve Loughran

(cherry picked from commit 48b37a7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants