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


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/OutputTooLargeException.java:
##########
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.beam.runners.dataflow.worker;
+
+/** Indicates that an output element was too large. */
+@SuppressWarnings({
+  "nullness" // TODO(https://github.com/apache/beam/issues/20497)

Review Comment:
   can you remove this and fix warning for new code instead?
   
   might just need to mark Throwable t as nullable below



##########
runners/google-cloud-dataflow-java/worker/src/test/java/org/apache/beam/runners/dataflow/worker/StreamingDataflowWorkerTest.java:
##########
@@ -4450,7 +4525,11 @@ private static StreamingDataflowWorkerTestParams.Builder 
builder() {
 
     abstract int localRetryTimeoutMs();
 
-    abstract int maxWorkItemCommitBytes();
+    abstract long maxWorkItemCommitBytes();

Review Comment:
   just use operational limits instead of separating the fields?



##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/streaming/config/StreamingEngineComputationConfigFetcher.java:
##########
@@ -187,6 +194,18 @@ private static StreamingEnginePipelineConfig 
createPipelineConfig(StreamingConfi
       
pipelineConfig.setMaxWorkItemCommitBytes(config.getMaxWorkItemCommitBytes().intValue());
     }
 
+    if (shouldPerformOutputSizeChecks && config.getOperationalLimits() != 
null) {

Review Comment:
   Thinking about this some more, maybe we want to plumb this further rather 
than just setting the limits to the max.
   
   If we kept the limits, we could check them and at least log an error message 
if we weren't going to throw an exception.



##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/StreamingDataflowWorker.java:
##########
@@ -474,9 +475,17 @@ static StreamingDataflowWorker forTesting(
       Supplier<Instant> clock,
       Function<String, ScheduledExecutorService> executorSupplier,
       int localRetryTimeoutMs,
-      int maxWorkItemCommitBytesOverrides) {
+      long maxWorkItemCommitBytesOverrides,

Review Comment:
   take OperationalLimits instead?



##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/streaming/config/StreamingEngineComputationConfigFetcher.java:
##########
@@ -80,24 +81,28 @@ private StreamingEngineComputationConfigFetcher(
       long globalConfigRefreshPeriodMillis,
       WorkUnitClient dataflowServiceClient,
       ScheduledExecutorService globalConfigRefresher,
+      boolean shouldPerformOutputSizeChecks,

Review Comment:
   nit: name to match the experiment, shouldThrowOutputSizeExceptions?



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