Uh oh!
There was an error while loading. Please reload this page.
[SPARK-29189][SQL] Add an option to ignore block locations when listing file - #25869
[SPARK-29189][SQL] Add an option to ignore block locations when listing file#25869wangshisan wants to merge 9 commits into
Conversation
(cherry picked from commit cdef51c166fbbb1321231bbfd6a7359ccbb3109c)
wangyum
commented
Sep 20, 2019
ok to test |
dongjoon-hyun
commented
Sep 20, 2019
Thank you for making a PR, @wangshisan . |
SparkQA
commented
Sep 20, 2019
Test build #111071 has finished for PR 25869 at commit
|
There was a problem hiding this comment.
Could you describe your pretty common environment more? If that is pretty common, it doesn't sound private. Otherwise, you can test this PR in some public similar environment everyone get access.
In our PROD env, we have a pure Spark cluster, I think this is also pretty common, where computation is separated from storage layer.
Sorry, I didn't made myself clear. |
wangshisan
commented
Sep 21, 2019
Yes, I see. A new API call was introduced in #24175 . And it do improve a lot. While, the new API will still fetch all the block location informations, and in our benchmark, it may consume tens of seconds to fetch all of them for a huge table with the new API. |
dongjoon-hyun
commented
Sep 21, 2019
@wangshisan . We need a new UTs for this new feature. Could you add some? |
After adding UTs, please update the PR description test section, too. If you adds UTs, you can say that
In general, |
New UTs are added. |
SparkQA
commented
Sep 22, 2019
Test build #111136 has finished for PR 25869 at commit
|
Uh oh!
There was an error while loading. Please reload this page.
HyukjinKwon
commented
Sep 22, 2019
cc @squito |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
SparkQA
commented
Sep 22, 2019
Test build #111147 has finished for PR 25869 at commit
|
SparkQA
commented
Sep 23, 2019
Test build #111194 has finished for PR 25869 at commit
|
wangyum
commented
Sep 23, 2019
retest this please |
SparkQA
commented
Sep 23, 2019
Test build #111215 has finished for PR 25869 at commit
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
SparkQA
commented
Sep 25, 2019
Test build #111319 has finished for PR 25869 at commit
|
dongjoon-hyun
left a comment
There was a problem hiding this comment.
For the proposed case, this PR looks correct to me.
cc @gatorsmile , @cloud-fan , @JoshRosen . Could you review this new option?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
SparkQA
commented
Sep 26, 2019
Test build #111429 has finished for PR 25869 at commit
|
Uh oh!
There was an error while loading. Please reload this page.
squito
commented
Sep 27, 2019
makes sense to me. I do think that it would be nice to have a way to still get locality preferences, depending on the filesystems. I see "semi-disagg" setups where the compute cluster still has hdfs, its just small and only meant for temporary data. But, I dunno how common that is, this seems like a worthwhile improvement in any case. |
SparkQA
commented
Sep 29, 2019
Test build #111552 has finished for PR 25869 at commit
|
squito
commented
Sep 30, 2019
Jenkins, retest this please |
SparkQA
commented
Sep 30, 2019
Test build #111621 has finished for PR 25869 at commit
|
squito
left a comment
There was a problem hiding this comment.
just a minor comment on the doc text, otherwise lgtm
Uh oh!
There was an error while loading. Please reload this page.
dongjoon-hyun
commented
Oct 3, 2019
Hi, @wangshisan Could you address @squito 's comment? |
dongjoon-hyun
left a comment
There was a problem hiding this comment.
LGTM (except @squito 's comment.)
wangshisan
commented
Oct 6, 2019
Done. Please help review @dongjoon-hyun |
SparkQA
commented
Oct 6, 2019
Test build #111818 has finished for PR 25869 at commit
|
squito
commented
Oct 7, 2019
merged to master. Thanks @wangshisan ! |
squito
commented
Oct 7, 2019
@wangshisan I assigned the issue in jira to the same userid that reported it, I assumed that was you. If not, please let me know and i can fix |
dongjoon-hyun
commented
Oct 7, 2019
Thank you, @wangshisan and @squito ! |
| .createWithDefault(10000) | ||
| val IGNORE_DATA_LOCALITY = | ||
| buildConf("spark.sql.sources.ignore.datalocality") |
There was a problem hiding this comment.
conf naming looks a little weird... Compared with the other SQL Confs, this should be renamed to spark.sql.sources.ignoreDataLocality.enabled cc @cloud-fan
There was a problem hiding this comment.
yea, please be careful about the namespace created in the new config names. ignore is definitely not a good namespace.
There was a problem hiding this comment.
@wangshisan Could you submit a follow-up PR to rename it?
There was a problem hiding this comment.
sorry you are right, i should have paid more attention to this. I have opened a pr to fix the naming: #26056
HyukjinKwon
left a comment
There was a problem hiding this comment.
Late LGTM too except that naming.
What changes were proposed in this pull request?
In our PROD env, we have a pure Spark cluster, I think this is also pretty common, where computation is separated from storage layer. In such deploy mode, data locality is never reachable.
And there are some configurations in Spark scheduler to reduce waiting time for data locality(e.g. "spark.locality.wait"). While, problem is that, in listing file phase, the location informations of all the files, with all the blocks inside each file, are all fetched from the distributed file system. Actually, in a PROD environment, a table can be so huge that even fetching all these location informations need take tens of seconds.
To improve such scenario, Spark need provide an option, where data locality can be totally ignored, all we need in the listing file phase are the files locations, without any block location informations.
Why are the changes needed?
And we made a benchmark in our PROD env, after ignore the block locations, we got a pretty huge improvement.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Via ut.