Skip to content

add sampling rate for theta sketch#8743

Closed
natsumehu wants to merge 4 commits intoapache:masterfrom
natsumehu:add_thetasketch_p_sampling
Closed

add sampling rate for theta sketch#8743
natsumehu wants to merge 4 commits intoapache:masterfrom
natsumehu:add_thetasketch_p_sampling

Conversation

@natsumehu
Copy link

@natsumehu natsumehu commented Oct 25, 2019

Fixes #8714.

Description

When dealing with highly partitioned/fragmented data, thetasketch module spent most of the time merging the sketches. It would also increase the size of the segments. We want to use the p sampling config of the sketch module to make it better. Setting the sampling to, say, p = 0.5, for all sketches, will automatically throw out 50% of all the data coming in to all the sketches. This would also potentially reduce the query time by sacrificing some accuracy.

We change the theta sketch module, just add another parameter of the constructor and use it to the merger.

Fixed the bug ...

Renamed the class ...

Added a forbidden-apis entry ...


This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths.
  • added integration tests.
  • been tested in a test Druid cluster.

Key changed/added classes in this PR
  • SketchAggregatorFactory

@stale
Copy link

stale bot commented Dec 25, 2019

This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time or discuss it on the dev@druid.apache.org list. Thank you for your contributions.

@stale stale bot added the stale label Dec 25, 2019
@stale
Copy link

stale bot commented Jan 22, 2020

This pull request/issue has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.

@stale stale bot closed this Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Theta Sketch upfront uniform sampling probability setting

1 participant