-
- Downloads
[SPARK-18547][CORE] Propagate I/O encryption key when executors register.
This change modifies the method used to propagate encryption keys used during shuffle. Instead of relying on YARN's UserGroupInformation credential propagation, this change explicitly distributes the key using the messages exchanged between driver and executor during registration. When RPC encryption is enabled, this means key propagation is also secure. This allows shuffle encryption to work in non-YARN mode, which means that it's easier to write unit tests for areas of the code that are affected by the feature. The key is stored in the SecurityManager; because there are many instances of that class used in the code, the key is only guaranteed to exist in the instance managed by the SparkEnv. This path was chosen to avoid storing the key in the SparkConf, which would risk having the key being written to disk as part of the configuration (as, for example, is done when starting YARN applications). Tested by new and existing unit tests (which were moved from the YARN module to core), and by running apps with shuffle encryption enabled. Author: Marcelo Vanzin <vanzin@cloudera.com> Closes #15981 from vanzin/SPARK-18547.
Showing
- core/src/main/scala/org/apache/spark/SecurityManager.scala 5 additions, 18 deletionscore/src/main/scala/org/apache/spark/SecurityManager.scala
- core/src/main/scala/org/apache/spark/SparkContext.scala 0 additions, 4 deletionscore/src/main/scala/org/apache/spark/SparkContext.scala
- core/src/main/scala/org/apache/spark/SparkEnv.scala 24 additions, 9 deletionscore/src/main/scala/org/apache/spark/SparkEnv.scala
- core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala 3 additions, 3 deletions.../apache/spark/executor/CoarseGrainedExecutorBackend.scala
- core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedClusterMessage.scala 6 additions, 1 deletion...spark/scheduler/cluster/CoarseGrainedClusterMessage.scala
- core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala 4 additions, 2 deletions...ark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala
- core/src/main/scala/org/apache/spark/security/CryptoStreamUtils.scala 16 additions, 12 deletions...n/scala/org/apache/spark/security/CryptoStreamUtils.scala
- core/src/main/scala/org/apache/spark/serializer/SerializerManager.scala 12 additions, 6 deletions...scala/org/apache/spark/serializer/SerializerManager.scala
- core/src/test/scala/org/apache/spark/security/CryptoStreamUtilsSuite.scala 79 additions, 56 deletions...la/org/apache/spark/security/CryptoStreamUtilsSuite.scala
- docs/configuration.md 2 additions, 1 deletiondocs/configuration.md
- mesos/src/main/scala/org/apache/spark/executor/MesosExecutorBackend.scala 1 addition, 1 deletion...cala/org/apache/spark/executor/MesosExecutorBackend.scala
- mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterManager.scala 4 additions, 0 deletions...e/spark/scheduler/cluster/mesos/MesosClusterManager.scala
- mesos/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterManagerSuite.scala 10 additions, 1 deletion...rk/scheduler/cluster/mesos/MesosClusterManagerSuite.scala
- yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala 0 additions, 5 deletions.../src/main/scala/org/apache/spark/deploy/yarn/Client.scala
- yarn/src/test/scala/org/apache/spark/deploy/yarn/IOEncryptionSuite.scala 0 additions, 108 deletions...cala/org/apache/spark/deploy/yarn/IOEncryptionSuite.scala
Loading
Please register or sign in to comment