Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-32970][SQL][TEST] Reduce the runtime of an UT for SPARK-32019 #29842

Closed
wants to merge 4 commits into from

Conversation

tanelk
Copy link
Contributor

@tanelk tanelk commented Sep 22, 2020

What changes were proposed in this pull request?

The UT for SPARK-32019 (#28853) tries to write about 16GB of data do the disk. We must change the value of spark.sql.files.maxPartitionBytes to a smaller value do check the correct behavior with less data. By default it is 128MB.
The other parameters in this UT are also changed to smaller values to keep the behavior the same.

Why are the changes needed?

The runtime of this one UT can be over 7 minutes on Jenkins. After the change it is few seconds.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Existing UT

@tanelk
Copy link
Contributor Author

tanelk commented Sep 22, 2020

@ulysses-you, you were the original author, could you check if the test coverage is the same
@dongjoon-hyun and @cloud-fan you requested the extra tests in the original PR

@HyukjinKwon
Copy link
Member

add to whitelist

))
assert(table.rdd.partitions.length == 1)
}
withSQLConf(SQLConf.FILES_MAX_PARTITION_BYTES.key -> "2MB") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add the config spark.sql.files.openCostInBytes ? The result is based on it although we don't change the default value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@SparkQA
Copy link

SparkQA commented Sep 23, 2020

Test build #128997 has finished for PR 29842 at commit 45dee3f.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Sep 25, 2020

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/33739/

@SparkQA
Copy link

SparkQA commented Sep 25, 2020

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/33739/

@SparkQA
Copy link

SparkQA commented Sep 25, 2020

Test build #129120 has finished for PR 29842 at commit d71ad45.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@maropu
Copy link
Member

maropu commented Sep 28, 2020

Could you describe what's a root cause of the slow tests and how-to-fix in the PR description?

@tanelk
Copy link
Contributor Author

tanelk commented Sep 28, 2020

Could you describe what's a root cause of the slow tests and how-to-fix in the PR description?

I tried to explain it a bit better.

SQLConf.FILES_MAX_PARTITION_BYTES.key -> "2MB",
SQLConf.FILES_OPEN_COST_IN_BYTES.key -> String.valueOf(4 * 1024 * 1024)) {

withSQLConf(SQLConf.FILES_MIN_PARTITION_NUM.key -> "1") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is okay just to update the slow two tests only in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@maropu maropu changed the title [SPARK-32970][TEST] Reduce the runtime of an UT for SPARK-32019 [SPARK-32970][SQL][TEST] Reduce the runtime of an UT for SPARK-32019 Sep 28, 2020
val partitions = (1 to 800).map(i => s"file$i" -> 4 * 1024 * 1024)
val table = createTable(files = partitions)
assert(table.rdd.partitions.length == 50)
withSQLConf(SQLConf.FILES_MIN_PARTITION_NUM.key -> "8") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8 -> 16 for keeping the original test context?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

@SparkQA
Copy link

SparkQA commented Sep 28, 2020

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/33801/

@SparkQA
Copy link

SparkQA commented Sep 28, 2020

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/33801/

@SparkQA
Copy link

SparkQA commented Sep 28, 2020

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/33804/

@SparkQA
Copy link

SparkQA commented Sep 28, 2020

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/33804/

@SparkQA
Copy link

SparkQA commented Sep 28, 2020

Test build #129188 has finished for PR 29842 at commit 4f386f4.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Sep 28, 2020

Test build #129189 has finished for PR 29842 at commit 42020ee.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Member

@maropu maropu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HyukjinKwon
Copy link
Member

Merged to master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants