You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/04/04 19:36:28 UTC

[GitHub] [spark] dongjoon-hyun opened a new pull request #32051: [SPARK-34954][SQL] Use zstd codec name in ORC file names

dongjoon-hyun opened a new pull request #32051:
URL: https://github.com/apache/spark/pull/32051


   ### What changes were proposed in this pull request?
   
   This PR aims to add `zstd` codec names in the Spark generated ORC file names for consistency.
   
   ### Why are the changes needed?
   
   Like the other ORC supported codecs, we had better have `zstd` in the Spark generated ORC file names.
   
   **SNAPPY**
   ```
   scala> spark.range(10).repartition(1).write.option("compression", "snappy").orc("/tmp/snappy")
   
   $ ls -al /tmp/snappy 
   total 24
   drwxr-xr-x   6 dongjoon  wheel  192 Apr  4 12:17 .
   drwxrwxrwt  14 root      wheel  448 Apr  4 12:17 ..
   -rw-r--r--   1 dongjoon  wheel    8 Apr  4 12:17 ._SUCCESS.crc
   -rw-r--r--   1 dongjoon  wheel   12 Apr  4 12:17 .part-00000-833bb7ad-d1e1-48cc-9719-07b2d594aa4c-c000.snappy.orc.crc
   -rw-r--r--   1 dongjoon  wheel    0 Apr  4 12:17 _SUCCESS
   -rw-r--r--   1 dongjoon  wheel  231 Apr  4 12:17 part-00000-833bb7ad-d1e1-48cc-9719-07b2d594aa4c-c000.snappy.orc
   ```
   
   **ZSTD (AS-IS)**
   ```                                                  
   scala> spark.range(10).repartition(1).write.option("compression", "zstd").orc("/tmp/zstd")
   
   $ ls -al /tmp/zstd  
   total 24
   drwxr-xr-x   6 dongjoon  wheel  192 Apr  4 12:17 .
   drwxrwxrwt  14 root      wheel  448 Apr  4 12:17 ..
   -rw-r--r--   1 dongjoon  wheel    8 Apr  4 12:17 ._SUCCESS.crc
   -rw-r--r--   1 dongjoon  wheel   12 Apr  4 12:17 .part-00000-2f403ce9-7314-4db5-bca3-b1c1dd83335f-c000.orc.crc
   -rw-r--r--   1 dongjoon  wheel    0 Apr  4 12:17 _SUCCESS
   -rw-r--r--   1 dongjoon  wheel  231 Apr  4 12:17 part-00000-2f403ce9-7314-4db5-bca3-b1c1dd83335f-c000.orc
   ```
   
   **ZSTD (After this PR)**
   ```
   scala> spark.range(10).repartition(1).write.option("compression", "zstd").orc("/tmp/zstd_new")
   
   $ ls -al /tmp/zstd_new    
   total 24
   drwxr-xr-x   6 dongjoon  wheel  192 Apr  4 12:28 .
   drwxrwxrwt  15 root      wheel  480 Apr  4 12:28 ..
   -rw-r--r--   1 dongjoon  wheel    8 Apr  4 12:28 ._SUCCESS.crc
   -rw-r--r--   1 dongjoon  wheel   12 Apr  4 12:28 .part-00000-49d57329-7196-4caf-839c-4251c876e26b-c000.zstd.orc.crc
   -rw-r--r--   1 dongjoon  wheel    0 Apr  4 12:28 _SUCCESS
   -rw-r--r--   1 dongjoon  wheel  231 Apr  4 12:28 part-00000-49d57329-7196-4caf-839c-4251c876e26b-c000.zstd.orc
   ```
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Pass the CIs with the updated UT.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun edited a comment on pull request #32051: [SPARK-34954][SQL] Use zstd codec name in ORC file names

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun edited a comment on pull request #32051:
URL: https://github.com/apache/spark/pull/32051#issuecomment-813096831


   BTW, @MaxGekk . Please note that the whole Parquet and ORC files themselves are not zstd compressed stream. Parquet/ORC's inner data streams is zstd compressed stream.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #32051: [SPARK-34954][SQL] Use zstd codec name in ORC file names

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32051:
URL: https://github.com/apache/spark/pull/32051#issuecomment-813130461


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/136900/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #32051: [SPARK-34954][SQL] Use zstd codec name in ORC file names

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32051:
URL: https://github.com/apache/spark/pull/32051#issuecomment-813122241


   **[Test build #136900 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136900/testReport)** for PR 32051 at commit [`9d34044`](https://github.com/apache/spark/commit/9d3404426d5c40bdeec931246099291a8af16492).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun edited a comment on pull request #32051: [SPARK-34954][SQL] Use zstd codec name in ORC file names

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun edited a comment on pull request #32051:
URL: https://github.com/apache/spark/pull/32051#issuecomment-813096831


   BTW, @MaxGekk . Please note that the whole Parquet and ORC files themselves are not zstd compressed stream. Only Parquet/ORC's inner data streams are zstd compressed streams.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun commented on pull request #32051: [SPARK-34954][SQL] Use zstd codec name in ORC file names

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #32051:
URL: https://github.com/apache/spark/pull/32051#issuecomment-813103656


   No~ There is no problem to read any files because the naming is not used in OrcReader.
   In addition, Apache Spark 3.2.0 is not released yet and this is the first release to support ORC with ZSTD codec.
   Thank you, @viirya and @MaxGekk .


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #32051: [SPARK-34954][SQL] Use zstd codec name in ORC file names

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32051:
URL: https://github.com/apache/spark/pull/32051#issuecomment-813096465






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] viirya commented on pull request #32051: [SPARK-34954][SQL] Use zstd codec name in ORC file names

