-
Notifications
You must be signed in to change notification settings - Fork 153
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
[ISSUE-448][Feature] shuffle server report storage info #449
Conversation
common/src/main/java/org/apache/uniffle/common/storage/LocalStorageInfoUtils.java
Outdated
Show resolved
Hide resolved
170d3bc
to
adfdbbb
Compare
Codecov Report
@@ Coverage Diff @@
## master #449 +/- ##
============================================
+ Coverage 58.71% 58.78% +0.07%
- Complexity 1651 1704 +53
============================================
Files 199 206 +7
Lines 11214 11471 +257
Branches 998 1024 +26
============================================
+ Hits 6584 6743 +159
- Misses 4237 4317 +80
- Partials 393 411 +18
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -336,6 +336,12 @@ public class ShuffleServerConf extends RssBaseConf { | |||
.withDescription("Threshold when flushing shuffle data to persistent storage, recommend value would be 256K, " | |||
+ "512K, or even 1M"); | |||
|
|||
public static final ConfigOption<String> STORAGE_TYPE_PROVIDER_ENV_KEY = ConfigOptions |
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 this an internal config entry? If yes, could you mark it, rename from STORAGE_TYPE_PROVIDER_ENV_KEY
to __INTERNAL_STORAGE_TYPE_PROVIDER_ENV_KEY
? WDYT
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.
admin might change it. I'm not sure it falls into the internal config catalog?
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.
do you have other suggestions?
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 think this is an initial PR to support better assignment, it's better to list all subtasks, and indicate the progress in the PR title, like [1/n] xxxx, [2/n] xxxxxx.
common/src/main/java/org/apache/uniffle/common/storage/SingleStorageType.java
Outdated
Show resolved
Hide resolved
common/src/main/java/org/apache/uniffle/common/storage/SingleStorageType.java
Outdated
Show resolved
Hide resolved
common/src/main/java/org/apache/uniffle/common/storage/SingleStorageType.java
Outdated
Show resolved
Hide resolved
common/src/main/java/org/apache/uniffle/common/storage/SingleStorageType.java
Outdated
Show resolved
Hide resolved
common/src/main/java/org/apache/uniffle/common/storage/StorageStatus.java
Show resolved
Hide resolved
common/src/main/java/org/apache/uniffle/common/storage/StorageStatus.java
Outdated
Show resolved
Hide resolved
@@ -94,19 +101,26 @@ public class LocalStorageManager extends SingleStorageManager { | |||
// We must make sure the order of `storageBasePaths` and `localStorages` is same, or some unit test may be fail | |||
CountDownLatch countDownLatch = new CountDownLatch(storageBasePaths.size()); | |||
AtomicInteger successCount = new AtomicInteger(); | |||
ServiceLoader<StorageTypeProvider> loader = ServiceLoader.load(StorageTypeProvider.class); |
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 we need multiple storage type providers? I think one is enough.
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 think one is not enough, especially when you need to provide your own provider logic.
Although, the current logic may not handle provider evaluation order properly. But we can modify that later.
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 think one is not enough, especially when you need to provide your own provider logic.
Could you help provide some examples about needing multiple providers?
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 you help provide some examples about needing multiple providers?
Just like the DefaultStorageTypeProvider
and StorageTypeFromEnvProvider
. Some base dir might be indeed is a SSD disk but the default could only return HDD>
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 can't agree this, we could use single provider to mark one storage media for one basePath, this is enough.
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.
what if the DefaultStorageMediaProvider
cannot provide accurate result?
The whole point of SPI is to provide an extend way to add plugins. So, the service loader must be a list?
server/src/main/java/org/apache/uniffle/server/storage/StorageTypeFromEnvProvider.java
Outdated
Show resolved
Hide resolved
storage/src/main/java/org/apache/uniffle/storage/common/DefaultStorageTypeProvider.java
Outdated
Show resolved
Hide resolved
The initial intention for this PR is to support shuffle server with LOCAL HDD disks better. You can see the parent and sub-issues from #448. However this pr extends its scope a bit. I may open another issue to track this and related issues for better shuffle server assignments. |
PLAT @zuston . |
server/src/main/java/org/apache/uniffle/server/storage/StorageManager.java
Outdated
Show resolved
Hide resolved
common/src/main/java/org/apache/uniffle/common/storage/StorageTypePOJO.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/uniffle/server/storage/StorageMediaFromEnvProvider.java
Show resolved
Hide resolved
coordinator/src/main/java/org/apache/uniffle/coordinator/ServerNode.java
Outdated
Show resolved
Hide resolved
coordinator/src/main/java/org/apache/uniffle/coordinator/ServerNode.java
Show resolved
Hide resolved
server/src/main/java/org/apache/uniffle/server/ShuffleServerConf.java
Outdated
Show resolved
Hide resolved
If we introduce extra configuration option, we should add the document about this feature to explain how to use this feature. |
Done. Please take another look when you have time. |
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, let @zuston take a look
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 +1
What changes were proposed in this pull request?
ShuffleServer reports local storage info about itself.
This PR also defines a general message definition to extend remote distributed info.
Why are the changes needed?
To do better shuffle assignments and get more insight of shuffle server
This addresses #448
Does this PR introduce any user-facing change?
No
How was this patch tested?
Added UTs.