You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by aaron morton <aa...@thelastpickle.com> on 2010/10/20 10:48:28 UTC

/var/tmp in FailureDetector

I was reading through some code and noticed the following in FailureDetector.dumpInterArrivealTimes()

            FileOutputStream fos = new FileOutputStream("/var/tmp/output-" + System.currentTimeMillis() + ".dat", true);

If this is meant to be cross platform I'm happy to create a bug and change it to use File.createTempFile() . 

Also I could not find any use of the  dumpInterArrivalTimes(InetAddress ep) overload. Anyone know if it should be kept?

thanks
Aaron


Re: /var/tmp in FailureDetector

Posted by Aaron Morton <aa...@thelastpickle.com>.
To quick for me :)
Aaron


On 21 Oct 2010, at 17:52, Jonathan Ellis <jb...@gmail.com> wrote:

> Done in r1025822
> 
> On Wed, Oct 20, 2010 at 12:54 PM, Gary Dusbabek <gd...@gmail.com> wrote:
>> You're right!  It looks like dead code that should be removed.
>> 
>> Gary.
>> 
>> On Wed, Oct 20, 2010 at 12:50, aaron morton <aa...@thelastpickle.com> wrote:
>>> I should have mentioned the FailureDetectorMBean only has the parameterless dumpInterArrivalTimes().
>>> 
>>> The overload that takes InetAddress is not available through JMX.
>>> 
>>> A
>>> On 21 Oct 2010, at 01:55, Gary Dusbabek wrote:
>>> 
>>>> Yes, we should generate it in the right temp directory.  That method
>>>> is an implementation of an interface method (FailureDetectorMBean),
>>>> meant to be invoked by JMX, which is why no other code calls it.
>>>> 
>>>> Gary.
>>>> 
>>>> On Wed, Oct 20, 2010 at 03:48, aaron morton <aa...@thelastpickle.com> wrote:
>>>>> I was reading through some code and noticed the following in FailureDetector.dumpInterArrivealTimes()
>>>>> 
>>>>>            FileOutputStream fos = new FileOutputStream("/var/tmp/output-" + System.currentTimeMillis() + ".dat", true);
>>>>> 
>>>>> If this is meant to be cross platform I'm happy to create a bug and change it to use File.createTempFile() .
>>>>> 
>>>>> Also I could not find any use of the  dumpInterArrivalTimes(InetAddress ep) overload. Anyone know if it should be kept?
>>>>> 
>>>>> thanks
>>>>> Aaron
>>>>> 
>>>>> 
>>> 
>>> 
>> 
> 
> 
> 
> -- 
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com

Re: /var/tmp in FailureDetector

Posted by Jonathan Ellis <jb...@gmail.com>.
Done in r1025822

On Wed, Oct 20, 2010 at 12:54 PM, Gary Dusbabek <gd...@gmail.com> wrote:
> You're right!  It looks like dead code that should be removed.
>
> Gary.
>
> On Wed, Oct 20, 2010 at 12:50, aaron morton <aa...@thelastpickle.com> wrote:
>> I should have mentioned the FailureDetectorMBean only has the parameterless dumpInterArrivalTimes().
>>
>> The overload that takes InetAddress is not available through JMX.
>>
>> A
>> On 21 Oct 2010, at 01:55, Gary Dusbabek wrote:
>>
>>> Yes, we should generate it in the right temp directory.  That method
>>> is an implementation of an interface method (FailureDetectorMBean),
>>> meant to be invoked by JMX, which is why no other code calls it.
>>>
>>> Gary.
>>>
>>> On Wed, Oct 20, 2010 at 03:48, aaron morton <aa...@thelastpickle.com> wrote:
>>>> I was reading through some code and noticed the following in FailureDetector.dumpInterArrivealTimes()
>>>>
>>>>            FileOutputStream fos = new FileOutputStream("/var/tmp/output-" + System.currentTimeMillis() + ".dat", true);
>>>>
>>>> If this is meant to be cross platform I'm happy to create a bug and change it to use File.createTempFile() .
>>>>
>>>> Also I could not find any use of the  dumpInterArrivalTimes(InetAddress ep) overload. Anyone know if it should be kept?
>>>>
>>>> thanks
>>>> Aaron
>>>>
>>>>
>>
>>
>



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

