Skip to content

TEZ-4715: Migrate Tez PB Protocols from ProtobufRPCEngine to ProtobufRPCEngine2#493

Open
Aggarwal-Raghav wants to merge 1 commit into
apache:masterfrom
Aggarwal-Raghav:TEZ-4715
Open

TEZ-4715: Migrate Tez PB Protocols from ProtobufRPCEngine to ProtobufRPCEngine2#493
Aggarwal-Raghav wants to merge 1 commit into
apache:masterfrom
Aggarwal-Raghav:TEZ-4715

Conversation

@Aggarwal-Raghav
Copy link
Copy Markdown
Contributor

@Aggarwal-Raghav Aggarwal-Raghav commented Apr 28, 2026

  1. Migrated Protobuf imports from com.google.protobuf to shaded org.apache.hadoop.thirdparty.protobuf
  2. Added hadoop-thirdparty dependency (v1.4.0) to the root POM to ensure Hadoop 3.4.2 compatibility. This will be updated for every hadoop version upgrade. For now I have kept proto version to 3.25.5 as it was in tez and will be in-sync with hadoop-3.5.0
  3. Used maven-replacer-plugin (same as hadoop) to automated package refactoring in generated proto code.

@tez-yetus
Copy link
Copy Markdown

(!) A patch to the testing environment has been detected.
Re-executing against the patched versions to perform further tests.
The console is at https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-493/1/console in case of problems.

@Aggarwal-Raghav
Copy link
Copy Markdown
Contributor Author

Jenkins is not updating the final status 😔

[2026-04-29T22:12:13.679Z] 
[2026-04-29T22:12:13.679Z] ============================================================================
[2026-04-29T22:12:13.679Z] ============================================================================
[2026-04-29T22:12:13.679Z]                          Adding comment to Github
[2026-04-29T22:12:13.679Z] ============================================================================
[2026-04-29T22:12:13.679Z] ============================================================================
[2026-04-29T22:12:13.679Z] 
[2026-04-29T22:12:13.679Z] 
[2026-04-29T22:12:16.867Z] ERROR: Failed to write github status. Token expired or missing repo:status write?
[2026-04-29T22:12:16.867Z] ERROR: Failed to write github status. Token expired or missing repo:status write?
[2026-04-29T22:12:17.431Z] ERROR: Failed to write github status. Token expired or missing repo:status write?
[2026-04-29T22:12:17.431Z] ERROR: Failed to write github status. Token expired or missing repo:status write?
[2026-04-29T22:12:17.997Z] ERROR: Failed to write github status. Token expired or missing repo:status write?
[2026-04-29T22:12:18.561Z] ERROR: Failed to write github status. Token expired or missing repo:status write?
[2026-04-29T22:12:18.561Z] ERROR: Failed to write github status. Token expired or missing repo:status write?
[2026-04-29T22:12:19.124Z] ERROR: Failed to write github status. Token expired or missing repo:status write?
[2026-04-29T22:12:19.689Z] ERROR: Failed to write github status. Token expired or missing repo:status write?
[2026-04-29T22:12:19.689Z] ERROR: Failed to write github status. Token expired or missing repo:status write?
[2026-04-29T22:12:20.253Z] ERROR: Failed to write github status. Token expired or missing repo:status write?

@Aggarwal-Raghav
Copy link
Copy Markdown
Contributor Author

Aggarwal-Raghav commented May 1, 2026

The UT failure debugging in #483 (comment) requires hadoop thirdparty making this PR dependent.

TEZ-4715 + TEZ-4708 will completely migrate tez from WritableRPCEngine + ProtobufRPCEngine => ProtobufRPCEngine2

@abstractdog abstractdog requested a review from ayushtkn May 2, 2026 05:51
@ayushtkn
Copy link
Copy Markdown
Member

ayushtkn commented May 2, 2026

@abstractdog From the code point of view, this seems right, We had to just use the RPCEngine2 & migrate to the Hadoop Thirdparty. That is rightly done here.

But I think this would be an incompatible change, beyond this point I believe Hive master won't build nor work with Tez master. Hive has to do the same activity when moving to Tez-1.0.0 & that would be incompatible for Hive as well & believe the older Hadoop versions won't work post this activity in Hive or Tez, unless there was something done later to fix it, which I don't think...

