Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Refactors the final flat map a bit #539

Merged
merged 8 commits into from Aug 29, 2014
Merged

Refactors the final flat map a bit #539

merged 8 commits into from Aug 29, 2014

Conversation

ianoc
Copy link
Collaborator

@ianoc ianoc commented Aug 22, 2014

Made some lists Seq's since we don't rely on it being a list.

Fix a case where the hash code could be less than zero for the batching, would cause the space to double in size. Not a correctness bug thankfully, but good to know how settings are effecting things.

I've pulled the batching with this hash outside the aggregator, which lets the aggregator use sumOption to much better effect. Also now the aggregator will get better visibility on things. Does not seem to have impacted any performance negatively in tests.

Added a rate limiter option, which allows a slow start + min/max throughputs per second for the bolt. This is useful since we lack back pressure on storm to be able to stick a cap on the flat map throughput.

@@ -73,7 +75,7 @@ class Summer[Key, Value: Semigroup, Event, S, D, RC](
lazy val storePromise = Promise[Mergeable[Key, Value]]
lazy val store = Await.result(storePromise)

lazy val sSummer: AsyncSummer[(Key, (List[InputState[S]], Value)), Map[Key, (List[InputState[S]], Value)]] = summerBuilder.getSummer[Key, (List[InputState[S]], Value)](implicitly[Semigroup[(List[InputState[S]], Value)]])
lazy val sSummer: AsyncSummer[(Key, (Seq[InputState[S]], Value)), Map[Key, (Seq[InputState[S]], Value)]] = summerBuilder.getSummer[Key, (Seq[InputState[S]], Value)](implicitly[Semigroup[(Seq[InputState[S]], Value)]])
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this not be CMap?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, we unpack the CMap on entry to the summer. So they are gone by this point.

@ianoc
Copy link
Collaborator Author

ianoc commented Aug 29, 2014

bump on this, think i've done all the comments?

@egonina
Copy link
Contributor

egonina commented Aug 29, 2014

LGTM

ianoc added a commit that referenced this pull request Aug 29, 2014
Refactors the final flat map a bit
@ianoc ianoc merged commit 27340eb into develop Aug 29, 2014
@ianoc ianoc deleted the refactorFFM branch August 29, 2014 16:56
snoble pushed a commit to snoble/summingbird that referenced this pull request Sep 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants