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 2020/08/20 23:25:25 UTC
[GitHub] [spark] sunchao opened a new pull request #29498: [SPARK-32646][DOC] Add suggestion for parallel directory listing in t…
sunchao opened a new pull request #29498:
URL: https://github.com/apache/spark/pull/29498
…uning doc
<!--
Thanks for sending a pull request! Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
4. Be sure to keep the PR description updated to reflect all changes.
5. Please write your PR title to summarize what this PR proposes.
6. If possible, provide a concise example to reproduce the issue for a faster review.
7. If you want to add a new configuration, please read the guideline first for naming configurations in
'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
-->
### What changes were proposed in this pull request?
<!--
Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue.
If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
2. If you fix some SQL features, you can provide some references of other DBMSes.
3. If there is design documentation, please add the link.
4. If there is a discussion in the mailing list, please add the link.
-->
This adds some tuning guide for increasing parallelism of directory listing.
### Why are the changes needed?
<!--
Please clarify why the changes are needed. For instance,
1. If you propose a new API, clarify the use case for a new API.
2. If you fix a bug, you can clarify why it is a bug.
-->
Sometimes when job input has large number of directories, the listing can become a bottleneck. There are a few parameters to tune this. This adds some info to Spark tuning guide to make the knowledge better shared.
### Does this PR introduce _any_ user-facing change?
<!--
Note that it means *any* user-facing change including all aspects such as the documentation fix.
If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
If no, write 'No'.
-->
No.
### How was this patch tested?
<!--
If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
If tests were not added, please describe why they were not added and/or why it was difficult to add.
-->
N/A
----------------------------------------------------------------
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] sunchao commented on a change in pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in t…
Posted by GitBox <gi...@apache.org>.
sunchao commented on a change in pull request #29498:
URL: https://github.com/apache/spark/pull/29498#discussion_r474334105
##########
File path: docs/tuning.md
##########
@@ -264,6 +264,13 @@ parent RDD's number of partitions. You can pass the level of parallelism as a se
or set the config property `spark.default.parallelism` to change the default.
In general, we recommend 2-3 tasks per CPU core in your cluster.
+Sometimes you may also need to increase directory listing parallelism when job input has large number of directories,
+otherwise the process could take a very long time, especially when against object store like S3.
+If your job works on RDD with Hadoop input formats (e.g., via `SparkContext#sequenceFile`), the parallelism is
+controlled via `spark.hadoop.mapreduce.input.fileinputformat.list-status.num-threads` (default is 1). For other
Review comment:
I think this is pretty rare and also that most users won't probably be exposed to this (they mostly interact with RDDs and file formats, I think). Plus this is a Hadoop configuration (recognizable from the name) so they can also find the other doc online.
----------------------------------------------------------------
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 a change in pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #29498:
URL: https://github.com/apache/spark/pull/29498#discussion_r474414941
##########
File path: docs/tuning.md
##########
@@ -264,6 +264,13 @@ parent RDD's number of partitions. You can pass the level of parallelism as a se
or set the config property `spark.default.parallelism` to change the default.
In general, we recommend 2-3 tasks per CPU core in your cluster.
+Sometimes you may also need to increase directory listing parallelism when job input has large number of directories,
Review comment:
Yep. +1 for @maropu 's suggestion. This content looks worthy for that.
----------------------------------------------------------------
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 a change in pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #29498:
URL: https://github.com/apache/spark/pull/29498#discussion_r474415183
##########
File path: docs/tuning.md
##########
@@ -264,6 +264,13 @@ parent RDD's number of partitions. You can pass the level of parallelism as a se
or set the config property `spark.default.parallelism` to change the default.
In general, we recommend 2-3 tasks per CPU core in your cluster.
+Sometimes you may also need to increase directory listing parallelism when job input has large number of directories,
+otherwise the process could take a very long time, especially when against object store like S3.
+If your job works on RDD with Hadoop input formats (e.g., via `SparkContext#sequenceFile`), the parallelism is
Review comment:
+1
----------------------------------------------------------------
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 #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-678084387
**[Test build #127729 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127729/testReport)** for PR 29498 at commit [`c462271`](https://github.com/apache/spark/commit/c4622716b9c7b6e15f6d4f4724e57323d147dd97).
* 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] AmplabJenkins commented on pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-678081370
----------------------------------------------------------------
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] sunchao commented on pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
sunchao commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-678113063
Thanks everyone for the reviews!!
----------------------------------------------------------------
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] sunchao commented on a change in pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
sunchao commented on a change in pull request #29498:
URL: https://github.com/apache/spark/pull/29498#discussion_r474428435
##########
File path: docs/tuning.md
##########
@@ -264,6 +264,13 @@ parent RDD's number of partitions. You can pass the level of parallelism as a se
or set the config property `spark.default.parallelism` to change the default.
In general, we recommend 2-3 tasks per CPU core in your cluster.
+Sometimes you may also need to increase directory listing parallelism when job input has large number of directories,
Review comment:
👍
----------------------------------------------------------------
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 a change in pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #29498:
URL: https://github.com/apache/spark/pull/29498#discussion_r474444019
##########
File path: docs/tuning.md
##########
@@ -264,12 +264,16 @@ parent RDD's number of partitions. You can pass the level of parallelism as a se
or set the config property `spark.default.parallelism` to change the default.
In general, we recommend 2-3 tasks per CPU core in your cluster.
+# Parallel Listing on Input Paths
Review comment:
This should be second-level title? i.e., ## Parallel Listing on Input Paths
----------------------------------------------------------------
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 #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-677968837
----------------------------------------------------------------
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 #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
viirya commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-677982805
The PR title was broken and affected the PR description. As it is minor, I modified them together.
----------------------------------------------------------------
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 a change in pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in t…
Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #29498:
URL: https://github.com/apache/spark/pull/29498#discussion_r474330233
##########
File path: docs/tuning.md
##########
@@ -264,6 +264,13 @@ parent RDD's number of partitions. You can pass the level of parallelism as a se
or set the config property `spark.default.parallelism` to change the default.
In general, we recommend 2-3 tasks per CPU core in your cluster.
+Sometimes you may also need to increase directory listing parallelism when job input has large number of directories,
+otherwise the process could take a very long time, especially when against object store like S3.
+If your job works on RDD with Hadoop input formats (e.g., via `SparkContext#sequenceFile`), the parallelism is
+controlled via `spark.hadoop.mapreduce.input.fileinputformat.list-status.num-threads` (default is 1). For other
Review comment:
This seems having a limitation that multiple threads cannot be used with non thread-safe path filter?
https://hadoop.apache.org/docs/r2.7.2/hadoop-mapreduce-client/hadoop-mapreduce-client-core/mapred-default.xml
> The number of threads to use to list and fetch block locations for the specified input paths. Note: multiple threads should not be used if a custom non thread-safe path filter is used.
Should we also mention it together?
----------------------------------------------------------------
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] sunchao commented on pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in t…
Posted by GitBox <gi...@apache.org>.
sunchao commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-677956803
> Is the JIRA number incorrect?
OOPS. I don't know where I get that number from ... fixed - thanks!
----------------------------------------------------------------
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 #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-677971230
----------------------------------------------------------------
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 #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-678084474
----------------------------------------------------------------
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] sunchao commented on pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
sunchao commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-677986437
> The PR title was broken and affected the PR description. As it is minor, I modified them together.
Ah thanks @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] SparkQA commented on pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-677971160
**[Test build #127711 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127711/testReport)** for PR 29498 at commit [`b4efdb7`](https://github.com/apache/spark/commit/b4efdb736caabbcc2612b6b4450ab87b133a1d8e).
* 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] viirya commented on pull request #29498: [SPARK-32646][DOC] Add suggestion for parallel directory listing in t…
Posted by GitBox <gi...@apache.org>.
viirya commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-677955958
Is the JIRA number incorrect?
----------------------------------------------------------------
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 a change in pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #29498:
URL: https://github.com/apache/spark/pull/29498#discussion_r474424652
##########
File path: docs/tuning.md
##########
@@ -264,6 +264,13 @@ parent RDD's number of partitions. You can pass the level of parallelism as a se
or set the config property `spark.default.parallelism` to change the default.
In general, we recommend 2-3 tasks per CPU core in your cluster.
+Sometimes you may also need to increase directory listing parallelism when job input has large number of directories,
+otherwise the process could take a very long time, especially when against object store like S3.
+If your job works on RDD with Hadoop input formats (e.g., via `SparkContext#sequenceFile`), the parallelism is
+controlled via `spark.hadoop.mapreduce.input.fileinputformat.list-status.num-threads` (default is 1). For other
Review comment:
SGTM
----------------------------------------------------------------
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] sunchao commented on a change in pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
sunchao commented on a change in pull request #29498:
URL: https://github.com/apache/spark/pull/29498#discussion_r474356170
##########
File path: docs/tuning.md
##########
@@ -264,6 +264,13 @@ parent RDD's number of partitions. You can pass the level of parallelism as a se
or set the config property `spark.default.parallelism` to change the default.
In general, we recommend 2-3 tasks per CPU core in your cluster.
+Sometimes you may also need to increase directory listing parallelism when job input has large number of directories,
+otherwise the process could take a very long time, especially when against object store like S3.
+If your job works on RDD with Hadoop input formats (e.g., via `SparkContext#sequenceFile`), the parallelism is
+controlled via `spark.hadoop.mapreduce.input.fileinputformat.list-status.num-threads` (default is 1). For other
+cases such as Spark SQL, you can tune `spark.sql.sources.parallelPartitionDiscovery.threshold` to improve the listing
Review comment:
will do thanks
##########
File path: docs/tuning.md
##########
@@ -264,6 +264,13 @@ parent RDD's number of partitions. You can pass the level of parallelism as a se
or set the config property `spark.default.parallelism` to change the default.
In general, we recommend 2-3 tasks per CPU core in your cluster.
+Sometimes you may also need to increase directory listing parallelism when job input has large number of directories,
Review comment:
sure will do
----------------------------------------------------------------
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 #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-678044656
Thank you so much, @sunchao !
----------------------------------------------------------------
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 #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-678078778
----------------------------------------------------------------
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] sunchao commented on a change in pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
sunchao commented on a change in pull request #29498:
URL: https://github.com/apache/spark/pull/29498#discussion_r474428347
##########
File path: docs/tuning.md
##########
@@ -264,6 +264,13 @@ parent RDD's number of partitions. You can pass the level of parallelism as a se
or set the config property `spark.default.parallelism` to change the default.
In general, we recommend 2-3 tasks per CPU core in your cluster.
+Sometimes you may also need to increase directory listing parallelism when job input has large number of directories,
+otherwise the process could take a very long time, especially when against object store like S3.
+If your job works on RDD with Hadoop input formats (e.g., via `SparkContext#sequenceFile`), the parallelism is
+controlled via `spark.hadoop.mapreduce.input.fileinputformat.list-status.num-threads` (default is 1). For other
+cases such as Spark SQL, you can tune `spark.sql.sources.parallelPartitionDiscovery.threshold` to improve the listing
Review comment:
Thanks. How about we only mention the parameters for Spark SQL side here and direct users to the SQL guide for more detailed guidance?
----------------------------------------------------------------
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 #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-678069750
----------------------------------------------------------------
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] HyukjinKwon closed pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
HyukjinKwon closed pull request #29498:
URL: https://github.com/apache/spark/pull/29498
----------------------------------------------------------------
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 #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-677968435
**[Test build #127711 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127711/testReport)** for PR 29498 at commit [`b4efdb7`](https://github.com/apache/spark/commit/b4efdb736caabbcc2612b6b4450ab87b133a1d8e).
----------------------------------------------------------------
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] dbtsai commented on pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in t…
Posted by GitBox <gi...@apache.org>.
dbtsai commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-677967406
Jenkins, add to whitelist.
----------------------------------------------------------------
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 #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-678080841
**[Test build #127729 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127729/testReport)** for PR 29498 at commit [`c462271`](https://github.com/apache/spark/commit/c4622716b9c7b6e15f6d4f4724e57323d147dd97).
----------------------------------------------------------------
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 #29498: [SPARK-32646][DOC] Add suggestion for parallel directory listing in t…
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-677956607
Can one of the admins verify this patch?
----------------------------------------------------------------
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 #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in t…
Posted by GitBox <gi...@apache.org>.
viirya commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-677958521
Yeah, it will be linked automatically once you put into the PR title. That's why I noticed this, because I'm working on the original JIRA. :)
----------------------------------------------------------------
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] sunchao commented on a change in pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
sunchao commented on a change in pull request #29498:
URL: https://github.com/apache/spark/pull/29498#discussion_r474428488
##########
File path: docs/tuning.md
##########
@@ -264,6 +264,13 @@ parent RDD's number of partitions. You can pass the level of parallelism as a se
or set the config property `spark.default.parallelism` to change the default.
In general, we recommend 2-3 tasks per CPU core in your cluster.
+Sometimes you may also need to increase directory listing parallelism when job input has large number of directories,
+otherwise the process could take a very long time, especially when against object store like S3.
+If your job works on RDD with Hadoop input formats (e.g., via `SparkContext#sequenceFile`), the parallelism is
Review comment:
👍
----------------------------------------------------------------
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] maropu commented on a change in pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #29498:
URL: https://github.com/apache/spark/pull/29498#discussion_r474340489
##########
File path: docs/tuning.md
##########
@@ -264,6 +264,13 @@ parent RDD's number of partitions. You can pass the level of parallelism as a se
or set the config property `spark.default.parallelism` to change the default.
In general, we recommend 2-3 tasks per CPU core in your cluster.
+Sometimes you may also need to increase directory listing parallelism when job input has large number of directories,
Review comment:
How about making a new subsection (e.g., `## XXXX`) for this?
----------------------------------------------------------------
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 #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-678078778
----------------------------------------------------------------
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 #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-678081370
----------------------------------------------------------------
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 a change in pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #29498:
URL: https://github.com/apache/spark/pull/29498#discussion_r474442266
##########
File path: docs/sql-performance-tuning.md
##########
@@ -114,6 +114,28 @@ that these options will be deprecated in future release as more optimizations ar
</td>
<td>1.1.0</td>
</tr>
+ <tr>
+ <td><code>spark.sql.sources.parallelPartitionDiscovery.threshold</code></td>
+ <td>32</td>
+ <td>
+ Configures the threshold to enable parallel listing for job input paths. If the number of
+ input paths is larger than this threshold, Spark will use parallel listing on the driver side.
Review comment:
> Spark will use parallel listing on the driver side.
It sounds like Spark just runs parallel listing on the driver side using multi-threading. How about using "Spark will list the files by using Spark distributed job"?
----------------------------------------------------------------
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] sunchao commented on a change in pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
sunchao commented on a change in pull request #29498:
URL: https://github.com/apache/spark/pull/29498#discussion_r474427791
##########
File path: docs/tuning.md
##########
@@ -264,6 +264,13 @@ parent RDD's number of partitions. You can pass the level of parallelism as a se
or set the config property `spark.default.parallelism` to change the default.
In general, we recommend 2-3 tasks per CPU core in your cluster.
+Sometimes you may also need to increase directory listing parallelism when job input has large number of directories,
+otherwise the process could take a very long time, especially when against object store like S3.
+If your job works on RDD with Hadoop input formats (e.g., via `SparkContext#sequenceFile`), the parallelism is
+controlled via `spark.hadoop.mapreduce.input.fileinputformat.list-status.num-threads` (default is 1). For other
Review comment:
Sounds good. I'll add a link to the master branch.
----------------------------------------------------------------
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] sunchao commented on a change in pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
sunchao commented on a change in pull request #29498:
URL: https://github.com/apache/spark/pull/29498#discussion_r474435185
##########
File path: docs/tuning.md
##########
@@ -264,6 +264,13 @@ parent RDD's number of partitions. You can pass the level of parallelism as a se
or set the config property `spark.default.parallelism` to change the default.
In general, we recommend 2-3 tasks per CPU core in your cluster.
+Sometimes you may also need to increase directory listing parallelism when job input has large number of directories,
+otherwise the process could take a very long time, especially when against object store like S3.
Review comment:
It depends on how "remote" the storage is. For HDFS, depending on the use case the compute and storage can still deployed within the same region and therefore network/metadata cost is much cheaper than that from S3.
Therefore, IMO think we can stick with the S3 case as it is more characteristic. Let me know if you think otherwise.
##########
File path: docs/tuning.md
##########
@@ -264,6 +264,13 @@ parent RDD's number of partitions. You can pass the level of parallelism as a se
or set the config property `spark.default.parallelism` to change the default.
In general, we recommend 2-3 tasks per CPU core in your cluster.
+Sometimes you may also need to increase directory listing parallelism when job input has large number of directories,
+otherwise the process could take a very long time, especially when against object store like S3.
Review comment:
It depends on how "remote" the storage is. For HDFS, depending on the use case the compute and storage can still deployed within the same region and therefore network/metadata cost is much cheaper than that from S3.
Therefore, I think we can stick with the S3 case as it is more characteristic. Let me know if you think otherwise.
##########
File path: docs/tuning.md
##########
@@ -264,6 +264,13 @@ parent RDD's number of partitions. You can pass the level of parallelism as a se
or set the config property `spark.default.parallelism` to change the default.
In general, we recommend 2-3 tasks per CPU core in your cluster.
+Sometimes you may also need to increase directory listing parallelism when job input has large number of directories,
+otherwise the process could take a very long time, especially when against object store like S3.
Review comment:
It depends on how "remote" the storage is. For HDFS, depending on the use case the compute and storage can still be deployed within the same region and therefore network/metadata cost is much cheaper than that from S3.
Therefore, I think we can stick with the S3 case as it is more characteristic. Let me know if you think otherwise.
----------------------------------------------------------------
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 #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-678078595
**[Test build #127727 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127727/testReport)** for PR 29498 at commit [`2dfe36f`](https://github.com/apache/spark/commit/2dfe36f9da0fdeafc1c5f32c06e44fd282f3e2c9).
* 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] SparkQA removed a comment on pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-677968435
**[Test build #127711 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127711/testReport)** for PR 29498 at commit [`b4efdb7`](https://github.com/apache/spark/commit/b4efdb736caabbcc2612b6b4450ab87b133a1d8e).
----------------------------------------------------------------
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 #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-678069750
----------------------------------------------------------------
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] HyukjinKwon commented on a change in pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #29498:
URL: https://github.com/apache/spark/pull/29498#discussion_r474373332
##########
File path: docs/tuning.md
##########
@@ -264,6 +264,13 @@ parent RDD's number of partitions. You can pass the level of parallelism as a se
or set the config property `spark.default.parallelism` to change the default.
In general, we recommend 2-3 tasks per CPU core in your cluster.
+Sometimes you may also need to increase directory listing parallelism when job input has large number of directories,
+otherwise the process could take a very long time, especially when against object store like S3.
+If your job works on RDD with Hadoop input formats (e.g., via `SparkContext#sequenceFile`), the parallelism is
Review comment:
nit: `SparkContext#sequenceFile` -> `SparkContext.sequenceFile` to be consistent in this page.
----------------------------------------------------------------
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 #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-678072341
**[Test build #127727 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127727/testReport)** for PR 29498 at commit [`2dfe36f`](https://github.com/apache/spark/commit/2dfe36f9da0fdeafc1c5f32c06e44fd282f3e2c9).
----------------------------------------------------------------
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] sunchao commented on a change in pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
sunchao commented on a change in pull request #29498:
URL: https://github.com/apache/spark/pull/29498#discussion_r474444907
##########
File path: docs/tuning.md
##########
@@ -264,12 +264,16 @@ parent RDD's number of partitions. You can pass the level of parallelism as a se
or set the config property `spark.default.parallelism` to change the default.
In general, we recommend 2-3 tasks per CPU core in your cluster.
+# Parallel Listing on Input Paths
Review comment:
Good catch. Fixing.
##########
File path: docs/sql-performance-tuning.md
##########
@@ -114,6 +114,28 @@ that these options will be deprecated in future release as more optimizations ar
</td>
<td>1.1.0</td>
</tr>
+ <tr>
+ <td><code>spark.sql.sources.parallelPartitionDiscovery.threshold</code></td>
+ <td>32</td>
+ <td>
+ Configures the threshold to enable parallel listing for job input paths. If the number of
+ input paths is larger than this threshold, Spark will use parallel listing on the driver side.
Review comment:
Will do.
----------------------------------------------------------------
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 #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in t…
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-677954935
Can one of the admins verify this patch?
----------------------------------------------------------------
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 a change in pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #29498:
URL: https://github.com/apache/spark/pull/29498#discussion_r474417044
##########
File path: docs/tuning.md
##########
@@ -264,6 +264,13 @@ parent RDD's number of partitions. You can pass the level of parallelism as a se
or set the config property `spark.default.parallelism` to change the default.
In general, we recommend 2-3 tasks per CPU core in your cluster.
+Sometimes you may also need to increase directory listing parallelism when job input has large number of directories,
+otherwise the process could take a very long time, especially when against object store like S3.
+If your job works on RDD with Hadoop input formats (e.g., via `SparkContext#sequenceFile`), the parallelism is
+controlled via `spark.hadoop.mapreduce.input.fileinputformat.list-status.num-threads` (default is 1). For other
Review comment:
Maybe, shall we add a hyperlink on `spark.hadoop.mapreduce.input.fileinputformat.list-status.num-threads` to the hadoop configuration, https://hadoop.apache.org/docs/r3.2.0/hadoop-mapreduce-client/hadoop-mapreduce-client-core/mapred-default.xml? Then, we can lead them safely if they didn't take a look at that. It should be Hadoop 3.2.0 link on `master` branch.
----------------------------------------------------------------
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 a change in pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #29498:
URL: https://github.com/apache/spark/pull/29498#discussion_r474417462
##########
File path: docs/tuning.md
##########
@@ -264,6 +264,13 @@ parent RDD's number of partitions. You can pass the level of parallelism as a se
or set the config property `spark.default.parallelism` to change the default.
In general, we recommend 2-3 tasks per CPU core in your cluster.
+Sometimes you may also need to increase directory listing parallelism when job input has large number of directories,
+otherwise the process could take a very long time, especially when against object store like S3.
+If your job works on RDD with Hadoop input formats (e.g., via `SparkContext#sequenceFile`), the parallelism is
+controlled via `spark.hadoop.mapreduce.input.fileinputformat.list-status.num-threads` (default is 1). For other
+cases such as Spark SQL, you can tune `spark.sql.sources.parallelPartitionDiscovery.threshold` to improve the listing
Review comment:
+1 for @maropu 's suggestion (adding there too while keeping here).
----------------------------------------------------------------
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] maropu commented on pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
maropu commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-678110983
late LGTM. Thanks, @sunchao and all the reviewers!
----------------------------------------------------------------
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 a change in pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #29498:
URL: https://github.com/apache/spark/pull/29498#discussion_r474389046
##########
File path: docs/tuning.md
##########
@@ -264,6 +264,13 @@ parent RDD's number of partitions. You can pass the level of parallelism as a se
or set the config property `spark.default.parallelism` to change the default.
In general, we recommend 2-3 tasks per CPU core in your cluster.
+Sometimes you may also need to increase directory listing parallelism when job input has large number of directories,
+otherwise the process could take a very long time, especially when against object store like S3.
+If your job works on RDD with Hadoop input formats (e.g., via `SparkContext#sequenceFile`), the parallelism is
Review comment:
+1
----------------------------------------------------------------
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] sunchao edited a comment on pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in t…
Posted by GitBox <gi...@apache.org>.
sunchao edited a comment on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-677956803
> Is the JIRA number incorrect?
OOPS. I don't know where I get that number from ... fixed - thanks!
BTW how do I link this PR with the JIRA? will it happen automatically?
----------------------------------------------------------------
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 #29498: [SPARK-32646][DOC] Add suggestion for parallel directory listing in t…
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-677954935
Can one of the admins verify this patch?
----------------------------------------------------------------
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] maropu commented on a change in pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #29498:
URL: https://github.com/apache/spark/pull/29498#discussion_r474340280
##########
File path: docs/tuning.md
##########
@@ -264,6 +264,13 @@ parent RDD's number of partitions. You can pass the level of parallelism as a se
or set the config property `spark.default.parallelism` to change the default.
In general, we recommend 2-3 tasks per CPU core in your cluster.
+Sometimes you may also need to increase directory listing parallelism when job input has large number of directories,
+otherwise the process could take a very long time, especially when against object store like S3.
+If your job works on RDD with Hadoop input formats (e.g., via `SparkContext#sequenceFile`), the parallelism is
+controlled via `spark.hadoop.mapreduce.input.fileinputformat.list-status.num-threads` (default is 1). For other
+cases such as Spark SQL, you can tune `spark.sql.sources.parallelPartitionDiscovery.threshold` to improve the listing
Review comment:
I think the last statement should be described in the SQL side: https://github.com/apache/spark/blob/master/docs/sql-performance-tuning.md
----------------------------------------------------------------
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 #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-677971230
----------------------------------------------------------------
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 #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in t…
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-677956607
Can one of the admins verify this patch?
----------------------------------------------------------------
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 a change in pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #29498:
URL: https://github.com/apache/spark/pull/29498#discussion_r474420370
##########
File path: docs/tuning.md
##########
@@ -264,6 +264,13 @@ parent RDD's number of partitions. You can pass the level of parallelism as a se
or set the config property `spark.default.parallelism` to change the default.
In general, we recommend 2-3 tasks per CPU core in your cluster.
+Sometimes you may also need to increase directory listing parallelism when job input has large number of directories,
+otherwise the process could take a very long time, especially when against object store like S3.
Review comment:
What about remote HDFS? Since this looks like a general issue for remote storage access. Especially, in disaggregated clusters where remote storage (HDFS/S3) are used, can we generalize more like the following?
```
- especially when against object store like S3
- especially when against remote HDFS or S3 or in the disaggregated clusters
```
----------------------------------------------------------------
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] sunchao edited a comment on pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
sunchao edited a comment on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-677986437
> The PR title was broken and affected the PR description. As it is minor, I modified them together.
Ah thanks @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] SparkQA removed a comment on pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-678072341
**[Test build #127727 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127727/testReport)** for PR 29498 at commit [`2dfe36f`](https://github.com/apache/spark/commit/2dfe36f9da0fdeafc1c5f32c06e44fd282f3e2c9).
----------------------------------------------------------------
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] sunchao commented on pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in t…
Posted by GitBox <gi...@apache.org>.
sunchao commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-677957175
nvm it is linked :)
----------------------------------------------------------------
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] sunchao commented on a change in pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
sunchao commented on a change in pull request #29498:
URL: https://github.com/apache/spark/pull/29498#discussion_r474435185
##########
File path: docs/tuning.md
##########
@@ -264,6 +264,13 @@ parent RDD's number of partitions. You can pass the level of parallelism as a se
or set the config property `spark.default.parallelism` to change the default.
In general, we recommend 2-3 tasks per CPU core in your cluster.
+Sometimes you may also need to increase directory listing parallelism when job input has large number of directories,
+otherwise the process could take a very long time, especially when against object store like S3.
Review comment:
It depends on how "remote" the storage is. For HDFS, depending on the use case the compute and storage can still be deployed within the same region or even zone and therefore network/metadata cost is much cheaper than that from S3.
Therefore, I think we can stick with the S3 case as it is more characteristic. Let me know if you think otherwise.
----------------------------------------------------------------
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 #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-677968837
----------------------------------------------------------------
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 #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-678489469
Thank you, @sunchao and all.
BTW, welcome, @sunchao !
----------------------------------------------------------------
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 #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-678084474
----------------------------------------------------------------
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] HyukjinKwon commented on pull request #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-678098066
Merged to master, branch-3.0 and branch-2.4.
----------------------------------------------------------------
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 #29498: [SPARK-32674][DOC] Add suggestion for parallel directory listing in tuning doc
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29498:
URL: https://github.com/apache/spark/pull/29498#issuecomment-678080841
**[Test build #127729 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127729/testReport)** for PR 29498 at commit [`c462271`](https://github.com/apache/spark/commit/c4622716b9c7b6e15f6d4f4724e57323d147dd97).
----------------------------------------------------------------
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