[
https://issues.apache.org/jira/browse/BEAM-8258?focusedWorklogId=474038&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-474038
]
ASF GitHub Bot logged work on BEAM-8258:
----------------------------------------
Author: ASF GitHub Bot
Created on: 24/Aug/20 20:32
Start Date: 24/Aug/20 20:32
Worklog Time Spent: 10m
Work Description: y1chi commented on a change in pull request #12674:
URL: https://github.com/apache/beam/pull/12674#discussion_r475871022
##########
File path: sdks/python/apache_beam/testing/benchmarks/nexmark/monitor.py
##########
@@ -0,0 +1,48 @@
+#
+# 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.
+#
+
+from __future__ import absolute_import
+
+from time import time
+
+import apache_beam as beam
+from apache_beam.metrics import Metrics
+from apache_beam.testing.benchmarks.nexmark.nexmark_util import MonitorSuffix
+
+
+class Monitor(object):
Review comment:
Add a documentation on the parameters and the monitored metrics.
##########
File path: sdks/python/apache_beam/testing/benchmarks/nexmark/nexmark_util.py
##########
@@ -192,6 +194,11 @@ def expand(self, pcoll):
| "Log" >> beam.Map(log_count_info))
+class MonitorSuffix:
Review comment:
can we put this into Monitor class
##########
File path: sdks/python/apache_beam/testing/benchmarks/nexmark/nexmark_util.py
##########
@@ -221,5 +228,34 @@ def unnest_to_json(cand):
def millis_to_timestamp(millis):
+ # type: (int) -> Timestamp
micro_second = millis * 1000
return Timestamp(micros=micro_second)
+
+
+def get_counter_metric(result, namespace, name):
+ # type: (PipelineResult, str, str) -> int
+ metrics = result.metrics().query(
+ MetricsFilter().with_namespace(namespace).with_name(name))
+ counters = metrics['counters']
+ if len(counters) > 1:
+ raise ValueError(
Review comment:
ValueError is normally used to say the function argument being passed is
invalid, I think we can use RuntimeError instead.
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 474038)
Time Spent: 3.5h (was: 3h 20m)
> Implement Nexmark (benchmark suite) in Python and integrate it with Spark and
> Flink runners
> -------------------------------------------------------------------------------------------
>
> Key: BEAM-8258
> URL: https://issues.apache.org/jira/browse/BEAM-8258
> Project: Beam
> Issue Type: Bug
> Components: testing-nexmark
> Reporter: Ismaël Mejía
> Priority: P3
> Labels: gsoc, gsoc2020, mentor
> Time Spent: 3.5h
> Remaining Estimate: 0h
>
> Apache Beam [1] is a unified and portable programming model for data
> processing jobs (pipelines). The Beam model [2, 3, 4] has rich mechanisms to
> process endless streams of events.
> Nexmark [5] is a benchmark for streaming jobs, basically a set of jobs
> (queries) to test different use cases of the execution system. Beam
> implemented Nexmark for Java [6, 7] and it has been succesfully used to
> improve the features of multiple Beam runners and discover performance
> regressions.
> Thanks to the work on portability [8] we can now run Beam pipelines on top of
> open source systems like Apache Spark [9] and Apache Flink [10]. The goal of
> this issue/project is to implement the Nexmark queries on Python and
> configure them to run on our CI on top of open source systems like Apache
> Spark and Apache Flink. The goal is that it helps the project to track and
> improve the evolution of portable open source runners and our python
> implementation as we do for Java.
> Because of the time constraints of GSoC we will adjust the goals (sub-tasks)
> depending on progress.
> [1] https://beam.apache.org/
> [2] https://www.oreilly.com/ideas/the-world-beyond-batch-streaming-101
> [3] https://www.oreilly.com/ideas/the-world-beyond-batch-streaming-102
> [4]
> https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/43864.pdf
> [5]
> https://web.archive.org/web/20100620010601/http://datalab.cs.pdx.edu/niagaraST/NEXMark/
> [6] https://beam.apache.org/documentation/sdks/java/testing/nexmark/
> [7] https://github.com/apache/beam/tree/master/sdks/java/testing/nexmark
> [8] https://beam.apache.org/roadmap/portability/
> [9] https://spark.apache.org/
> [10] https://flink.apache.org/
--
This message was sent by Atlassian Jira
(v8.3.4#803005)