-
Notifications
You must be signed in to change notification settings - Fork 151
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
[#2197] Support reg app conf to server and avoid update committed/cached blockIds bitmap #2196
Conversation
7342670
to
769372e
Compare
769372e
to
ff4b590
Compare
This may be better as a server configuration. |
@jerqi Done, add a new configuration |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2196 +/- ##
============================================
+ Coverage 52.31% 52.97% +0.65%
- Complexity 2814 3218 +404
============================================
Files 452 487 +35
Lines 21211 26224 +5013
Branches 1950 2477 +527
============================================
+ Hits 11097 13891 +2794
- Misses 9405 11422 +2017
- Partials 709 911 +202 ☔ View full report in Codecov by Sentry. |
Why do we need to register app configuration to server? |
proto/src/main/proto/Rss.proto
Outdated
@@ -193,6 +193,7 @@ message ShuffleRegisterRequest { | |||
string comparatorClass = 11; | |||
int32 mergedBlockSize = 12; | |||
string mergeClassLoader = 13; | |||
map<string, string> appConf = 1000; |
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.
Prefer clear defining parameters instead of a map.
@jerqi I plan to use the client side Conf as a app level session config, base on this, we do not need to send BlockLayout for each reportShuffleResult, we only need to get it from app session Conf from ShuffleTaskInfo. Leverage the appConf, we can easy to extends new features without proto change, even without client upgrade. |
I know. But I am no sure that this is a good idea. Application configuration can contain many things. It lacks constraint. We can't get enough information from the interface. It's easy to develop but it's hard to understand. |
@jerqi I see. It make sense about your concern. How about a trade off that we only filter and send the rss config to server by filter the |
I feel that some options can be passed to the server. But important concepts should be extracted to explict fields in the interface such as BlockLayout |
@jerqi Thanks for your help for improve this PR.
|
d08c314
to
58e39ab
Compare
11328dc
to
eb87001
Compare
Encountered famous flaky test
|
ping @jerqi Sorry to remind |
@@ -719,6 +719,11 @@ public class ShuffleServerConf extends RssBaseConf { | |||
.booleanType() | |||
.defaultValue(false) | |||
.withDescription("Whether to enable app detail log"); | |||
public static final ConfigOption<Boolean> SERVER_WITH_MEMORY_STORAGE_TYPE_OPTIMIZE_ENABLED = |
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.
Could we use camel style for last segment and 4 - 5 segments for the whole config option like
rss.server.storage.bitmapMemoryOptimizeEnabled
.
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
@@ -307,4 +318,25 @@ public String toString() { | |||
+ shuffleDetailInfos | |||
+ '}'; | |||
} | |||
|
|||
public void setProperties(Map<String, String> properties, ShuffleServerConf serverConf) { |
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.
Why do we need serverConf
here?
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.
Since I need to check whether this server enabled bitmap optimized feature by SERVER_WITH_MEMORY_STORAGE_TYPE_OPTIMIZE_ENABLED
synchronized (bitmap) { | ||
// With memory storage type should never need cachedBlockIds, | ||
// since client do not need call finish shuffle rpc | ||
if (!shuffleTaskInfo.isClientStorageTypeWithMemory()) { |
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.
We can get this config option from the server configuration directly instead getting from taskInfo.
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.
@jerqi It is different, this is a client side config, it configured by client, so I have to get it from shuffle TaskInfo.
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 this config option should be same between server and client side.
@jerqi Thanks for reply and review, I renamed the property key, I can change to other name if you feel it is not good. PTAL |
… cachedBlocksIds bitmaps for with memory client storageType
199e00d
to
dcb37e3
Compare
We would better add check in the commit rpc implement for server side if client uses commit rpc. |
boolean storageTypeWithMemory = | ||
StorageType.withMemory(StorageType.valueOf(storageType.name())); | ||
if (storageTypeWithMemory) { | ||
LOG.warn( |
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.
We should throw exception directly.
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.
@jerqi If we throw exception, it will never support for test mode and LOCALFILE
client to access the server with LOCALFILE_MEMORY
storageType?
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.
OK for me.
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.
I means that it's ok for me to throw exception here.
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.
@jerqi Sorry for the misunderstand, done.
@jerqi Thanks for remind me, I have misunderstood your suggestion, now I throw exception for these two method, PTAL |
"finishShuffle should not be called while server-side configured StorageType to %s for appId %s", | ||
storageType, appId); | ||
LOG.error(errorMessage); | ||
throw new IllegalStateException(errorMessage); |
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.
UnsupportedException?
@jerqi Thanks for your review! |
What changes were proposed in this pull request?
Support reg app conf to server.
Why are the changes needed?
Fix #2197
Avoid update committed/cached blockIds bitmap while storage type is with memory.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Locally