Skip to content
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

Adding scoped top-N CMS monoid #471

Merged
merged 1 commit into from Aug 5, 2015
Merged

Adding scoped top-N CMS monoid #471

merged 1 commit into from Aug 5, 2015

Conversation

jnievelt
Copy link
Contributor

Closes #468

A bit of refactoring out duplicate code. Leaving in TopPctCMSAggregator and TopNCMSAggregator so this should be binary compatible.

@johnynek
Copy link
Collaborator

can you merge with develop to get the sbt fix?

@ianoc ianoc closed this Aug 4, 2015
@ianoc
Copy link
Collaborator

ianoc commented Aug 4, 2015

Sorry my bad, git foo on cmd line broke stuff and closed all of these

@ianoc ianoc reopened this Aug 4, 2015
@@ -780,7 +821,7 @@ case class TopNLogic[K](heavyHittersN: Int) extends HeavyHittersLogic[K] {

require(heavyHittersN > 0, "heavyHittersN must be > 0")

override def purgeHeavyHitters(cms: CMS[K])(hitters: HeavyHitters[K]): HeavyHitters[K] = {
def purgeHeavyHitters(cms: CMS[K])(hitters: HeavyHitters[K]): HeavyHitters[K] = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you remove the override here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh I kinda love-hate the override keyword. It doesn't require that the base class/trait actually implements the method (i.e., so that we know if super is interesting). Then again, plain def doesn't require that the base class/trait declares the method either. I'll put it back.

@johnynek
Copy link
Collaborator

johnynek commented Aug 5, 2015

just a few minor comments, then let's merge.

johnynek added a commit that referenced this pull request Aug 5, 2015
Adding scoped top-N CMS monoid
@johnynek johnynek merged commit 7529e0c into develop Aug 5, 2015
@johnynek johnynek deleted the jnievelt-468 branch August 5, 2015 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants