-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BEAM 775] Removal of Aggregator class. Also removal from comments. #2851
Conversation
@@ -51,7 +51,7 @@ | |||
* | |||
* <p>Basic concepts, also in the MinimalWordCount, WordCount, and DebuggingWordCount examples: | |||
* Reading text files; counting a PCollection; writing to GCS; executing a Pipeline both locally | |||
* and using a selected runner; defining DoFns; creating a custom aggregator; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not replace with a Metric
? Or was the aggregator never there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has not been there for a while (at least since last July https://github.com/pabloem/incubator-beam/blob/ca9e337203208c7c5876f0710fb3a45430a5b3a8/examples/java/src/main/java/org/apache/beam/examples/WindowedWordCount.java)
@@ -44,19 +44,6 @@ | |||
* PCollection<Long> latestValues = sessioned.apply(Latest.<Long>globally()); | |||
* }</pre> | |||
* | |||
* <p>Example 2: track a latest computed value in an aggregator: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop the 1
from Example 1
above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -26,9 +26,6 @@ | |||
/** | |||
* Annotation to mark {@code DoFns} as an internal component of the Beam SDK. | |||
* | |||
* <p>Currently, the only effect of this is to mark any aggregators reported by an annotated | |||
* {@code DoFn} as a system counter (as opposed to a user counter). | |||
* | |||
* <p>This is internal to the Beam SDK. | |||
*/ | |||
@Documented |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If that was the only use, should we just drop this entirely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's used in several places to annotate DoFns. I figured there may be a reason that is not only related to aggregators.
@@ -166,12 +166,6 @@ public void testExtractOutput() { | |||
} | |||
|
|||
@Test | |||
public void testExtractOutputDefaultAggregator() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is testing the CombineFn
-- and should just be renamed from Aggregator
to Accumulator
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Run Dataflow ValidatesRunner |
To be merged after the worker is rebuilt.