Skip to content

Conversation

@RabbidHY
Copy link
Contributor

What changes were proposed in this pull request?

Set spark.sql.files.openCostInBytes to bytesConf.

Why are the changes needed?

The name is *InBytes, but it actually only accepts long type. This is confusing for users. After the changes, it can accept String as input which is more flexible to users.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Existing test.

@github-actions github-actions bot added the SQL label Oct 21, 2021
.longConf
.createWithDefault(4 * 1024 * 1024)
.bytesConf(ByteUnit.BYTE)
.createWithDefaultString("4MB")
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a simple test at ConfigEntrySuite to make sure byte configuration is able to take the long type numbers?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1; we could probably extend this existing test:

test("conf entry: bytes") {
val conf = new SparkConf()
val bytes = ConfigBuilder(testKey("bytes")).bytesConf(ByteUnit.KiB)
.createWithDefaultString("1m")
assert(conf.get(bytes) === 1024L)
conf.set(bytes.key, "1k")
assert(conf.get(bytes) === 1L)
}

@HyukjinKwon
Copy link
Member

Let's also file a JIRA, see also https://spark.apache.org/contributing.html

@RabbidHY RabbidHY changed the title Set spark.sql.files.openCostInBytes to bytesConf [SPARK-37084][SQL] Set spark.sql.files.openCostInBytes to bytesConf Oct 21, 2021
@github-actions github-actions bot added the CORE label Oct 22, 2021
@HyukjinKwon
Copy link
Member

ok to test

@HyukjinKwon
Copy link
Member

Merged to master.

@SparkQA
Copy link

SparkQA commented Oct 23, 2021

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

@SparkQA
Copy link

SparkQA commented Oct 23, 2021

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

@SparkQA
Copy link

SparkQA commented Oct 23, 2021

Test build #144550 has finished for PR 34353 at commit 4003f0c.

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

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

HyukjinKwon pushed a commit that referenced this pull request Oct 25, 2021
### What changes were proposed in this pull request?

Set `spark.sql.files.openCostInBytes` to bytesConf.

### Why are the changes needed?

The name is _*InBytes_, but it actually only accepts **long type**. This is confusing for users. After the changes, it can accept **String** as input which is more flexible to users.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Existing test.

Closes #34353 from RabbidHY/SPARK-37084.

Authored-by: RabbidHY <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants