Github user ChengXiangLi commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1110#discussion_r39002786
  
    --- Diff: 
flink-java/src/main/java/org/apache/flink/api/java/sampling/PoissonSampler.java 
---
    @@ -28,11 +29,16 @@
      *
      * @param <T> The type of sample.
      * @see <a 
href="https://en.wikipedia.org/wiki/Poisson_distribution";>https://en.wikipedia.org/wiki/Poisson_distribution</a>
    + * @see <a 
href="http://erikerlandson.github.io/blog/2014/09/11/faster-random-samples-with-gap-sampling/";>Gap
 Sampling</a>
      */
     public class PoissonSampler<T> extends RandomSampler<T> {
        
        private PoissonDistribution poissonDistribution;
        private final double fraction;
    +   private final Random random = new Random();
    --- End diff --
    
    The "random" instance should better to be initialized in constructor method 
and use the seed parameter while available.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to