-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-16742] Mesos Kerberos Support #18519
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
ff55b89
Mesos Kerberos support
64ab5d5
.
b1a90a9
.
794d26e
.
860351d
.
7e12dea
comments
973dce2
Add CredentialsSerializer
a9d8998
remove extra comments
5c59daa
style
5848a78
addressed comments
8662057
merge master
f903e6f
style
e6a7357
fixed old dep
4ba8bab
add dep to mesos project
641bdad
addressed comments
797fe4b
missed one..
cdd3030
fixed npe when using kerberos
63ca4db
wip, addressed comments and added tgt support
4a86186
added some docs for tgt
1f3ad35
reverted tgt changes
857cf31
re-added space in security.md
1d7ddbd
whitespace
4c77d54
small formatting change
685e976
merge master
c3050d1
merge master, address comments
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
addressed comments
- Loading branch information
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,11 +46,10 @@ import org.apache.spark.util.{RpcUtils, SerializableBuffer, ThreadUtils, Utils} | |
| */ | ||
| private[spark] | ||
| class CoarseGrainedSchedulerBackend( | ||
| scheduler: TaskSchedulerImpl, | ||
| val rpcEnv: RpcEnv, | ||
| hadoopDelegationTokenManager: Option[HadoopDelegationTokenManager]) | ||
| extends ExecutorAllocationClient with SchedulerBackend with Logging | ||
| { | ||
| scheduler: TaskSchedulerImpl, | ||
|
||
| val rpcEnv: RpcEnv) | ||
| extends ExecutorAllocationClient with SchedulerBackend with Logging { | ||
|
|
||
| // Use an atomic variable to track total number of cores in the cluster for simplicity and speed | ||
| protected val totalCoreCount = new AtomicInteger(0) | ||
| // Total number of executors that are currently registered | ||
|
|
@@ -102,6 +101,9 @@ class CoarseGrainedSchedulerBackend( | |
| // The num of current max ExecutorId used to re-register appMaster | ||
| @volatile protected var currentExecutorIdCounter = 0 | ||
|
|
||
| // hadoop token manager used by some sub-classes (e.g. Mesos) | ||
| protected val hadoopDelegationTokenManager: Option[HadoopDelegationTokenManager] = None | ||
|
|
||
| // Hadoop delegation tokens to be sent to the executors. | ||
| private val hadoopDelegationCreds = getHadoopDelegationCreds() | ||
|
|
||
|
|
@@ -689,7 +691,7 @@ class CoarseGrainedSchedulerBackend( | |
| } | ||
|
|
||
| private def getHadoopDelegationCreds(): Option[Array[Byte]] = { | ||
| if (UserGroupInformation.isSecurityEnabled) { | ||
| if (UserGroupInformation.isSecurityEnabled && hadoopDelegationTokenManager.isDefined) { | ||
| hadoopDelegationTokenManager.map { manager => | ||
| val creds = UserGroupInformation.getCurrentUser.getCredentials | ||
| val hadoopConf = SparkHadoopUtil.get.newConfiguration(conf) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,13 +56,13 @@ private[spark] class MesosCoarseGrainedSchedulerBackend( | |
| securityManager: SecurityManager) | ||
| extends CoarseGrainedSchedulerBackend( | ||
| scheduler, | ||
| sc.env.rpcEnv, | ||
| Some(new HadoopDelegationTokenManager( | ||
| sc.conf, | ||
| sc.hadoopConfiguration))) | ||
| sc.env.rpcEnv) | ||
| with org.apache.mesos.Scheduler | ||
| with MesosSchedulerUtils { | ||
|
|
||
| override val hadoopDelegationTokenManager: Option[HadoopDelegationTokenManager] = | ||
|
||
| Some(new HadoopDelegationTokenManager(sc.conf, sc.hadoopConfiguration)) | ||
|
|
||
| // Blacklist a slave after this many failures | ||
| private val MAX_SLAVE_FAILURES = 2 | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're not changing anything here now, are you?