incubator-cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pprun <pzgyu...@gmail.com>
Subject inconsistent implementation of 'cumulative distribution function' for Exponential Distribution
Date Sat, 02 Apr 2011 12:12:24 GMT
Hi Cassandra DEVs,

I just found there are two implementations of 'cumulative distribution
function' for Exponential Distribution and there are inconsistent :

*FailureDetector*
org.apache.cassandra.gms.ArrivalWindow.p(double)
    double p(double t)
    {
        double mean = mean();
        double exponent = (-1)*(t)/mean;
        return *Math.pow(Math.E, exponent)*;
    }

*DynamicEndpointSnitch*
org.apache.cassandra.locator.AdaptiveLatencyTracker.p(double)
    double p(double t)
    {
        double mean = mean();
        double exponent = (-1) * (t) / mean;
        return *1 - Math.pow( Math.E, exponent);*
    }

According to the  Exponential Distribution cumulative distribution function
definition<http://en.wikipedia.org/wiki/Exponential_distribution#Cumulative_distribution_function>,
the later one is clear, however,
Could you please explain a bit for the implementation of FailureDetector?

Thanks*,
*pzgyuanf*
*

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message