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
[Improvement] Use ConfigBuilder to rewrite the class RssSparkConfig #104
Conversation
client-spark/common/src/main/java/org/apache/spark/shuffle/RssSparkConfig.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #104 +/- ##
============================================
+ Coverage 56.45% 57.10% +0.64%
- Complexity 1182 1188 +6
============================================
Files 149 149
Lines 8008 8129 +121
Branches 767 767
============================================
+ Hits 4521 4642 +121
- Misses 3243 3244 +1
+ Partials 244 243 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. |
client-spark/common/src/main/java/org/apache/spark/shuffle/RssSparkConfig.java
Outdated
Show resolved
Hide resolved
client-spark/common/src/main/java/org/apache/spark/shuffle/RssSparkConfig.java
Outdated
Show resolved
Hide resolved
client-spark/common/src/main/java/org/apache/spark/shuffle/RssSparkConfig.java
Outdated
Show resolved
Hide resolved
client-spark/common/src/main/java/org/apache/spark/shuffle/RssSparkConfig.java
Outdated
Show resolved
Hide resolved
client-spark/common/src/main/java/org/apache/spark/shuffle/RssSparkConfig.java
Outdated
Show resolved
Hide resolved
We find that we can rewrite the method
Maybe we can add a method like
|
How to implement this method |
Just modify some code , i pass the compile, the code is as below
|
Is that what you mean? @jerqi |
Yes, that is. And could you give |
You can refer to https://github.com/apache/incubator-uniffle/blob/master/docs/client_guide.md about some configuration description. |
Here, it is not supported to convert variables of String type into data of Generic type, so we may need to provide typeBuilder methods of Integer, Long, Boolean, etc |
Maybe we can use the code like
|
client-spark/spark2/src/main/java/org/apache/spark/shuffle/RssShuffleManager.java
Outdated
Show resolved
Hide resolved
client-spark/common/src/main/java/org/apache/spark/shuffle/RssSparkConfig.java
Outdated
Show resolved
Hide resolved
client-spark/common/src/main/java/org/apache/spark/shuffle/RssSparkConfig.java
Outdated
Show resolved
Hide resolved
client-spark/common/src/main/java/org/apache/spark/shuffle/RssSparkConfig.java
Outdated
Show resolved
Hide resolved
client-spark/common/src/main/java/org/apache/spark/shuffle/RssSparkConfig.java
Outdated
Show resolved
Hide resolved
client-spark/common/src/main/java/org/apache/spark/shuffle/RssSparkConfig.java
Show resolved
Hide resolved
6fa86e2
to
71c50d9
Compare
|
||
public static final ConfigEntry<Integer> RSS_PARTITION_NUM_PER_RANGE = createIntegerBuilder( | ||
new ConfigBuilder(SPARK_RSS_CONFIG_PREFIX + RssClientConfig.RSS_PARTITION_NUM_PER_RANGE) | ||
.doc("")) |
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.
If we don't have accurate description, we remove doc
first.
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.
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.
Except for https://github.com/apache/incubator-uniffle/pull/104/files#r933988660, LGTM, @frankliee Do you have any other suggestion?
cc @frankliee @jerqi |
+1, LGTM |
LGTM too |
Merged, @smallzhongfeng thanks for your contribution. |
Thanks for your support.@jerqi |
What changes were proposed in this pull request?
Call Spark's class ConfigBuilder to optimize the original code.
Why are the changes needed?
You can annotate these parameters and make the code more standardized.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Use the original test.