Skip to content

TEZ-4638: Fix the kerberos issue when there is big DAG plan using HDFS - #422

Open
alexdongli0829 wants to merge 3 commits into
apache:masterfrom
alexdongli0829:master
Open

TEZ-4638: Fix the kerberos issue when there is big DAG plan using HDFS#422
alexdongli0829 wants to merge 3 commits into
apache:masterfrom
alexdongli0829:master

Conversation

@alexdongli0829

Copy link
Copy Markdown

In the fix, it will get the AM UGI when creating this DAGClientAMProtocolBlockingPBServerImpl and this UGI has all the needed token which Tez AM container used, so if there is need to talk to HDFS, using the AM UGI instead if possible

@alexdongli0829alexdongli0829 changed the title [TEZ-4638]Fix the kerberos issue when there is big DAG plan using HDFSTEZ-4638: Fix the kerberos issue when there is big DAG plan using HDFSJul 7, 2025
@alexdongli0829

Copy link
Copy Markdown
Author

Integration test on cluster

Prepare the DAG which is big enough (adjust the IPC limit "ipc.maximum.data.length" if necessary)
Before the fix

2025-06-30T10:18:18,760 INFO [ce4666f9-a278-4f15-be97-ae59b727e14b main([])]: client.TezClient (:()) - Send dag plan using YARN local resources since it's too large, dag plan size=385547, max dag plan size through IPC=128974848, max IPC message size= 134217728
2025-06-30T10:18:18,809 INFO [ce4666f9-a278-4f15-be97-ae59b727e14b main([])]: exec.Task (:()) - Dag submit failed due to DestHost:destPort ip-172-31-93-189.ec2.internal:8020 , LocalHost:localPort ip-172-31-93-68.ec2.internal/172.31.93.68:0. Failed on local exception: java.io.IOException: org.apache.hadoop.security.AccessControlException: Client cannot authenticate via:[TOKEN, KERBEROS]
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:964)
at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:939)
at org.apache.hadoop.ipc.Client.getRpcResponse(Client.java:1679)
at org.apache.hadoop.ipc.Client.call(Client.java:1620)
at org.apache.hadoop.ipc.Client.call(Client.java:1517)
at org.apache.hadoop.ipc.ProtobufRpcEngine2$Invoker.invoke(ProtobufRpcEngine2.java:258)
at org.apache.hadoop.ipc.ProtobufRpcEngine2$Invoker.invoke(ProtobufRpcEngine2.java:139)

After the fix

2025-06-30T10:34:52,975 INFO [8f4c8a93-f6a9-4d6d-a813-cb946649815a main([])]: client.TezClient (:()) - Send dag plan using YARN local resources since it's too large, dag plan size=389516, max dag plan size through IPC=128974848, max IPC message size= 134217728
2025-06-30T10:34:53,171 INFO [8f4c8a93-f6a9-4d6d-a813-cb946649815a main([])]: client.FrameworkClient (:()) - Submitted dag to TezSession, sessionName=HIVE-8f4c8a93-f6a9-4d6d-a813-cb946649815a, applicationId=application_1751278111719_0008, dagId=dag_1751278111719_0008_1, dagName=select count(*) from drone_orders where ...0 (Stage-1)
2025-06-30T10:34:53,490 INFO [8f4c8a93-f6a9-4d6d-a813-cb946649815a main([])]: SessionState (:()) - Status: Running (Executing on YARN cluster with App id application_1751278111719_0008)
2025-06-30T10:34:53,505 INFO [8f4c8a93-f6a9-4d6d-a813-cb946649815a main([])]: SessionState (:()) - Map 1: -/- Reducer 2: 0/1
2025-06-30T10:34:56,532 INFO [8f4c8a93-f6a9-4d6d-a813-cb946649815a main([])]: SessionState (:()) - Map 1: -/- Reducer 2: 0/1
2025-06-30T10:34:57,541 INFO [8f4c8a93-f6a9-4d6d-a813-cb946649815a main([])]: SessionState (:()) - Map 1: 0/54 Reducer 2: 0/1
2025-06-30T10:35:00,565 INFO [8f4c8a93-f6a9-4d6d-a813-cb946649815a main([])]: SessionState (:()) - Map 1: 0/54 Reducer 2: 0/1
2025-06-30T10:35:01,070 INFO [8f4c8a93-f6a9-4d6d-a813-cb946649815a main([])]: SessionState (:()) - Map 1: 0(+3)/54 Reducer 2: 0/1
2025-06-30T10:35:02,084 INFO [8f4c8a93-f6a9-4d6d-a813-cb946649815a main([])]: SessionState (:()) - Map 1: 0(+5)/54 Reducer 2: 0/1
2025-06-30T10:35:02,589 INFO [8f4c8a93-f6a9-4d6d-a813-cb946649815a main([])]: SessionState (:()) - Map 1: 0(+7)/54 Reducer 2: 0/1
2025-06-30T10:35:03,598 INFO [8f4c8a93-f6a9-4d6d-a813-cb946649815a main([])]: SessionState (:()) - Map 1: 0(+9)/54 Reducer 2: 0/1
2025-06-30T10:35:04,103 INFO [8f4c8a93-f6a9-4d6d-a813-cb946649815a main([])]: SessionState (:()) - Map 1: 0(+11)/54 Reducer 2: 0/1

