[
https://issues.apache.org/jira/browse/BEAM-6165?focusedWorklogId=171730&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-171730
]
ASF GitHub Bot logged work on BEAM-6165:
----------------------------------------
Author: ASF GitHub Bot
Created on: 03/Dec/18 22:22
Start Date: 03/Dec/18 22:22
Worklog Time Spent: 10m
Work Description: ryan-williams commented on a change in pull request
#7183: [BEAM-6165] send metrics to Flink in portable Flink runner
URL: https://github.com/apache/beam/pull/7183#discussion_r238461420
##########
File path:
runners/flink/src/main/java/org/apache/beam/runners/flink/metrics/FileReporter.java
##########
@@ -0,0 +1,74 @@
+/*
+ * 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.metrics;
+
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.PrintStream;
+import org.apache.flink.metrics.Metric;
+import org.apache.flink.metrics.MetricConfig;
+import org.apache.flink.metrics.MetricGroup;
+import org.apache.flink.metrics.reporter.AbstractReporter;
+
+/**
+ * Flink {@link org.apache.flink.metrics.reporter.MetricReporter metrics
reporter} for writing
+ * metrics to a file (specified via the "metrics.reporter.test.file" config
key).
+ */
+public class FileReporter extends AbstractReporter {
Review comment:
I originally gave it a name like that, however I talked myself in to that
this is a potentially more general-purpose abstraction, and it is Flink
specific, so that this (`main`, not `test`) package is an OK place for it.
If it was `TestFileReporter` then I'd feel obliged to put it in the test
package, at which point the build plumbing to start a job-server in
`flink_runner_test.py` that has the :beam-runners-flink` `-tests.jar` on the
classpath would become more convoluted, so that was an added incentive to view
this as not a "tests only" thing 😀
lmk what you think!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 171730)
Time Spent: 2h 40m (was: 2.5h)
> Send metrics to Flink in portable Flink runner
> ----------------------------------------------
>
> Key: BEAM-6165
> URL: https://issues.apache.org/jira/browse/BEAM-6165
> Project: Beam
> Issue Type: Improvement
> Components: runner-flink
> Affects Versions: 2.8.0
> Reporter: Ryan Williams
> Assignee: Ryan Williams
> Priority: Major
> Labels: metrics, portability, portability-flink
> Time Spent: 2h 40m
> Remaining Estimate: 0h
>
> Metrics are sent from the fn harness to runner in the Python SDK (and likely
> Java soon), but the portable Flink runner doesn't pass them on to Flink,
> which it should, so that users can see them in e.g. the Flink UI or via any
> Flink metrics reporters.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)