zhoulii opened a new issue, #7783: URL: https://github.com/apache/paimon/issues/7783
### Search before asking - [x] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar. ### Motivation When users configure custom resources (e.g., SINK_WRITER_CPU, SINK_WRITER_MEMORY) for sink operators via FlinkSink#configureSlotSharingGroup, the current implementation creates a dedicated SlotSharingGroup for the operator. This breaks operator chaining — even if the upstream source and the writer are connected by a forward edge, they cannot be chained together because Flink requires chained operators to belong to the same slot sharing group. As a result, data that should be forwarded locally is forced through the network stack, introducing unnecessary serialization/deserialization overhead and extra thread cost. <img width="980" height="261" alt="Image" src="https://github.com/user-attachments/assets/e00f5e22-f07d-4abd-a1a5-d3a5860ac51d" /> ### Solution Replace SlotSharingGroup with ResourceSpec for per-operator resource declaration. Instead of operator.slotSharingGroup(slotSharingGroup), use operator.getTransformation().setResources(resourceSpec, resourceSpec). ResourceSpec declares resource requirements at the operator level without altering the slot sharing group assignment, so the writer operators remain in the default slot sharing group and can still be chained with upstream operators. The Flink scheduler will aggregate the ResourceSpec of all operators within a chain to determine the total slot resource requirement. ### Anything else? _No response_ ### Are you willing to submit a PR? - [x] I'm willing to submit a PR! -- 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]
