You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by "dong.yajun" <do...@gmail.com> on 2013/04/11 15:48:37 UTC

(info) Abort the seek op in SSTableIdentityIterator class.

Hello,

I read the source code of SSTableIdentityIterator with v-1.0.9, and I
thought the following code is not necessary, did I miss anything?

                RandomAccessReader file = (RandomAccessReader) input;
                file.seek(this.dataStart);

here, the value of dataStart is assigned in SSTableScanner:

                 long dataStart = file.getFilePointer();

any suggestion abort this issue? thanks.

Best,

-- 
*Rick Dong*

Re: (info) Abort the seek op in SSTableIdentityIterator class.

Posted by aaron morton <aa...@thelastpickle.com>.
When created by the SSTableScanner the dataStart passed in is the existing file position so it may not be necessary. But it may be sane to do it and the seek() call may not result in disk reads.

Cheers
  
-----------------
Aaron Morton
Freelance Cassandra Consultant
New Zealand

@aaronmorton
http://www.thelastpickle.com

On 12/04/2013, at 1:48 AM, dong.yajun <do...@gmail.com> wrote:

> Hello, 
> 
> I read the source code of SSTableIdentityIterator with v-1.0.9, and I thought the following code is not necessary, did I miss anything? 
> 
>                 RandomAccessReader file = (RandomAccessReader) input;
>                 file.seek(this.dataStart); 
> 
> here, the value of dataStart is assigned in SSTableScanner: 
> 
>                  long dataStart = file.getFilePointer();
> 
> any suggestion abort this issue? thanks. 
> 
> Best, 
> 
> -- 
> Rick Dong
>