There were compat issues that is why I believe HADOOP-17046 was done later to make sure older client can work with them. Means protobuf is indeed a very known heavy Incompat change, a lot of discussion at HADOOP-13363, in case interested.

These are the tradeoffs, I just wanted to highlight. Rest all cool

@Aggarwal-Raghav
Copy link
Copy Markdown
Contributor Author

@abstractdog @ayushtkn , can you help on the CI for this?

[2026-05-01T08:30:07.897Z] ERROR: Caught signal TERM.
[2026-05-01T08:30:07.897Z] 
[2026-05-01T08:30:07.897Z] 
[2026-05-01T08:30:07.897Z] Cleaning up docker image used for testing.
[2026-05-01T08:30:07.897Z] [Fri May  1 08:30:04 AM UTC 2026 DEBUG]: dockercmd: /usr/bin/docker rmi yetus/tez:tp-3788
[2026-05-01T08:30:07.898Z] Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

@tez-yetus

This comment was marked as outdated.

@tez-yetus

This comment was marked as outdated.

@Aggarwal-Raghav
Copy link
Copy Markdown
Contributor Author

I verified that the JAVA_HOME exists in the docker image
Screenshot 2026-05-10 at 4 26 48 PM

but it the jenkins the JAVA_HOME is explicitly set:

2026-05-10T10:51:24.988Z] [Sun May 10 10:51:24 AM UTC 2026 DEBUG]: dockercmd: /usr/bin/docker run --rm=true -i -v ... --env=JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64 

@tez-yetus
Copy link
Copy Markdown

(!) A patch to the testing environment has been detected.
Re-executing against the patched versions to perform further tests.
The console is at https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-493/6/console in case of problems.

@tez-yetus

This comment was marked as outdated.

@tez-yetus
Copy link
Copy Markdown

(!) A patch to the testing environment has been detected.
Re-executing against the patched versions to perform further tests.
The console is at https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-493/7/console in case of problems.

@tez-yetus

This comment was marked as outdated.

