GitHub user gallenvara opened a pull request:

    https://github.com/apache/flink/pull/1110

    [FLINK-2533] [core] Gap based random sample optimization.

    For random sampler with fraction, like BernoulliSampler and PoissonSampler, 
Gap based random sampler could exploit O(np) sample implementation instead of 
previous O(n) sample implementation, it should perform better while sample 
fraction is very small.When deal with large fraction, it's better to use 
previous sample implementation. So we add a threshold to control the sampling 
method according to the fraction.(threshold_Bernoulli = 0.33, threshold_Poisson 
= 0.4)
    
![bernoullisampler](https://cloud.githubusercontent.com/assets/12931563/9751893/fd4195a2-56dc-11e5-8937-30ebfa927960.PNG)
    
![poissonsampler](https://cloud.githubusercontent.com/assets/12931563/9751894/fd4c35a2-56dc-11e5-9d71-e7b62e5dcc05.PNG)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gallenvara/flink gap_sampling

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/1110.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1110
    
----
commit b4b431471736cd32a50b49cc9e91e038a4387808
Author: gallenvara <gallenv...@126.com>
Date:   2015-09-07T06:55:11Z

    [FLINK-2533] [core] Gap based random sample optimization.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to