[
https://issues.apache.org/jira/browse/BEAM-6138?focusedWorklogId=193151&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-193151
]
ASF GitHub Bot logged work on BEAM-6138:
----------------------------------------
Author: ASF GitHub Bot
Created on: 01/Feb/19 02:05
Start Date: 01/Feb/19 02:05
Worklog Time Spent: 10m
Work Description: ryan-williams commented on pull request #7624:
[BEAM-6138] Set the PTransform name on Java SDK User counters
URL: https://github.com/apache/beam/pull/7624#discussion_r252912109
##########
File path:
runners/java-fn-execution/src/test/java/org/apache/beam/runners/fnexecution/control/RemoteExecutionTest.java
##########
@@ -508,19 +510,33 @@ public void testMetrics() throws Exception {
ParDo.of(
new DoFn<byte[], String>() {
private boolean emitted = false;
+ Counter startCounter =
+ Metrics.counter(RemoteExecutionTest.class,
startUserCounterName);
+ @StartBundle
+ public void startBundle() throws InterruptedException {
+ startCounter.inc(10);
+ }
+
+ @SuppressWarnings("unused")
@ProcessElement
- public void process(ProcessContext ctxt) {
+ public void processElement(ProcessContext ctxt) {
// TODO(BEAM-6467): Impulse is producing two elements
instead of one.
// So add this check to only emit these three
elemenets.
if (!emitted) {
ctxt.output("zero");
ctxt.output("one");
ctxt.output("two");
- Metrics.counter(RemoteExecutionTest.class,
counterMetricName).inc();
+ Metrics.counter(RemoteExecutionTest.class,
processUserCounterName).inc();
}
emitted = true;
}
+
+ @DoFn.FinishBundle
+ public void finishBundle() throws InterruptedException {
+ // Thread.sleep(2000); // TODO smarter test without
sleeps???
Review comment:
should this still be here?
----------------------------------------------------------------
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: 193151)
Time Spent: 6.5h (was: 6h 20m)
> Add User Metric Support to Java SDK
> -----------------------------------
>
> Key: BEAM-6138
> URL: https://issues.apache.org/jira/browse/BEAM-6138
> Project: Beam
> Issue Type: New Feature
> Components: java-fn-execution
> Reporter: Alex Amato
> Assignee: Alex Amato
> Priority: Major
> Time Spent: 6.5h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)