scwhittle commented on code in PR #32272:
URL: https://github.com/apache/beam/pull/32272#discussion_r1725706838


##########
runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/SplittableDoFnOperator.java:
##########
@@ -126,7 +127,12 @@ public void initializeState(StateInitializationContext 
context) throws Exception
     // this will implicitly be keyed like the StateInternalsFactory
     TimerInternalsFactory<byte[]> timerInternalsFactory = key -> 
timerInternals;
 
-    executorService = 
Executors.newSingleThreadScheduledExecutor(Executors.defaultThreadFactory());
+    if (this.executorService == null) {
+      this.executorService =
+          Executors.newScheduledThreadPool(
+              Runtime.getRuntime().availableProcessors(),

Review Comment:
   I think these other ones could stay a single thread, since it was already 
shared.



##########
runners/samza/src/main/java/org/apache/beam/runners/samza/runtime/SplittableParDoProcessKeyedElementsOp.java:
##########
@@ -137,6 +142,14 @@ public void open(
             isBounded,
             pipelineOptions);
 
+    if (this.ses.get() == null) {
+      this.ses.compareAndSet(
+          null,
+          Executors.newScheduledThreadPool(
+              Runtime.getRuntime().availableProcessors(),

Review Comment:
   ditto since this one is just used by a single processfn



-- 
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]

Reply via email to