Skip to content

Commit e15f1ab

Browse files
author
Michael Gummelt
committed
rat-excludes
1 parent ad4e33b commit e15f1ab

File tree

4 files changed

+3
-26
lines changed

4 files changed

+3
-26
lines changed

core/src/main/scala/org/apache/spark/deploy/security/ConfigurableCredentialManager.scala

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff 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
}

core/src/test/scala/org/apache/spark/deploy/security/ConfigurableCredentialManagerSuite.scala

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff 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()

dev/.rat-excludes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ spark-deps-.*
102102
org.apache.spark.scheduler.ExternalClusterManager
103103
.*\.sql
104104
.Rbuildignore
105-
org.apache.spark.deploy.security.ServiceCredentialProvider
105+
META-INF/services/*
106106
spark-warehouse
107107
structured-streaming/*
108108
kafka-source-initial-offset-version-2.1.0.bin

resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/security/ServiceCredentialProvider.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff 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+
}

0 commit comments

Comments
 (0)