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

Move GapPolicy and resolveBucketValues() to static helper methods #9954

Conversation

polyfractal
Copy link
Contributor

Will allow reducers to share the same helper functionality without repeating code.

Since these seemed more like helpers than inherent traits of a Reducer (e.g. we could have non-time based reducers, or reducers that don't care about contiguous buckets), I put them into their own static class.

I imagine we'll need a NonContiguousBucketHelpers someday that offers similar resolveBucketValue(), but without the gap policy stuff?

@dakrone
Copy link
Member

dakrone commented Mar 2, 2015

@polyfractal can you add some javadocs to the methods and class?

@polyfractal
Copy link
Contributor Author

Oops, sure. Didn't think about it since the aggs 2.0 stuff is in such high flux. Will add some in a minute (and the new class needs apache headers too)

import java.util.List;


public class ContiguousBucketHelpers {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could probably just call this BucketHelpers instead of ContiguousBucketHelpers?

@colings86
Copy link
Contributor

@polyfractal left one super minor comment and I agree with @dakrone that we should have JavaDocs (sorry that was my fault for not putting them there to begin with) but otherwise looks great

Will allow many reducers to share the same helper functionality without repeating code.  Chose
to put these in static helpers instead of adding to Reducer base class.  I can imagine other reducers
that aren't time-based (or don't care about contiguous buckets), which would make things like
gap policy useless.

Since these seemed more like helpers than inherent traits of a Reducer, they went into their own
static class.
@polyfractal polyfractal force-pushed the feature/aggs_2_0_gapdryrefactor branch from 9bab4c7 to ddbeaff Compare March 5, 2015 14:37
@colings86
Copy link
Contributor

LGTM

polyfractal added a commit that referenced this pull request Mar 5, 2015
Will allow many reducers to share the same helper functionality without repeating code.  Chose
to put these in static helpers instead of adding to Reducer base class.  I can imagine other reducers
that aren't time-based (or don't care about contiguous buckets), which would make things like
gap policy useless.

Since these seemed more like helpers than inherent traits of a Reducer, they went into their own
static class.

Closes #9954
@polyfractal polyfractal closed this Mar 5, 2015
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