Posted by GitBox <gi...@apache.org>.
viirya commented on pull request #32051:
URL: https://github.com/apache/spark/pull/32051#issuecomment-813105516


   lgtm


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #32051: [SPARK-34954][SQL] Use zstd codec name in ORC file names

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32051:
URL: https://github.com/apache/spark/pull/32051#issuecomment-813098286


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/41477/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #32051: [SPARK-34954][SQL] Use zstd codec name in ORC file names

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32051:
URL: https://github.com/apache/spark/pull/32051#issuecomment-813091263


   **[Test build #136900 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136900/testReport)** for PR 32051 at commit [`9d34044`](https://github.com/apache/spark/commit/9d3404426d5c40bdeec931246099291a8af16492).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun edited a comment on pull request #32051: [SPARK-34954][SQL] Use zstd codec name in ORC file names

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun edited a comment on pull request #32051:
URL: https://github.com/apache/spark/pull/32051#issuecomment-813096831


   BTW, @MaxGekk . Please note that the whole Parquet and ORC files themselves are not zstd compressed stream. Only some of Parquet/ORC's inner data streams are zstd compressed streams.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun commented on pull request #32051: [SPARK-34954][SQL] Use zstd codec name in ORC file names

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #32051:
URL: https://github.com/apache/spark/pull/32051#issuecomment-813121428


   Merged to master for Apache Spark 3.2.0.
   Thank you, @viirya , @MaxGekk , @wangyum .


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun commented on pull request #32051: [SPARK-34954][SQL] Use zstd codec name in ORC file names

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #32051:
URL: https://github.com/apache/spark/pull/32051#issuecomment-813096687


   @MaxGekk . It's for consistency inside Apache Spark (and Apache Parquet).
   
   If you are asking about our history, Apache Spark has been using `zstd` in event logs since Apache Spark 2.3.0, 
   ```
   $ ls -al *zstd      
   -rw-rw----  1 dongjoon  staff   33101 Apr  4 13:30 local-1617568193664.zstd
   -rw-r--r--@ 1 dongjoon  staff  856181 Nov  5 01:16 spark-6248534cdfc14ae698cddd2701ab61b3.zstd
   ```
   
   Apache Parquet has been using `.zstd` since Apache Parquet 1.10.0 (PARQUET-1143).
   - https://github.com/apache/parquet-mr/blob/master/parquet-common/src/main/java/org/apache/parquet/hadoop/metadata/CompressionCodecName.java#L33
   
   As a result, Apache Spark's generated Parquet ZSTD files are already `.zstd` (in the ZSTD-enabled Hadoop before) because we delegate the extension name to Apache Parquet. And, from Apache Spark 3.2.0, we can use this file names for all environment.
   ```
   $ ls -al /tmp/p_zstd                      
   total 24
   drwxr-xr-x   6 dongjoon  wheel  192 Apr  4 13:27 .
   drwxrwxrwt  16 root      wheel  512 Apr  4 13:27 ..
   -rw-r--r--   1 dongjoon  wheel    8 Apr  4 13:27 ._SUCCESS.crc
   -rw-r--r--   1 dongjoon  wheel   12 Apr  4 13:27 .part-00000-17277a00-8e7f-4797-b0b6-6a30ded6617e-c000.zstd.parquet.crc
   -rw-r--r--   1 dongjoon  wheel    0 Apr  4 13:27 _SUCCESS
   -rw-r--r--   1 dongjoon  wheel  511 Apr  4 13:27 part-00000-17277a00-8e7f-4797-b0b6-6a30ded6617e-c000.zstd.parquet
   ```
   
   Also, cc @viirya .


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun commented on pull request #32051: [SPARK-34954][SQL] Use zstd codec name in ORC file names

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #32051:
URL: https://github.com/apache/spark/pull/32051#issuecomment-813096831


   BTW, @MaxGekk . Please note that Parquet and ORC is not zstd compressed stream. Parquet/ORC's inner data streams is zstd compressed stream.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun edited a comment on pull request #32051: [SPARK-34954][SQL] Use zstd codec name in ORC file names

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun edited a comment on pull request #32051:
URL: https://github.com/apache/spark/pull/32051#issuecomment-813096831


   BTW, @MaxGekk . Please note that the whole Parquet and ORC files themselves are not zstd compressed stream. Only some of Parquet/ORC's inner data streams are zstd compressed streams. So, the real file extension is `.parquet` or `.orc`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #32051: [SPARK-34954][SQL] Use zstd codec name in ORC file names

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32051:
URL: https://github.com/apache/spark/pull/32051#issuecomment-813098286


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/41477/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #32051: [SPARK-34954][SQL] Use zstd codec name in ORC file names

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32051:
URL: https://github.com/apache/spark/pull/32051#issuecomment-813130461


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/136900/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun closed pull request #32051: [SPARK-34954][SQL] Use zstd codec name in ORC file names

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun closed pull request #32051:
URL: https://github.com/apache/spark/pull/32051


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #32051: [SPARK-34954][SQL] Use zstd codec name in ORC file names

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #32051:
URL: https://github.com/apache/spark/pull/32051#issuecomment-813091263


   **[Test build #136900 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136900/testReport)** for PR 32051 at commit [`9d34044`](https://github.com/apache/spark/commit/9d3404426d5c40bdeec931246099291a8af16492).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] viirya commented on pull request #32051: [SPARK-34954][SQL] Use zstd codec name in ORC file names

Posted by GitBox <gi...@apache.org>.
viirya commented on pull request #32051:
URL: https://github.com/apache/spark/pull/32051#issuecomment-813099491


   Want to confirm, this doesn't affect reading old zstd ORC files, right?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org