@tez-yetus

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec14m 49sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚test4tests0m 0sThe patch appears to include 1 new or modified test files.
_ master Compile Tests _
+1 💚mvninstall9m 25smaster passed
+1 💚compile0m 24smaster passed
+1 💚checkstyle0m 52smaster passed
+1 💚javadoc0m 20smaster passed
+0 🆗spotbugs1m 40stez-dag in master has 785 extant spotbugs warnings.
-0 ⚠️patch1m 47sUsed diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+1 💚mvninstall0m 17sthe patch passed
-1 ❌codespell0m 15s/results-codespell.txtThe patch generated 7 new + 0 unchanged - 0 fixed = 7 total (was 0)
+1 💚compile0m 16sthe patch passed
+1 💚javac0m 16sthe patch passed
-1 ❌blanks0m 0s/blanks-eol.txtThe patch has 1 line(s) that end in blanks. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply
-0 ⚠️checkstyle0m 9s/results-checkstyle-tez-dag.txttez-dag: The patch generated 3 new + 4 unchanged - 0 fixed = 7 total (was 4)
+1 💚javadoc0m 6sthe patch passed
+1 💚spotbugs1m 3sthe patch passed
_ Other Tests _
+1 💚unit3m 53stez-dag in the patch passed.
+1 💚asflicense0m 11sThe patch does not generate ASF License warnings.
34m 27s
SubsystemReport/Notes
DockerClientAPI=1.51 ServerAPI=1.51 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-422/1/artifact/out/Dockerfile
GITHUB PR#422
Optional Testsdupname asflicense javac javadoc unit spotbugs checkstyle codespell detsecrets compile
unameLinux f931006b647c 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-home/workspace/tez-multibranch_PR-422/src/.yetus/personality.sh
git revisionmaster / f28d7cb
Default JavaUbuntu-21.0.7+6-Ubuntu-0ubuntu124.04
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-422/1/testReport/
Max. process+thread count216 (vs. ulimit of 5500)
modulesC: tez-dag U: tez-dag
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-422/1/console
versionsgit=2.43.0 maven=3.8.7 spotbugs=4.9.3 codespell=2.0.0
Powered byApache Yetus 0.15.1 https://yetus.apache.org

This message was automatically generated.

@tez-yetus

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 10sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚test4tests0m 0sThe patch appears to include 1 new or modified test files.
_ master Compile Tests _
+1 💚mvninstall9m 37smaster passed
+1 💚compile0m 27smaster passed
+1 💚checkstyle0m 50smaster passed
+1 💚javadoc0m 24smaster passed
+0 🆗spotbugs1m 50stez-dag in master has 785 extant spotbugs warnings.
-0 ⚠️patch1m 58sUsed diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+1 💚mvninstall0m 18sthe patch passed
-1 ❌codespell0m 21s/results-codespell.txtThe patch generated 7 new + 0 unchanged - 0 fixed = 7 total (was 0)
+1 💚compile0m 17sthe patch passed
+1 💚javac0m 17sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
-0 ⚠️checkstyle0m 8s/results-checkstyle-tez-dag.txttez-dag: The patch generated 3 new + 4 unchanged - 0 fixed = 7 total (was 4)
+1 💚javadoc0m 5sthe patch passed
+1 💚spotbugs1m 12sthe patch passed
_ Other Tests _
+1 💚unit4m 13stez-dag in the patch passed.
+1 💚asflicense0m 11sThe patch does not generate ASF License warnings.
20m 59s
SubsystemReport/Notes
DockerClientAPI=1.51 ServerAPI=1.51 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-422/2/artifact/out/Dockerfile
GITHUB PR#422
Optional Testsdupname asflicense javac javadoc unit spotbugs checkstyle codespell detsecrets compile
unameLinux 1e986561ba05 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-home/workspace/tez-multibranch_PR-422/src/.yetus/personality.sh
git revisionmaster / a926b41
Default JavaUbuntu-21.0.7+6-Ubuntu-0ubuntu124.04
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-422/2/testReport/
Max. process+thread count258 (vs. ulimit of 5500)
modulesC: tez-dag U: tez-dag
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-422/2/console
versionsgit=2.43.0 maven=3.8.7 spotbugs=4.9.3 codespell=2.0.0
Powered byApache Yetus 0.15.1 https://yetus.apache.org

This message was automatically generated.

Sign up for freeto 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.

2 participants

@alexdongli0829@tez-yetus