-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Feature][Core] Add slot allocation strategy #8233
base: dev
Are you sure you want to change the base?
Conversation
...test/java/org/apache/seatunnel/engine/e2e/allocatestrategy/SystemLoadAllocateStrategyIT.java
Show resolved
Hide resolved
...rc/main/java/org/apache/seatunnel/engine/server/resourcemanager/AbstractResourceManager.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/apache/seatunnel/engine/server/resourcemanager/AbstractResourceManager.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/apache/seatunnel/engine/server/resourcemanager/ResourceRequestHandler.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/apache/seatunnel/engine/server/resourcemanager/ResourceRequestHandler.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/apache/seatunnel/engine/server/resourcemanager/ResourceRequestHandler.java
Outdated
Show resolved
Hide resolved
Apart from the SYSTEM_LOAD and RANDOM modes, I feel that maybe another mode could be added. In Dynamic Slot Mode, selecting the smallest worker that meets the resource requirements could increase the success rate of tasks that require a large amount of resources. @Hisoka-X @hailin0 @zhangshenghang #8242 |
Reply in #8242 (comment) |
...e-server/src/test/java/org/apache/seatunnel/engine/server/utils/SystemLoadCalculateTest.java
Outdated
Show resolved
Hide resolved
...ache/seatunnel/engine/server/resourcemanager/allocation/strategy/SlotAllocationStrategy.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/apache/seatunnel/engine/server/resourcemanager/ResourceRequestHandler.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/apache/seatunnel/engine/server/resourcemanager/ResourceRequestHandler.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/apache/seatunnel/engine/server/resourcemanager/AbstractResourceManager.java
Outdated
Show resolved
Hide resolved
workerAssignedSlots.put(worker.getAddress(), new ImmutableTriple<>(0.0, assignedSlots, 0)); | ||
|
||
int totalSlots = worker.getUnassignedSlots().length + worker.getAssignedSlots().length; | ||
if (totalSlots == 0) { |
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 the worker use dynamic slot, the totalSlots is 0. But we should give a chance to dynamic worker to execute task.
...rg/apache/seatunnel/engine/server/resourcemanager/allocation/strategy/SlotRatioStrategy.java
Outdated
Show resolved
Hide resolved
...g/apache/seatunnel/engine/server/resourcemanager/allocation/strategy/SystemLoadStrategy.java
Outdated
Show resolved
Hide resolved
@Hisoka-X PTAL |
...ector-rabbitmq-e2e/src/test/java/org/apache/seatunnel/e2e/connector/rabbitmq/RabbitmqIT.java
Outdated
Show resolved
Hide resolved
...ache/seatunnel/engine/server/resourcemanager/FakeResourceManagerForRequestSlotRetryTest.java
Outdated
Show resolved
Hide resolved
Overall LGTM. Thanks @zhangshenghang . But I think we should merge this after 2.3.9 released. |
Ok, thank you for your review |
Hi @zhangshenghang , almost forgot, we need add new doc to introduce our task schedue logic. |
Purpose of this pull request
Does this PR introduce any user-facing change?
How was this patch tested?
Check list
New License Guide
release-note
.