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

[Improvement] Introduce config to customize assignment server numbers in client side #100

Merged
merged 7 commits into from
Aug 1, 2022

Conversation

zuston
Copy link
Member

@zuston zuston commented Jul 29, 2022

What changes were proposed in this pull request?

[Improvement] Introduce config to customize assignment server numbers in client side.

Changelog

  1. Introduce the config of <client_type>.rss.client.assignment.shuffle.nodes.max

Why are the changes needed?

Now the assignment number specified by coordinator's conf of rss.coordinator.shuffle.nodes.max. But i think it's not suitable for all spark jobs.

We should introduce new config to let client specify the assignment server number. rss.coordinator.shuffle.nodes.max should be as a max limitation of clients' number.

Does this PR introduce any user-facing change?

YES.

How was this patch tested?

UT.

@zuston
Copy link
Member Author

zuston commented Jul 29, 2022

Ping @jerqi

@codecov-commenter
Copy link

codecov-commenter commented Jul 29, 2022

Codecov Report

Merging #100 (0e6bf0f) into master (cdbacca) will increase coverage by 0.25%.
The diff coverage is 58.82%.

@@             Coverage Diff              @@
##             master     #100      +/-   ##
============================================
+ Coverage     56.34%   56.60%   +0.25%     
- Complexity     1175     1189      +14     
============================================
  Files           149      149              
  Lines          7977     8029      +52     
  Branches        765      769       +4     
============================================
+ Hits           4495     4545      +50     
- Misses         3239     3242       +3     
+ Partials        243      242       -1     
Impacted Files Coverage Δ
.../java/org/apache/hadoop/mapreduce/RssMRConfig.java 66.66% <ø> (ø)
...apache/hadoop/mapreduce/v2/app/RssMRAppMaster.java 0.00% <0.00%> (ø)
.../java/org/apache/spark/shuffle/RssSparkConfig.java 75.00% <ø> (ø)
...he/uniffle/client/impl/ShuffleWriteClientImpl.java 25.95% <ø> (ø)
...rg/apache/uniffle/client/util/RssClientConfig.java 0.00% <ø> (ø)
...he/uniffle/coordinator/CoordinatorGrpcService.java 2.33% <0.00%> (-0.03%) ⬇️
...e/uniffle/coordinator/BasicAssignmentStrategy.java 96.77% <100.00%> (+0.34%) ⬆️
...rg/apache/uniffle/coordinator/CoordinatorConf.java 96.15% <100.00%> (ø)
...oordinator/PartitionBalanceAssignmentStrategy.java 98.46% <100.00%> (+4.91%) ⬆️
...e/spark/shuffle/reader/RssShuffleDataIterator.java 89.70% <0.00%> (-3.95%) ⬇️
... and 9 more

Help us with your feedback. Take ten seconds to tell us how you rate us.

@zuston
Copy link
Member Author

zuston commented Jul 29, 2022

How to rerun the CI @jerqi

@jerqi
Copy link
Contributor

jerqi commented Jul 29, 2022

How to rerun the CI @jerqi

Close and reopen pull request.

@zuston zuston closed this Jul 29, 2022
@zuston zuston reopened this Jul 29, 2022
@@ -65,4 +65,8 @@ public class RssClientConfig {
public static final int RSS_ACCESS_TIMEOUT_MS_DEFAULT_VALUE = 10000;
public static final String RSS_DYNAMIC_CLIENT_CONF_ENABLED = "rss.dynamicClientConf.enabled";
public static final boolean RSS_DYNAMIC_CLIENT_CONF_ENABLED_DEFAULT_VALUE = true;

public static final String RSS_CLIENT_ASSIGNMENT_SHUFFLE_SERVER_NUMBER =
"rss.client.assignment.shuffle.server.number";
Copy link
Contributor

Choose a reason for hiding this comment

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

rss.client.assignment.shuffle.node.max
Could we use a similar style name with the coordinator's configuration?

Copy link
Member Author

Choose a reason for hiding this comment

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

OK

@zuston zuston requested a review from jerqi July 30, 2022 12:30
@zuston
Copy link
Member Author

zuston commented Jul 30, 2022

Updated @jerqi

@colinmjj
Copy link

colinmjj commented Aug 1, 2022

@zuston Thanks for the contribution, it's flexible for different kind of jobs. And please update Constants.SHUFFLE_SERVER_VERSION for version compatible.

@jerqi
Copy link
Contributor

jerqi commented Aug 1, 2022

@zuston Thanks for the contribution, it's flexible for different kind of jobs. And please update Constants.SHUFFLE_SERVER_VERSION for version compatible.

It should be a compatible feature, we don't need update the Constants.SHUFFLE_SERVER_VERSION.

@colinmjj
Copy link

colinmjj commented Aug 1, 2022

@zuston Thanks for the contribution, it's flexible for different kind of jobs. And please update Constants.SHUFFLE_SERVER_VERSION for version compatible.

It should be a compatible feature, we don't need update the Constants.SHUFFLE_SERVER_VERSION.

ok, it's only updated for coordinator.
+1, LGTM

@@ -88,6 +88,7 @@ These configurations are shared by all types of clients.
|<client_type>.rss.client.send.threadPool.size|5|The thread size for send shuffle data to shuffle server|
|<client_type>.rss.client.assignment.tags|-|The comma-separated list of tags for deciding assignment shuffle servers. Notice that the SHUFFLE_SERVER_VERSION will always as the assignment tag whether this conf is set or not|
|<client_type>.rss.client.data.commit.pool.size|The number of assigned shuffle servers|The thread size for sending commit to shuffle servers|
|<client_type>.rss.client.assignment.shuffle.nodes.max|-1|The number of required assignment shuffle servers. If it is less than 0 or greater than the coordinator's config of "rss.coordinator.shuffle.nodes.max", it will use the size of "rss.coordinator.shuffle.nodes.max" default|
Copy link
Contributor

Choose a reason for hiding this comment

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

When the value is equal to 0, what will happen?

Copy link
Member Author

Choose a reason for hiding this comment

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

If it is less than 0 or equal to 0 or greater than the coordinator's config of "rss.coordinator.shuffle.nodes.max", it will use the size of "rss.coordinator.shuffle.nodes.max" default.

I missed the condition of ==0.

* case1: user specify the illegal shuffle node num(<0)
* it will use the default shuffle nodes num when having enough servers.
*/
PartitionRangeAssignment pra = strategy.assign(100, 10, 1, serverTags, -1);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a case when assignShuffleServer is equal to 0?

Copy link
Member Author

Choose a reason for hiding this comment

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

update

@zuston zuston requested a review from jerqi August 1, 2022 11:48
Copy link
Contributor

@jerqi jerqi left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for your contribution.

@jerqi jerqi merged commit 9a227da into apache:master Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants