File tree Expand file tree Collapse file tree 4 files changed +3
-26
lines changed
main/scala/org/apache/spark/deploy/security
test/scala/org/apache/spark/deploy/security
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/security Expand file tree Collapse file tree 4 files changed +3
-26
lines changed Original file line number Diff line number Diff line change @@ -130,17 +130,4 @@ private[spark] class ConfigurableCredentialManager(
130130 }
131131 }.foldLeft(Long .MaxValue )(math.min)
132132 }
133-
134- /**
135- * Returns a copy of the current user's credentials, augmented with new delegation tokens.
136- */
137- def obtainUserCredentials : Credentials = {
138- val userCreds = UserGroupInformation .getCurrentUser.getCredentials
139- val numTokensBefore = userCreds.numberOfTokens
140- obtainCredentials(hadoopConf, userCreds)
141-
142- logDebug(s " Fetched ${userCreds.numberOfTokens - numTokensBefore} delegation token(s). " )
143-
144- userCreds
145- }
146133}
Original file line number Diff line number Diff line change @@ -79,14 +79,6 @@ class ConfigurableCredentialManagerSuite extends SparkFunSuite with Matchers wit
7979 tokens.iterator().next().getService should be (new Text (" test" ))
8080 }
8181
82- test(" verify obtaining user credentials" ) {
83- credentialManager = new ConfigurableCredentialManager (sparkConf, hadoopConf)
84-
85- val initNumTokens = UserGroupInformation .getCurrentUser.getCredentials.numberOfTokens
86- val creds = credentialManager.obtainUserCredentials
87- creds.numberOfTokens() should be (initNumTokens + 1 )
88- }
89-
9082 test(" verify getting credential renewal info" ) {
9183 credentialManager = new ConfigurableCredentialManager (sparkConf, hadoopConf)
9284 val creds = new Credentials ()
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ spark-deps-.*
102102org.apache.spark.scheduler.ExternalClusterManager
103103.*\.sql
104104.Rbuildignore
105- org.apache.spark.deploy.security.ServiceCredentialProvider
105+ META-INF/services/*
106106spark-warehouse
107107structured-streaming/*
108108kafka-source-initial-offset-version-2.1.0.bin
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ trait ServiceCredentialProvider {
4747 * Obtain credentials for this service and get the time of the next renewal.
4848 *
4949 * @param hadoopConf Configuration of current Hadoop Compatible system.
50- * @param sparkConf SparkConf
50+ * @param sparkConf Spark configuration.
5151 * @param creds Credentials to add tokens and security keys to.
5252 * @return If this Credential is renewable and can be renewed, return the time of the next
5353 * renewal, otherwise None should be returned.
@@ -56,6 +56,4 @@ trait ServiceCredentialProvider {
5656 hadoopConf : Configuration ,
5757 sparkConf : SparkConf ,
5858 creds : Credentials ): Option [Long ]
59- }
60-
61-
59+ }
You can’t perform that action at this time.
0 commit comments