You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Stas Oskin <st...@gmail.com> on 2009/05/26 14:31:38 UTC

InputStream.open() efficiency

Hi.

I'm looking to find out, how the InputStream.open() + skip(), compares to
keeping a handle of InputStream() and just seeking the position.

Has anyone compared these approaches, and can advice on their speed?

Regards.

Re: InputStream.open() efficiency

Posted by Stas Oskin <st...@gmail.com>.
Hi.

Thanks for the advice.

Regards.

2009/5/26 Raghu Angadi <ra...@yahoo-inc.com>

> Stas Oskin wrote:
>
>> Hi.
>>
>> Thanks for the answer.
>>
>> Would up to 5 minute of handlers cause any issues?
>>
>
> 5 min should not cause any issues..
>
>  And same about writing?
>>
>
> writing is not affected by the couple of issues I mentioned. Writing over a
> long time should work as well as writing over shorter time.
>
> Raghu.
>
>
>  Regards.
>>
>> 2009/5/26 Raghu Angadi <ra...@yahoo-inc.com>
>>
>>  'in.seek(); in.read()' is certainly better than,
>>> 'in = fs.open(); in.seek(); in.read()'
>>>
>>> The difference is is exactly one open() call. So you would save an RPC to
>>> NameNode.
>>>
>>> There are couple of issues that affect apps that keep the handlers open
>>> very long time (many hours to days).. but those will be fixed soon.
>>>
>>> Raghu.
>>>
>>>
>>> Stas Oskin wrote:
>>>
>>>  Hi.
>>>>
>>>> I'm looking to find out, how the InputStream.open() + skip(), compares
>>>> to
>>>> keeping a handle of InputStream() and just seeking the position.
>>>>
>>>> Has anyone compared these approaches, and can advice on their speed?
>>>>
>>>> Regards.
>>>>
>>>>
>>>>
>>
>

Re: InputStream.open() efficiency

Posted by Raghu Angadi <ra...@yahoo-inc.com>.
Stas Oskin wrote:
> Hi.
> 
> Thanks for the answer.
> 
> Would up to 5 minute of handlers cause any issues?

5 min should not cause any issues..

> And same about writing?

writing is not affected by the couple of issues I mentioned. Writing 
over a long time should work as well as writing over shorter time.

Raghu.

> Regards.
> 
> 2009/5/26 Raghu Angadi <ra...@yahoo-inc.com>
> 
>> 'in.seek(); in.read()' is certainly better than,
>> 'in = fs.open(); in.seek(); in.read()'
>>
>> The difference is is exactly one open() call. So you would save an RPC to
>> NameNode.
>>
>> There are couple of issues that affect apps that keep the handlers open
>> very long time (many hours to days).. but those will be fixed soon.
>>
>> Raghu.
>>
>>
>> Stas Oskin wrote:
>>
>>> Hi.
>>>
>>> I'm looking to find out, how the InputStream.open() + skip(), compares to
>>> keeping a handle of InputStream() and just seeking the position.
>>>
>>> Has anyone compared these approaches, and can advice on their speed?
>>>
>>> Regards.
>>>
>>>
> 


Re: InputStream.open() efficiency

Posted by Stas Oskin <st...@gmail.com>.
Hi.

Thanks for the answer.

Would up to 5 minute of handlers cause any issues?

And same about writing?

Regards.

2009/5/26 Raghu Angadi <ra...@yahoo-inc.com>

>
> 'in.seek(); in.read()' is certainly better than,
> 'in = fs.open(); in.seek(); in.read()'
>
> The difference is is exactly one open() call. So you would save an RPC to
> NameNode.
>
> There are couple of issues that affect apps that keep the handlers open
> very long time (many hours to days).. but those will be fixed soon.
>
> Raghu.
>
>
> Stas Oskin wrote:
>
>> Hi.
>>
>> I'm looking to find out, how the InputStream.open() + skip(), compares to
>> keeping a handle of InputStream() and just seeking the position.
>>
>> Has anyone compared these approaches, and can advice on their speed?
>>
>> Regards.
>>
>>
>

Re: InputStream.open() efficiency

Posted by Raghu Angadi <ra...@yahoo-inc.com>.
'in.seek(); in.read()' is certainly better than,
'in = fs.open(); in.seek(); in.read()'

The difference is is exactly one open() call. So you would save an RPC 
to NameNode.

There are couple of issues that affect apps that keep the handlers open 
very long time (many hours to days).. but those will be fixed soon.

Raghu.

Stas Oskin wrote:
> Hi.
> 
> I'm looking to find out, how the InputStream.open() + skip(), compares to
> keeping a handle of InputStream() and just seeking the position.
> 
> Has anyone compared these approaches, and can advice on their speed?
> 
> Regards.
>