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

    https://github.com/apache/storm/pull/1249#discussion_r57911963
  
    --- Diff: storm-core/src/jvm/org/apache/storm/utils/ConfigUtils.java ---
    @@ -135,7 +137,28 @@ public static int samplingRate(Map conf) {
             throw new IllegalArgumentException("Illegal 
topology.stats.sample.rate in conf: " + rate);
         }
     
    -    // public static mkStatsSampler // depends on Utils.evenSampler() 
TODO, this is sth we need to do after util
    +    public static Callable<Boolean> evenSampler(final int samplingFreq) {
    +        final int start = 0;
    +        final Random random = new Random();
    +        final MutableInt curr = new MutableInt(-1);
    +        final MutableInt target = new 
MutableInt(random.nextInt(samplingFreq));
    --- End diff --
    
    will do. Out of Curiosity, are the calls to emitSampler object done in 
single thread?


---
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