[
https://issues.apache.org/jira/browse/BEAM-6161?focusedWorklogId=177193&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-177193
]
ASF GitHub Bot logged work on BEAM-6161:
----------------------------------------
Author: ASF GitHub Bot
Created on: 19/Dec/18 21:19
Start Date: 19/Dec/18 21:19
Worklog Time Spent: 10m
Work Description: Ardagan commented on a change in pull request #7272:
[BEAM-6161] Introduce PCollectionConsumerRegistry and add ElementCoun…
URL: https://github.com/apache/beam/pull/7272#discussion_r243076400
##########
File path:
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/PCollectionConsumerRegistry.java
##########
@@ -33,32 +36,65 @@
public class PCollectionConsumerRegistry {
private ListMultimap<String, FnDataReceiver<WindowedValue<?>>>
pCollectionIdsToConsumers;
+ private Map<String, ElementCountFnDataReceiver>
pCollectionIdsToWrappedConsumer;
public PCollectionConsumerRegistry() {
pCollectionIdsToConsumers = ArrayListMultimap.create();
+ pCollectionIdsToWrappedConsumer = new HashMap<String,
ElementCountFnDataReceiver>();
}
- public <T> FnDataReceiver<WindowedValue<T>> registerAndWrap(
- String pCollectionId, FnDataReceiver<WindowedValue<T>> consumer) {
- // TODO(ajamato): Test multiple consumers of the same pcollection before
merging to master.
- FnDataReceiver<WindowedValue<T>> wrappedReceiver =
- new ElementCountFnDataReceiver<T>(consumer, pCollectionId);
- pCollectionIdsToConsumers.put(pCollectionId, (FnDataReceiver)
wrappedReceiver);
- return wrappedReceiver;
+ public <T> void register(String pCollectionId,
FnDataReceiver<WindowedValue<T>> consumer) {
Review comment:
Add documentation for method.
Note the order in which this method should be called regards
getMultiplexingConsumer.
----------------------------------------------------------------
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: 177193)
> Add ElementCount MonitoringInfos for the Java SDK
> -------------------------------------------------
>
> Key: BEAM-6161
> URL: https://issues.apache.org/jira/browse/BEAM-6161
> Project: Beam
> Issue Type: New Feature
> Components: java-fn-execution, sdk-java-harness
> Reporter: Alex Amato
> Assignee: Alex Amato
> Priority: Major
> Time Spent: 2h 50m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)