Github user vanzin commented on a diff in the pull request: https://github.com/apache/spark/pull/8880#discussion_r75551184 --- Diff: core/src/main/scala/org/apache/spark/serializer/SerializerManager.scala --- @@ -103,6 +107,20 @@ private[spark] class SerializerManager(defaultSerializer: Serializer, conf: Spar } /** + * Wrap an input stream for encryption if shuffle encryption is enabled + */ + def wrapForEncryption(s: InputStream): InputStream = { --- End diff -- How about having a "wrap" method that just sets up everything for you? That avoids having the callers in a bunch of places call both `wrapForEncryption` and `wrapForCompression` and have to worry about doing it in the right order. I'd prefer if the existing `wrapFor...` methods became private or went away, but if they make testing easier, then you can keep them.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org