Re: /var/tmp in FailureDetector

Posted by Gary Dusbabek <gd...@gmail.com>.
You're right!  It looks like dead code that should be removed.

Gary.

On Wed, Oct 20, 2010 at 12:50, aaron morton <aa...@thelastpickle.com> wrote:
> I should have mentioned the FailureDetectorMBean only has the parameterless dumpInterArrivalTimes().
>
> The overload that takes InetAddress is not available through JMX.
>
> A
> On 21 Oct 2010, at 01:55, Gary Dusbabek wrote:
>
>> Yes, we should generate it in the right temp directory.  That method
>> is an implementation of an interface method (FailureDetectorMBean),
>> meant to be invoked by JMX, which is why no other code calls it.
>>
>> Gary.
>>
>> On Wed, Oct 20, 2010 at 03:48, aaron morton <aa...@thelastpickle.com> wrote:
>>> I was reading through some code and noticed the following in FailureDetector.dumpInterArrivealTimes()
>>>
>>>            FileOutputStream fos = new FileOutputStream("/var/tmp/output-" + System.currentTimeMillis() + ".dat", true);
>>>
>>> If this is meant to be cross platform I'm happy to create a bug and change it to use File.createTempFile() .
>>>
>>> Also I could not find any use of the  dumpInterArrivalTimes(InetAddress ep) overload. Anyone know if it should be kept?
>>>
>>> thanks
>>> Aaron
>>>
>>>
>
>

Re: /var/tmp in FailureDetector

Posted by aaron morton <aa...@thelastpickle.com>.
I should have mentioned the FailureDetectorMBean only has the parameterless dumpInterArrivalTimes(). 

The overload that takes InetAddress is not available through JMX. 

A
On 21 Oct 2010, at 01:55, Gary Dusbabek wrote:

> Yes, we should generate it in the right temp directory.  That method
> is an implementation of an interface method (FailureDetectorMBean),
> meant to be invoked by JMX, which is why no other code calls it.
> 
> Gary.
> 
> On Wed, Oct 20, 2010 at 03:48, aaron morton <aa...@thelastpickle.com> wrote:
>> I was reading through some code and noticed the following in FailureDetector.dumpInterArrivealTimes()
>> 
>>            FileOutputStream fos = new FileOutputStream("/var/tmp/output-" + System.currentTimeMillis() + ".dat", true);
>> 
>> If this is meant to be cross platform I'm happy to create a bug and change it to use File.createTempFile() .
>> 
>> Also I could not find any use of the  dumpInterArrivalTimes(InetAddress ep) overload. Anyone know if it should be kept?
>> 
>> thanks
>> Aaron
>> 
>> 


Re: /var/tmp in FailureDetector

Posted by Gary Dusbabek <gd...@gmail.com>.
Yes, we should generate it in the right temp directory.  That method
is an implementation of an interface method (FailureDetectorMBean),
meant to be invoked by JMX, which is why no other code calls it.

Gary.

On Wed, Oct 20, 2010 at 03:48, aaron morton <aa...@thelastpickle.com> wrote:
> I was reading through some code and noticed the following in FailureDetector.dumpInterArrivealTimes()
>
>            FileOutputStream fos = new FileOutputStream("/var/tmp/output-" + System.currentTimeMillis() + ".dat", true);
>
> If this is meant to be cross platform I'm happy to create a bug and change it to use File.createTempFile() .
>
> Also I could not find any use of the  dumpInterArrivalTimes(InetAddress ep) overload. Anyone know if it should be kept?
>
> thanks
> Aaron
>
>