danielnadean commented on issue #11665: URL: https://github.com/apache/seatunnel/issues/11665#issuecomment-5236826008
@goutamadwant you're right, and I should have found this before opening PRs. Two things I missed in my own research: 1. `WorkerResourceDiagnostic` (`org.apache.seatunnel.engine.server.diagnostic`) already models almost exactly this per-worker shape - `address`, `tags`, `totalSlots`, `freeSlots`, `dynamicSlot`, `cpuUsage`, `memUsage`, `runningJobIds`. I built a parallel `WorkerOverviewInfo` with different field names for the same concepts instead of reusing or aligning with it. 2. #11597 is already adding a running-job-centric slot usage API. Adding a third, worker-centric slot representation on top without reconciling with either of those is exactly the kind of competing-model fragmentation you flagged. You're also correct on the substance, independent of prior art: my `totalSlot = assignedSlots.length + unassignedSlots.length` is wrong for dynamic-slot workers, for the reason you gave - `unassignedSlots` is not a fixed remaining pool for those, so summing the two array lengths does not mean "capacity." Withdrawing my claim and closing #11732 / #11733. Your proposed backend contract (fixed vs. dynamic slot representation, explicit snapshot/unavailable-worker semantics, reusing `WorkerResourceDiagnostic` where possible, alignment with #11597) is the right foundation - please go ahead with it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
