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

[CELEBORN-1081][FOLLOWUP] Remove UNKNOWN_DISK and allocate all slots to disk #2098

Closed
wants to merge 8 commits into from

Conversation

FMX
Copy link
Contributor

@FMX FMX commented Nov 14, 2023

What changes were proposed in this pull request?

  1. Remove UNKNOWN_DISK from StorageInfo.
  2. Enable load-aware slots allocation when there is HDFS.

Why are the changes needed?

To support the application's config about available storage types.

Does this PR introduce any user-facing change?

no.

How was this patch tested?

GA and Cluster.

@FMX FMX marked this pull request as draft November 14, 2023 08:18
Copy link

codecov bot commented Nov 15, 2023

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (788b0c3) 46.50% compared to head (f3934f0) 46.54%.
Report is 2 commits behind head on main.

Files Patch % Lines
...g/apache/celeborn/common/protocol/StorageInfo.java 37.50% 4 Missing and 1 partial ⚠️
...a/org/apache/celeborn/common/meta/WorkerInfo.scala 25.00% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2098      +/-   ##
==========================================
+ Coverage   46.50%   46.54%   +0.04%     
==========================================
  Files         166      166              
  Lines       10758    10781      +23     
  Branches      984      988       +4     
==========================================
+ Hits         5002     5017      +15     
- Misses       5430     5436       +6     
- Partials      326      328       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@FMX FMX marked this pull request as ready for review November 15, 2023 07:35
@FMX FMX marked this pull request as draft November 15, 2023 07:38
@FMX FMX marked this pull request as ready for review November 15, 2023 07:45
@FMX
Copy link
Contributor Author

FMX commented Nov 22, 2023

@RexXiong @waitinfuture Take a look at this PR when you have time.

diskIndex = (diskIndex + 1) % usableDiskInfos.size();
}
usableDiskInfos.get(diskIndex).usableSlots--;
DiskInfo selectedDiskInfo = usableDiskInfos.get(diskIndex).diskInfo;
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO, we can put storage type in diskInfo, then we can directly know which type the disk is.

storageInfo = new StorageInfo(diskInfos[diskIndex].mountPoint(), availableStorageTypes);
diskIndex = (diskIndex + 1) % diskInfos.length;
} else {
storageInfo = new StorageInfo(StorageInfo.Type.HDFS, availableStorageTypes);
Copy link
Contributor

Choose a reason for hiding this comment

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

why use HDFS directly at this branch?

@@ -218,7 +244,8 @@ private static List<Integer> roundRobin(
boolean shouldReplicate,
boolean shouldRackAware,
int availableStorageTypes) {
// workerInfo -> (diskIndexForPrimary, diskIndexForReplica)
// workerInfo -> (diskIndexForPrimary, diskIndexForRe
Copy link
Contributor

Choose a reason for hiding this comment

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

link was break

FMX added 7 commits November 24, 2023 12:08
# Conflicts:
#	master/src/main/java/org/apache/celeborn/service/deploy/master/SlotsAllocator.java
Copy link
Contributor

@RexXiong RexXiong left a comment

Choose a reason for hiding this comment

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

LGTM, merge to main(0.4.0)

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.

2 participants