incubator-cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Ellis <jbel...@gmail.com>
Subject Re: Minor point on FailureDetector
Date Thu, 15 Jul 2010 22:07:44 GMT
You're right.  Committed the simplification.

On Tue, Jul 13, 2010 at 7:05 PM, Masood Mortazavi
<masoodmortazavi@gmail.com> wrote:
> In FailureDetector, in ArrivalWindow, in "double p(double t)",
>
> is
>
>        return 1 - ( 1 - Math.pow(Math.E, exponent) );
>
> really needed, instead of
>
>        return Math.pow(Math.E, exponent) ;
>
> I believe the integral of the the Exponential Distribution from "t" to
> infinity leads to the latter value.
>
> While most Java compilers are probably smart enough to take care of the
> redundant subtractions, there's no explanatory value I see in the former
> form. I just ran into this as I was reviewing the accrual failure detector
> code.
>
> - m .
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com

Mime
View raw message