Skip to content

Commit dfe3918

Browse files
committed
Fix merge conflict since startUserClass now using runAsUser
1 parent 05eebed commit dfe3918

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ class ApplicationMaster(args: ApplicationMasterArguments, conf: Configuration,
9090
addAmIpFilter()
9191

9292
ApplicationMaster.register(this)
93+
94+
// Call this to force generation of secret so it gets populated into the
95+
// hadoop UGI. This has to happen before the startUserClass which does a
96+
// doAs in order for the credentials to be passed on to the worker containers.
97+
val securityMgr = new SecurityManager(sparkConf)
98+
9399
// Start the user's JAR
94100
userThread = startUserClass()
95101

yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ class ApplicationMaster(args: ApplicationMasterArguments, conf: Configuration,
9696

9797
ApplicationMaster.register(this)
9898

99+
// Call this to force generation of secret so it gets populated into the
100+
// hadoop UGI. This has to happen before the startUserClass which does a
101+
// doAs in order for the credentials to be passed on to the worker containers.
102+
val securityMgr = new SecurityManager(sparkConf)
103+
99104
// Start the user's JAR
100105
userThread = startUserClass()
101106

0 commit comments

Comments
 (0)