-
Notifications
You must be signed in to change notification settings - Fork 466
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
[VL] Should convert kSpillReadBufferSize and kShuffleSpillDiskWriteBufferSize to number #8684
[VL] Should convert kSpillReadBufferSize and kShuffleSpillDiskWriteBufferSize to number #8684
Conversation
Thanks for opening a pull request! Could you open an issue for this pull request on Github Issues? https://github.com/apache/incubator-gluten/issues Then could you also rename commit message and pull request title in the following format?
See also: |
Run Gluten Clickhouse CI on x86 |
@jinchengchenghh @FelixYBW Hey, could you please help review this? Thanks! |
incubator-gluten/shims/common/src/main/scala/org/apache/spark/sql/internal/GlutenConfigUtil.scala Lines 21 to 45 in e009208
|
oh, GlutenConfigUtil only process the config which prefix is 'spark.gluten'. |
Do we need to extend this function to allow all configures? |
yeah, we may need add new method |
Hey @Yohahaha We cannot use How about only extract a specific method that handle bytes value only to reduce duplicates? |
sounds good to me. |
3cf701b
to
590a0a7
Compare
Run Gluten Clickhouse CI on x86 |
@Yohahaha Hey, comments addressed, could you review this again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! only one comments.
|
||
import org.scalatest.funsuite.AnyFunSuite | ||
|
||
class GlutenConfigUtilSuite extends AnyFunSuite { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe move this suite to gluten-core
is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
just ignore this failure, it's a known issue. |
590a0a7
to
0258e96
Compare
Run Gluten Clickhouse CI on x86 |
Do we need to update it from |
The current code only gets the configuration of gluten, as |
.put( | ||
SPARK_SHUFFLE_FILE_BUFFER, | ||
(JavaUtils.byteStringAs(v, ByteUnit.KiB) * 1024).toString)) | ||
GlutenConfigUtil.mapByteConfValue( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should add a new list like keyWithDefault
, move the bytes config together, it will be more easier for users to add byte config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is byteKeys
Yes, maybe add a list to |
conf, | ||
SPARK_SHUFFLE_SPILL_DISK_WRITE_BUFFER_SIZE, | ||
ByteUnit.BYTE)(v => nativeConfMap.put(SPARK_SHUFFLE_SPILL_DISK_WRITE_BUFFER_SIZE, v.toString)) | ||
GlutenConfigUtil.mapByteConfValue(conf, SPARK_SHUFFLE_FILE_BUFFER, ByteUnit.KiB)( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is JavaUtils.byteStringAs(v, ByteUnit.KiB) * 1024) equal to JavaUtils.byteStringAs(v, ByteUnit.BYTE)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, if v
doesn't provide unit, then this unit provided will be used. E.g, when v is 1024, then JavaUtils.byteStringAs(v, ByteUnit.KiB) * 1024)
will be 1024 * 1024, while JavaUtils.byteStringAs(v, ByteUnit.BYTE)
is 1024.
…fferSize to number (apache#8684)
What changes were proposed in this pull request?
Fix the issue introduced by #8045, we could meet the error if manually set
spark.unsafe.sorter.spill.reader.buffer.size
to value like2m
We should parse value to number in bytes before put to nativeConf
(Fixes: #ISSUE-ID)
How was this patch tested?
(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)