-
Notifications
You must be signed in to change notification settings - Fork 117
Basic Secure HDFS Support [514] #540
Changes from 1 commit
7612bf5
50f47d0
87df4a7
67856a5
7cdae31
04aa26f
765455d
488b37e
37feb22
4e44027
86c7b8f
64b0af7
ba2bafc
0c99503
a9d074b
a3b12a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,6 +67,7 @@ private[spark] class HadoopUGIUtil{ | |
| val byteStream = new ByteArrayOutputStream | ||
| val dataStream = new DataOutputStream(byteStream) | ||
|
||
| creds.writeTokenStorageToStream(dataStream) | ||
| dataStream.close() | ||
|
||
| byteStream.toByteArray | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -81,7 +81,6 @@ package object constants { | |
| private[spark] val ENV_SPARK_USER = "SPARK_USER" | ||
|
|
||
| // Bootstrapping dependencies with the init-container | ||
| private[spark] val INIT_CONTAINER_ANNOTATION = "pod.beta.kubernetes.io/init-containers" | ||
| private[spark] val INIT_CONTAINER_SECRET_VOLUME_MOUNT_PATH = | ||
| "/mnt/secrets/spark-init" | ||
| private[spark] val INIT_CONTAINER_SUBMITTED_JARS_SECRET_KEY = | ||
|
|
@@ -107,7 +106,7 @@ package object constants { | |
| private[spark] val ENV_HADOOP_CONF_DIR = "HADOOP_CONF_DIR" | ||
| private[spark] val HADOOP_CONF_DIR_LOC = "spark.kubernetes.hadoop.conf.dir" | ||
| private[spark] val HADOOP_CONFIG_MAP_SPARK_CONF_NAME = | ||
| "spark.kubernetes.hadoop.executor.hadoopconfigmapname" | ||
| "spark.kubernetes.hadoop.executor.hadoopConfigMapName" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also the same for properties below. |
||
|
|
||
| // Kerberos Configuration | ||
| private[spark] val HADOOP_KERBEROS_SECRET_NAME = | ||
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,7 +50,7 @@ private[spark] class HadoopKerberosKeytabResolverStep( | |
| maybePrincipal: Option[String], | ||
| maybeKeytab: Option[File], | ||
| maybeRenewerPrincipal: Option[String], | ||
| hadoopUGI: HadoopUGIUtil) extends HadoopConfigurationStep with Logging{ | ||
| hadoopUGI: HadoopUGIUtil) extends HadoopConfigurationStep with Logging { | ||
| private var originalCredentials: Credentials = _ | ||
|
||
| private var dfs : FileSystem = _ | ||
| private var renewer: String = _ | ||
|
|
@@ -59,7 +59,7 @@ private[spark] class HadoopKerberosKeytabResolverStep( | |
|
|
||
| override def configureContainers(hadoopConfigSpec: HadoopConfigSpec): HadoopConfigSpec = { | ||
| val hadoopConf = SparkHadoopUtil.get.newConfiguration(submissionSparkConf) | ||
| if (hadoopUGI.isSecurityEnabled) logDebug("Hadoop not configured with Kerberos") | ||
| if (!hadoopUGI.isSecurityEnabled) logDebug("Hadoop not configured with Kerberos") | ||
|
||
| val maybeJobUserUGI = | ||
| for { | ||
| principal <- maybePrincipal | ||
|
|
||
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.
Wrong indention.