You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/05/05 21:19:43 UTC

[GitHub] [beam] tweise commented on a change in pull request #11558: [BEAM-8742] Add stateful and timely processing benchmarks

tweise commented on a change in pull request #11558:
URL: https://github.com/apache/beam/pull/11558#discussion_r420389628



##########
File path: .test-infra/jenkins/job_LoadTests_ParDo_Flink_Python.groovy
##########
@@ -142,9 +249,22 @@ PhraseTriggeringPostCommitBuilder.postCommitJob(
   'Load Tests Python ParDo Flink Batch suite',
   this
 ) {
-  loadTest(delegate, CommonTestProperties.TriggeringContext.PR)
+  loadBatchTests(delegate, CommonTestProperties.TriggeringContext.PR)
+}
+
+PhraseTriggeringPostCommitBuilder.postCommitJob(
+    'beam_LoadTests_Python_ParDo_Flink_Streaming',

Review comment:
       Why multiple trigger phrases?

##########
File path: runners/flink/src/main/java/org/apache/beam/runners/flink/FlinkDebugPipelineOptions.java
##########
@@ -0,0 +1,41 @@
+/*
+ * 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.flink;
+
+import org.apache.beam.sdk.options.Default;
+import org.apache.beam.sdk.options.Description;
+import org.apache.beam.sdk.options.PipelineOptions;
+
+/** Debug options which shouldn't normally be used. */
+public interface FlinkDebugPipelineOptions extends PipelineOptions {
+
+  @Description(
+      "If not null, reports the checkpoint duration of each ParDo stage in the provided metric namespace.")
+  String getReportCheckpointDuration();
+
+  void setReportCheckpointDuration(String metricNamespace);
+
+  @Description(
+      "Shuts down sources which have been idle for the configured time of milliseconds. Once a source has been "
+          + "shut down, chekpointing is not possible anymore. Shutting down the sources eventually leads to pipeline "
+          + "shutdown once all input has been processed.")
+  @Default.Long(0)
+  Long getShutdownSourcesAfterIdleMs();

Review comment:
       Unless I misread, this parameter is directly tied to `!shutdownSourcesOnFinalWatermark`? How about consolidating the two? Just a single parameter shutdownSourcesAfterIdleMs should suffice:
   
   0 - immediate shutdown, which should be default, unless checkpointing is enabled
   value > 0 - wait, potentially forever
   
   There was a question on the ML recently about shutdownSourcesOnFinalWatermark and if that should not be default. I think it should be (unless checkpointing was enabled), in which case we can never shutdown. So there should be almost no situation where this parameter needs to be set, except in a special case like this. 
    

##########
File path: runners/flink/src/main/java/org/apache/beam/runners/flink/FlinkDebugPipelineOptions.java
##########
@@ -0,0 +1,41 @@
+/*
+ * 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.flink;
+
+import org.apache.beam.sdk.options.Default;
+import org.apache.beam.sdk.options.Description;
+import org.apache.beam.sdk.options.PipelineOptions;
+
+/** Debug options which shouldn't normally be used. */
+public interface FlinkDebugPipelineOptions extends PipelineOptions {
+
+  @Description(
+      "If not null, reports the checkpoint duration of each ParDo stage in the provided metric namespace.")
+  String getReportCheckpointDuration();
+
+  void setReportCheckpointDuration(String metricNamespace);
+
+  @Description(
+      "Shuts down sources which have been idle for the configured time of milliseconds. Once a source has been "
+          + "shut down, chekpointing is not possible anymore. Shutting down the sources eventually leads to pipeline "

Review comment:
       ```suggestion
             + "shut down, checkpointing is not possible anymore. Shutting down the sources eventually leads to pipeline "
   ```

##########
File path: runners/flink/src/main/java/org/apache/beam/runners/flink/FlinkDebugPipelineOptions.java
##########
@@ -0,0 +1,41 @@
+/*
+ * 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.flink;
+
+import org.apache.beam.sdk.options.Default;
+import org.apache.beam.sdk.options.Description;
+import org.apache.beam.sdk.options.PipelineOptions;
+
+/** Debug options which shouldn't normally be used. */
+public interface FlinkDebugPipelineOptions extends PipelineOptions {

Review comment:
       Not sure I like the idea of having these as a separate interface that `FlinkPipelineOptions` extends (!). 

##########
File path: runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/DoFnOperator.java
##########
@@ -455,6 +461,18 @@ public void open() throws Exception {
     if (!options.getDisableMetrics()) {
       flinkMetricContainer = new FlinkMetricContainer(getRuntimeContext());
       doFnRunner = new DoFnRunnerWithMetricsUpdate<>(stepName, doFnRunner, flinkMetricContainer);
+      String checkpointMetricNamespace =

Review comment:
       Wouldn't it be sufficient to rely on Flink 's task-level checkpoint metrics for this? 

##########
File path: sdks/python/apache_beam/testing/load_tests/pardo_test.py
##########
@@ -125,6 +155,70 @@ def process(self, element):
         'Measure time: End' >> beam.ParDo(MeasureTime(self.metrics_namespace)))
 
 
+class StatefulLoadGenerator(beam.PTransform):

Review comment:
       Nice to see that it is finally possible to achieve this with timers! Should `GenerateLoad` be reusable?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org