Github user zsxwing commented on a diff in the pull request:

    https://github.com/apache/spark/pull/8880#discussion_r76323076
  
    --- Diff: 
core/src/main/scala/org/apache/spark/serializer/SerializerManager.scala ---
    @@ -103,16 +108,44 @@ private[spark] class 
SerializerManager(defaultSerializer: Serializer, conf: Spar
       }
     
       /**
    +   * Wrap an input stream for encryption and compression
    +   */
    +  def wrapStream(blockId: BlockId, s: InputStream): InputStream = {
    +    wrapForCompression(blockId, wrapForEncryption(s))
    +  }
    +
    +  /**
    +   * Wrap an output stream for encryption and compression
    +   */
    +  def wrapStream(blockId: BlockId, s: OutputStream): OutputStream = {
    +    wrapForEncryption(wrapForCompression(blockId, s))
    --- End diff --
    
    why not compress first then encrypt? The performance will be better since 
it encrypts less data.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to