Aggarwal-Raghav added a commit to Aggarwal-Raghav/tez that referenced this pull request May 10, 2026
…erfile (apache#493)

- Resolve JAVA_HOME mismatch by creating a symlink from the host's expected path
  (/usr/lib/jvm/java-XX-openjdk-amd64) to the container's internal path (/opt/java/openjdk).
- Parameterize JAVA_VERSION using a build argument to simplify future JDK upgrades.
- Add descriptive comments regarding environment variable propagation from Yetus.
- Fix ShellCheck SC2086 by adding quotes to the symlink path.
@Aggarwal-Raghav
Copy link
Copy Markdown
Contributor Author

@abstractdog , can you please remove the JAVA_HOME env varaible setting in docke run command from Jenkins?
I tried creating symlink but its not helping.

Let me know if i need to revert #494.

CI for tez is not a good experiece at all, this issue should have been caught in #494 itself. Moreover, not sure why mvninstall is failing in run 4. This diff patch running is not helping as it is trying to dowload the SNAPSHOT tez modules jars (i believe).

@abstractdog
Copy link
Copy Markdown
Contributor

@abstractdog , can you please remove the JAVA_HOME env varaible setting in docke run command from Jenkins? I tried creating symlink but its not helping.

Let me know if i need to revert #494.

CI for tez is not a good experiece at all, this issue should have been caught in #494 itself. Moreover, not sure why mvninstall is failing in run 4. This diff patch running is not helping as it is trying to dowload the SNAPSHOT tez modules jars (i believe).

this is very weird, I guess your Dockerfile change didn't trigger a precommit test
I'm in favor of running the whole test for every PR, I already created a corresponding ticket for that https://issues.apache.org/jira/browse/TEZ-4355

your improvement in #494 was great, so I would not revert it if we can fix the problem in 1-2 days (considering the project's pace, it's fine)

@Aggarwal-Raghav
Copy link
Copy Markdown
Contributor Author

Aggarwal-Raghav commented May 10, 2026

OK, pipeline seems to be progressing now. I have updated the JAVA_HOME in Jenkinsfile to match the eclipse temurin JAVA_HOME. Internally we use cloudbees Jenkins and some additional tools that passes the env variables, so I thought that JAVA_HOME was coming from Jenkins UI but it was not the case. That's why I asked:

can you please remove the JAVA_HOME env varaible setting in docke run command from Jenkins? I tried creating symlink but its not helping.

If the run#8 works then I'll raise an addendum PR for TEZ-4717 incorporating Jenkins file change in it. I don't see any other place in project where it need updation for JAVA_HOME

Screenshot 2026-05-11 at 2 33 20 AM

@tez-yetus

This comment was marked as outdated.

@tez-yetus
Copy link
Copy Markdown

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 35s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+0 🆗 xmllint 0m 0s 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 34 new or modified test files.
_ master Compile Tests _
+0 🆗 mvndep 0m 42s Maven dependency ordering for branch
+1 💚 mvninstall 4m 35s master passed
+1 💚 compile 7m 53s master passed
+1 💚 checkstyle 6m 9s master passed
+1 💚 javadoc 6m 37s master passed
+0 🆗 spotbugs 1m 21s tez-api in master has 92 extant spotbugs warnings.
+0 🆗 spotbugs 0m 46s tez-common in master has 13 extant spotbugs warnings.
+0 🆗 spotbugs 0m 53s tez-runtime-internals in master has 92 extant spotbugs warnings.
+0 🆗 spotbugs 1m 12s tez-runtime-library in master has 143 extant spotbugs warnings.
+0 🆗 spotbugs 0m 55s tez-mapreduce in master has 97 extant spotbugs warnings.
+0 🆗 spotbugs 1m 40s tez-dag in master has 537 extant spotbugs warnings.
+0 🆗 spotbugs 0m 50s tez-tests in master has 6 extant spotbugs warnings.
+0 🆗 spotbugs 0m 49s tez-plugins/tez-protobuf-history-plugin in master has 7 extant spotbugs warnings.
+0 🆗 spotbugs 0m 42s tez-plugins/tez-yarn-timeline-history-with-fs in master has 5 extant spotbugs warnings.
+0 🆗 spotbugs 0m 45s tez-plugins/tez-aux-services in master has 5 extant spotbugs warnings.
+0 🆗 spotbugs 6m 39s root in master has 1051 extant spotbugs warnings.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 15s Maven dependency ordering for patch
-1 ❌ mvninstall 0m 23s /patch-mvninstall-tez-runtime-library.txt tez-runtime-library in the patch failed.
-1 ❌ mvninstall 0m 29s /patch-mvninstall-tez-dag.txt tez-dag in the patch failed.
-1 ❌ mvninstall 0m 17s /patch-mvninstall-tez-tests.txt tez-tests in the patch failed.
-1 ❌ mvninstall 0m 15s /patch-mvninstall-tez-plugins_tez-yarn-timeline-history-with-fs.txt tez-yarn-timeline-history-with-fs in the patch failed.
+1 💚 codespell 1m 46s No new issues.
+1 💚 compile 7m 58s the patch passed
+1 💚 javac 7m 58s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 6m 13s the patch passed
+1 💚 javadoc 6m 37s the patch passed
-1 ❌ spotbugs 1m 2s /new-spotbugs-tez-plugins_tez-protobuf-history-plugin.html tez-plugins/tez-protobuf-history-plugin generated 4 new + 3 unchanged - 4 fixed = 7 total (was 7)
-1 ❌ spotbugs 7m 5s /new-spotbugs-root.html root generated 4 new + 1047 unchanged - 4 fixed = 1051 total (was 1051)
_ Other Tests _
+1 💚 unit 2m 25s tez-api in the patch passed.
+1 💚 unit 0m 39s tez-common in the patch passed.
+1 💚 unit 0m 59s tez-runtime-internals in the patch passed.
+1 💚 unit 5m 47s tez-runtime-library in the patch passed.
+1 💚 unit 1m 26s tez-mapreduce in the patch passed.
+1 💚 unit 5m 24s tez-dag in the patch passed.
+1 💚 unit 40m 30s tez-tests in the patch passed.
+1 💚 unit 4m 20s tez-ext-service-tests in the patch passed.
+1 💚 unit 0m 41s tez-protobuf-history-plugin in the patch passed.
+1 💚 unit 1m 43s tez-yarn-timeline-history-with-fs in the patch passed.
+1 💚 unit 2m 56s tez-aux-services in the patch passed.
+1 💚 unit 69m 3s root in the patch passed.
+1 💚 asflicense 5m 39s The patch does not generate ASF License warnings.
242m 30s
Reason Tests
SpotBugs module:tez-plugins/tez-protobuf-history-plugin
Exception thrown in class org.apache.tez.dag.history.logging.proto.DatePartitionedLogger at new org.apache.tez.dag.history.logging.proto.DatePartitionedLogger(Parser, Path, Configuration, Clock) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. At DatePartitionedLogger.java:at new org.apache.tez.dag.history.logging.proto.DatePartitionedLogger(Parser, Path, Configuration, Clock) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. At DatePartitionedLogger.java:[line 68]
org.apache.tez.dag.history.logging.proto.ProtoMessageWritable.getMessage() may expose internal representation by returning ProtoMessageWritable.message At ProtoMessageWritable.java:by returning ProtoMessageWritable.message At ProtoMessageWritable.java:[line 48]
org.apache.tez.dag.history.logging.proto.ProtoMessageWritable.setMessage(MessageLite) may expose internal representation by storing an externally mutable object into ProtoMessageWritable.message At ProtoMessageWritable.java:by storing an externally mutable object into ProtoMessageWritable.message At ProtoMessageWritable.java:[line 52]
Exception thrown in class org.apache.tez.dag.history.logging.proto.ProtoMessageWriter at new org.apache.tez.dag.history.logging.proto.ProtoMessageWriter(Configuration, Path, Parser) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. At ProtoMessageWriter.java:at new org.apache.tez.dag.history.logging.proto.ProtoMessageWriter(Configuration, Path, Parser) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. At ProtoMessageWriter.java:[line 41]
SpotBugs module:root
Exception thrown in class org.apache.tez.dag.history.logging.proto.DatePartitionedLogger at new org.apache.tez.dag.history.logging.proto.DatePartitionedLogger(Parser, Path, Configuration, Clock) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. At DatePartitionedLogger.java:at new org.apache.tez.dag.history.logging.proto.DatePartitionedLogger(Parser, Path, Configuration, Clock) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. At DatePartitionedLogger.java:[line 68]
org.apache.tez.dag.history.logging.proto.ProtoMessageWritable.getMessage() may expose internal representation by returning ProtoMessageWritable.message At ProtoMessageWritable.java:by returning ProtoMessageWritable.message At ProtoMessageWritable.java:[line 48]
org.apache.tez.dag.history.logging.proto.ProtoMessageWritable.setMessage(MessageLite) may expose internal representation by storing an externally mutable object into ProtoMessageWritable.message At ProtoMessageWritable.java:by storing an externally mutable object into ProtoMessageWritable.message At ProtoMessageWritable.java:[line 52]
Exception thrown in class org.apache.tez.dag.history.logging.proto.ProtoMessageWriter at new org.apache.tez.dag.history.logging.proto.ProtoMessageWriter(Configuration, Path, Parser) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. At ProtoMessageWriter.java:at new org.apache.tez.dag.history.logging.proto.ProtoMessageWriter(Configuration, Path, Parser) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. At ProtoMessageWriter.java:[line 41]
Subsystem Report/Notes
Docker ClientAPI=1.54 ServerAPI=1.54 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-493/9/artifact/out/Dockerfile
GITHUB PR #493
Optional Tests dupname asflicense codespell detsecrets javac javadoc unit xmllint compile spotbugs checkstyle
uname Linux 74fa79c5e7c9 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-home/workspace/tez-multibranch_PR-493/src/.yetus/personality.sh
git revision master / 7490d7d
Default Java Eclipse Adoptium-21.0.11+10-LTS
Test Results https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-493/9/testReport/
Max. process+thread count 1349 (vs. ulimit of 5500)
modules C: tez-api tez-common tez-runtime-internals tez-runtime-library tez-mapreduce tez-dag tez-tests tez-ext-service-tests tez-plugins/tez-protobuf-history-plugin tez-plugins/tez-yarn-timeline-history-with-fs tez-plugins/tez-aux-services . U: .
Console output https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-493/9/console
versions git=2.43.0 maven=3.9.15 spotbugs=4.9.3 codespell=2.4.1
Powered by Apache Yetus 0.15.1 https://yetus.apache.org

This message was automatically generated.

@Aggarwal-Raghav
Copy link
Copy Markdown
Contributor Author

This is ready for review @ayushtkn @abstractdog , the spotbugs are unrelated and mvninstall is false positive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants