Return-Path: Delivered-To: apmail-incubator-cassandra-dev-archive@minotaur.apache.org Received: (qmail 2749 invoked from network); 20 Mar 2009 15:37:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Mar 2009 15:37:51 -0000 Received: (qmail 58589 invoked by uid 500); 20 Mar 2009 15:37:51 -0000 Delivered-To: apmail-incubator-cassandra-dev-archive@incubator.apache.org Received: (qmail 58575 invoked by uid 500); 20 Mar 2009 15:37:51 -0000 Mailing-List: contact cassandra-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-dev@incubator.apache.org Delivered-To: mailing list cassandra-dev@incubator.apache.org Received: (qmail 58532 invoked by uid 99); 20 Mar 2009 15:37:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Mar 2009 08:37:51 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jbellis@gmail.com designates 209.85.217.170 as permitted sender) Received: from [209.85.217.170] (HELO mail-gx0-f170.google.com) (209.85.217.170) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Mar 2009 15:37:43 +0000 Received: by gxk18 with SMTP id 18so3150698gxk.12 for ; Fri, 20 Mar 2009 08:37:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=+t/n3FFlfT3ZKIK/J5Pn5xBxc/nhdva65PHK+Xpzr9c=; b=edZjZ1Ff9v/fBXdxwbX8Crmyu6Fmz4bI3pmsxWGa4QQQuzvQBDvLQBEW0/B1S/wbHY iGN4r/KJCYRr1349+gfoYGuXzmKkco9esBpu/TQnOXgfAMlPlvA6a9UEomPv8qTOZPsh wbfZxHhrVyy7pU++d6rdWEwx2YD1mP6hvykjg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=w/27QLKL5GmGebv/kGBFhxzMMcGsHeX4dXSqlbq7riRU1w45yCxpvwAMISkUnd4u0n USDPBVYeMiK/FWRkNkdjzTOSPIzxVw/TP+hfejUBW0cBy9mUiA0I1zPzMtcsF8jjpeZa LgHlARmVgb6QFFn8Yo9qKhV3K6v6uLhOZGvso= MIME-Version: 1.0 Received: by 10.231.19.70 with SMTP id z6mr1172165iba.32.1237563441472; Fri, 20 Mar 2009 08:37:21 -0700 (PDT) In-Reply-To: References: Date: Fri, 20 Mar 2009 09:37:21 -0600 Message-ID: Subject: Re: svn commit: r756155 From: Jonathan Ellis To: cassandra-dev@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Ah, I see, the problem was that you can call seek between the writeAtMost calls, which will do the wrong thing if dirty_ is not accurate. So, CASSANDRA-7 should be marked closed now. -Jonathan On Fri, Mar 20, 2009 at 9:16 AM, Sandeep Tata wrot= e: > It is an equivalent fix -- you can either set the dirty_ bit inside > writeAtMost after the arraycopy like I did in my patch, or set it > after calling writeAtMost here. > > I thought of doing this, but then, everytime you use writeAtMost you > have to remember to set this bit -- I think it is better to do this > inside writeAtMost. > > As far as I can see, the rest of the changes are comment deletions and > indentation changes, right? > > > On Fri, Mar 20, 2009 at 7:27 AM, Jonathan Ellis wrote= : >> it's actually not just indentation, it's brace placement -- from >> >> =A0 =A0 =A0 =A0while (len > 0) >> =A0 =A0 =A0 =A0{ >> =A0 =A0 =A0 =A0 =A0 =A0int n =3D this.writeAtMost(b, off, len); >> =A0 =A0 =A0 =A0 =A0 =A0off +=3D n; >> =A0 =A0 =A0 =A0 =A0 =A0len -=3D n; >> =A0 =A0 =A0 =A0} >> =A0 =A0 =A0 =A0this.dirty_ =3D true; >> >> to >> >> =A0 =A0 =A0 =A0while (len > 0) >> =A0 =A0 =A0 =A0{ >> =A0 =A0 =A0 =A0 =A0 =A0int n =3D this.writeAtMost(b, off, len); >> =A0 =A0 =A0 =A0 =A0 =A0off +=3D n; >> =A0 =A0 =A0 =A0 =A0 =A0len -=3D n; >> =A0 =A0 =A0 =A0 =A0 =A0this.dirty_ =3D true; >> =A0 =A0 =A0 =A0} >> >> which is more correct if an empty byte[] is passed in (it won't set dirt= y_). >> >> CASSANDRA-7 was not addressed that I could see. >> >> On Fri, Mar 20, 2009 at 1:11 AM, Sandeep Tata w= rote: >>> Folks, >>> >>> It is easier for the community to follow changes to the code if we use >>> JIRAs and understand what bugs/features each of the patches address >>> instead of simply committing changes. >>> >>> Does this patch address any issues other than CASSANDRA-7 >>> (https://issues.apache.org/jira/browse/CASSANDRA-7) and the patch >>> there? I only see formatting changes otherwise... >>> >>> In general, it is not good practice to mix formatting changes >>> (indentation) along with critical code changes. Keeping them separate >>> makes it easier for the community to understand the effect of each >>> patch. I understand this is a young open source project, and we're all >>> learning -- but simple things like this can really help other >>> contributors keep track of the code as it evolves. >>> >>> Sandeep >>> >>> >>> On Thu, Mar 19, 2009 at 12:48 PM, =A0 wrote: >>>> Author: alakshman >>>> Date: Thu Mar 19 19:48:21 2009 >>>> New Revision: 756155 >>>> >>>> URL: http://svn.apache.org/viewvc?rev=3D756155&view=3Drev >>>> Log: >>>> Fixed some bugs that resulted from moving sources over. >>>> >>>> Modified: >>>> =A0 =A0incubator/cassandra/trunk/src/org/apache/cassandra/io/AIORandom= AccessFile.java >>>> =A0 =A0incubator/cassandra/trunk/src/org/apache/cassandra/io/BufferedR= andomAccessFile.java >>>> =A0 =A0incubator/cassandra/trunk/src/org/apache/cassandra/io/ChecksumR= andomAccessFile.java >>>> =A0 =A0incubator/cassandra/trunk/src/org/apache/cassandra/io/SSTable.j= ava >>>> =A0 =A0incubator/cassandra/trunk/src/org/apache/cassandra/io/SequenceF= ile.java >>>> >>>> Modified: incubator/cassandra/trunk/src/org/apache/cassandra/io/AIORan= domAccessFile.java >>>> URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/ap= ache/cassandra/io/AIORandomAccessFile.java?rev=3D756155&r1=3D756154&r2=3D75= 6155&view=3Ddiff >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>> --- incubator/cassandra/trunk/src/org/apache/cassandra/io/AIORandomAcc= essFile.java (original) >>>> +++ incubator/cassandra/trunk/src/org/apache/cassandra/io/AIORandomAcc= essFile.java Thu Mar 19 19:48:21 2009 >>>> @@ -656,50 +656,6 @@ >>>> =A0 =A0 =A0 =A0 this.curr_ +=3D len; >>>> =A0 =A0 =A0 =A0 return len; >>>> =A0 =A0 } >>>> - >>>> - =A0 =A0public static void main(String[] args) throws Throwable >>>> - =A0 =A0{ >>>> - =A0 =A0 =A0 =A0/* >>>> - =A0 =A0 =A0 =A0int i =3D 0; >>>> - =A0 =A0 =A0 =A0try >>>> - =A0 =A0 =A0 =A0{ >>>> - =A0 =A0 =A0 =A0 =A0 =A0RandomAccessFile aRaf2 =3D new AIORandomAcces= sFile( new File("/var/cassandra/test.dat"), 64*1024); >>>> - =A0 =A0 =A0 =A0 =A0 =A0aRaf2.seek(0L); >>>> - =A0 =A0 =A0 =A0 =A0 =A0while ( i < 10000 ) >>>> - =A0 =A0 =A0 =A0 =A0 =A0{ >>>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0aRaf2.writeInt(32); >>>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0aRaf2.writeUTF("Avinash Lakshman"); >>>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0++i; >>>> - =A0 =A0 =A0 =A0 =A0 =A0} >>>> - =A0 =A0 =A0 =A0 =A0 =A0aRaf2.close(); >>>> - =A0 =A0 =A0 =A0} >>>> - =A0 =A0 =A0 =A0catch( IOException ex ) >>>> - =A0 =A0 =A0 =A0{ >>>> - =A0 =A0 =A0 =A0 =A0 =A0ex.printStackTrace(); >>>> - =A0 =A0 =A0 =A0} >>>> - =A0 =A0 =A0 =A0*/ >>>> - =A0 =A0 =A0 =A0/* >>>> - =A0 =A0 =A0 =A0int j =3D 0; >>>> - =A0 =A0 =A0 =A0try >>>> - =A0 =A0 =A0 =A0{ >>>> - =A0 =A0 =A0 =A0 =A0 =A0RandomAccessFile aRaf2 =3D new AIORandomAcces= sFile( new File("/var/cassandra/test.dat") ); >>>> - =A0 =A0 =A0 =A0 =A0 =A0while ( j < 10 ) >>>> - =A0 =A0 =A0 =A0 =A0 =A0{ >>>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0System.out.println( aRaf2.readInt() )= ; >>>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0System.out.println( aRaf2.readUTF() )= ; >>>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0++j; >>>> - =A0 =A0 =A0 =A0 =A0 =A0} >>>> - =A0 =A0 =A0 =A0 =A0 =A0aRaf2.close(); >>>> - =A0 =A0 =A0 =A0} >>>> - =A0 =A0 =A0 =A0catch( IOException ex ) >>>> - =A0 =A0 =A0 =A0{ >>>> - =A0 =A0 =A0 =A0 =A0 =A0ex.printStackTrace(); >>>> - =A0 =A0 =A0 =A0} >>>> - =A0 =A0 =A0 =A0*/ >>>> - >>>> - =A0 =A0 =A0 =A0ExecutorService es =3D new ContinuationsExecutor(1, 1= , Integer.MAX_VALUE, TimeUnit.SECONDS, new LinkedBlockingQueue() = ); >>>> - =A0 =A0 =A0 =A0es.execute(new ReadImpl()); >>>> - =A0 =A0} >>>> =A0} >>>> >>>> =A0class ReadImpl implements Runnable >>>> >>>> Modified: incubator/cassandra/trunk/src/org/apache/cassandra/io/Buffer= edRandomAccessFile.java >>>> URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/ap= ache/cassandra/io/BufferedRandomAccessFile.java?rev=3D756155&r1=3D756154&r2= =3D756155&view=3Ddiff >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>> --- incubator/cassandra/trunk/src/org/apache/cassandra/io/BufferedRand= omAccessFile.java (original) >>>> +++ incubator/cassandra/trunk/src/org/apache/cassandra/io/BufferedRand= omAccessFile.java Thu Mar 19 19:48:21 2009 >>>> @@ -165,20 +165,20 @@ >>>> =A0 =A0 =A0* disk. If the file was created read-only, this method is a= no-op. >>>> =A0 =A0 =A0*/ >>>> =A0 =A0 public void flush() throws IOException >>>> - =A0 =A0{ >>>> + =A0 =A0{ >>>> =A0 =A0 =A0 =A0 this.flushBuffer(); >>>> =A0 =A0 } >>>> >>>> =A0 =A0 /* Flush any dirty bytes in the buffer to disk. */ >>>> =A0 =A0 private void flushBuffer() throws IOException >>>> - =A0 =A0{ >>>> + =A0 =A0{ >>>> =A0 =A0 =A0 =A0 if (this.dirty_) >>>> =A0 =A0 =A0 =A0 { >>>> =A0 =A0 =A0 =A0 =A0 =A0 if (this.diskPos_ !=3D this.lo_) >>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 super.seek(this.lo_); >>>> =A0 =A0 =A0 =A0 =A0 =A0 int len =3D (int) (this.curr_ - this.lo_); >>>> =A0 =A0 =A0 =A0 =A0 =A0 super.write(this.buff_, 0, len); >>>> - =A0 =A0 =A0 =A0 =A0 =A0this.diskPos_ =3D this.curr_; >>>> + =A0 =A0 =A0 =A0 =A0 =A0this.diskPos_ =3D this.curr_; >>>> =A0 =A0 =A0 =A0 =A0 =A0 this.dirty_ =3D false; >>>> =A0 =A0 =A0 =A0 } >>>> =A0 =A0 } >>>> @@ -222,7 +222,7 @@ >>>> =A0 =A0 { >>>> =A0 =A0 =A0 =A0 if (pos >=3D this.hi_ || pos < this.lo_) >>>> =A0 =A0 =A0 =A0 { >>>> - =A0 =A0 =A0 =A0 =A0 =A0// seeking outside of current buffer -- flush= and read >>>> + =A0 =A0 =A0 =A0 =A0 =A0// seeking outside of current buffer -- flush= and read >>>> =A0 =A0 =A0 =A0 =A0 =A0 this.flushBuffer(); >>>> =A0 =A0 =A0 =A0 =A0 =A0 this.lo_ =3D pos & BuffMask_; // start at Buff= Sz boundary >>>> =A0 =A0 =A0 =A0 =A0 =A0 this.maxHi_ =3D this.lo_ + (long) this.buff_.l= ength; >>>> @@ -332,14 +332,14 @@ >>>> =A0 =A0 } >>>> >>>> =A0 =A0 public void write(byte[] b, int off, int len) throws IOExcepti= on >>>> - =A0 =A0{ >>>> + =A0 =A0{ >>>> =A0 =A0 =A0 =A0 while (len > 0) >>>> - =A0 =A0 =A0 =A0{ >>>> + =A0 =A0 =A0 =A0{ >>>> =A0 =A0 =A0 =A0 =A0 =A0 int n =3D this.writeAtMost(b, off, len); >>>> =A0 =A0 =A0 =A0 =A0 =A0 off +=3D n; >>>> =A0 =A0 =A0 =A0 =A0 =A0 len -=3D n; >>>> - =A0 =A0 =A0 =A0} >>>> - =A0 =A0 =A0 =A0this.dirty_ =3D true; >>>> + =A0 =A0 =A0 =A0 =A0 =A0this.dirty_ =3D true; >>>> + =A0 =A0 =A0 =A0} >>>> =A0 =A0 } >>>> >>>> =A0 =A0 /* >>>> @@ -347,7 +347,7 @@ >>>> =A0 =A0 =A0* the number of bytes written. >>>> =A0 =A0 =A0*/ >>>> =A0 =A0 private int writeAtMost(byte[] b, int off, int len) throws IOE= xception >>>> - =A0 =A0{ >>>> + =A0 =A0{ >>>> =A0 =A0 =A0 =A0 if (this.curr_ >=3D this.hi_) >>>> =A0 =A0 =A0 =A0 { >>>> =A0 =A0 =A0 =A0 =A0 =A0 if (this.hitEOF_ && this.hi_ < this.maxHi_) >>>> @@ -356,8 +356,8 @@ >>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 this.hi_ =3D this.maxHi_; >>>> =A0 =A0 =A0 =A0 =A0 =A0 } >>>> =A0 =A0 =A0 =A0 =A0 =A0 else >>>> - =A0 =A0 =A0 =A0 =A0 =A0{ >>>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0// slow path -- write current buffer;= read next one >>>> + =A0 =A0 =A0 =A0 =A0 =A0{ >>>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0// slow path -- write current buffer;= read next one >>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 this.seek(this.curr_); >>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (this.curr_ =3D=3D this.hi_) >>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 { >>>> >>>> Modified: incubator/cassandra/trunk/src/org/apache/cassandra/io/Checks= umRandomAccessFile.java >>>> URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/ap= ache/cassandra/io/ChecksumRandomAccessFile.java?rev=3D756155&r1=3D756154&r2= =3D756155&view=3Ddiff >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>> --- incubator/cassandra/trunk/src/org/apache/cassandra/io/ChecksumRand= omAccessFile.java (original) >>>> +++ incubator/cassandra/trunk/src/org/apache/cassandra/io/ChecksumRand= omAccessFile.java Thu Mar 19 19:48:21 2009 >>>> @@ -391,8 +391,8 @@ >>>> =A0 =A0 =A0 =A0 =A0 =A0 int n =3D this.writeAtMost(b, off, len); >>>> =A0 =A0 =A0 =A0 =A0 =A0 off +=3D n; >>>> =A0 =A0 =A0 =A0 =A0 =A0 len -=3D n; >>>> + =A0 =A0 =A0 =A0 =A0 =A0this.dirty_ =3D true; >>>> =A0 =A0 =A0 =A0 } >>>> - =A0 =A0 =A0 =A0this.dirty_ =3D true; >>>> =A0 =A0 } >>>> >>>> =A0 =A0 /* >>>> >>>> Modified: incubator/cassandra/trunk/src/org/apache/cassandra/io/SSTabl= e.java >>>> URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/ap= ache/cassandra/io/SSTable.java?rev=3D756155&r1=3D756154&r2=3D756155&view=3D= diff >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>> --- incubator/cassandra/trunk/src/org/apache/cassandra/io/SSTable.java= (original) >>>> +++ incubator/cassandra/trunk/src/org/apache/cassandra/io/SSTable.java= Thu Mar 19 19:48:21 2009 >>>> @@ -432,7 +432,8 @@ >>>> =A0 =A0 */ >>>> =A0 =A0 public SSTable(String directory, String filename, PartitionerT= ype pType) throws IOException >>>> =A0 =A0 { >>>> - =A0 =A0 =A0 =A0dataFile_ =3D directory + System.getProperty("file.se= parator") + filename + "-Data.db"; >>>> + =A0 =A0 =A0 =A0dataFile_ =3D directory + System.getProperty("file.se= parator") + filename + "-Data.db"; >>>> + =A0 =A0 =A0 =A0// dataWriter_ =3D SequenceFile.writer(dataFile_); >>>> =A0 =A0 =A0 =A0 dataWriter_ =3D SequenceFile.bufferedWriter(dataFile_,= 4*1024*1024); >>>> =A0 =A0 =A0 =A0 // dataWriter_ =3D SequenceFile.chksumWriter(dataFile_= , 4*1024*1024); >>>> =A0 =A0 =A0 =A0 SSTable.positionAfterFirstBlockIndex_ =3D dataWriter_.= getCurrentPosition(); >>>> @@ -747,22 +748,7 @@ >>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0SSTable.indexMetadataMap_.put(dataFile_= , keyPositionInfos); >>>> =A0 =A0 =A0 =A0 } >>>> >>>> - =A0 =A0 =A0 =A0keyPositionInfos.add(new KeyPositionInfo(blockIndex.f= irstKey(), position)); >>>> - =A0 =A0 =A0 =A0/* >>>> - =A0 =A0 =A0 =A0try >>>> - =A0 =A0 =A0 =A0{ >>>> - =A0 =A0 =A0 =A0 =A0 =A0keyPositionInfos.add(new KeyPositionInfo(bloc= kIndex.firstKey(), position)); >>>> - =A0 =A0 =A0 =A0} >>>> - =A0 =A0 =A0 =A0catch(Exception ex) >>>> - =A0 =A0 =A0 =A0{ >>>> - =A0 =A0 =A0 =A0 =A0 =A0Set keysInBlock =3D blockIndex.keySet= (); >>>> - =A0 =A0 =A0 =A0 =A0 =A0for( String keyInBlock : keysInBlock ) >>>> - =A0 =A0 =A0 =A0 =A0 =A0{ >>>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0logger_.warn("BLOCK KEY: " + keyInBlo= ck); >>>> - =A0 =A0 =A0 =A0 =A0 =A0} >>>> - =A0 =A0 =A0 =A0 =A0 =A0logger_.warn(LogUtil.throwableToString(ex)); >>>> - =A0 =A0 =A0 =A0} >>>> - =A0 =A0 =A0 =A0*/ >>>> + =A0 =A0 =A0 =A0keyPositionInfos.add(new KeyPositionInfo(blockIndex.f= irstKey(), position)); >>>> =A0 =A0 =A0 =A0 blockIndex.clear(); >>>> =A0 =A0 } >>>> >>>> @@ -1088,9 +1074,8 @@ >>>> =A0 =A0 =A0 =A0/* reset the buffer and serialize the Bloom Filter. */ >>>> =A0 =A0 =A0 =A0 DataOutputBuffer bufOut =3D new DataOutputBuffer(); >>>> =A0 =A0 =A0 =A0 BloomFilter.serializer().serialize(bf, bufOut); >>>> - =A0 =A0 =A0 =A0bufOut.close(); >>>> - >>>> =A0 =A0 =A0 =A0 close(bufOut.getData(), bufOut.getLength()); >>>> + =A0 =A0 =A0 =A0bufOut.close(); >>>> =A0 =A0 =A0 =A0 // byte[] bytes =3D new byte[bufOut.getLength()]; >>>> =A0 =A0 =A0 =A0 // System.arraycopy(bufOut.getData(), 0, bytes, 0, buf= Out.getLength()); >>>> =A0 =A0 =A0 =A0 // close(bytes, bytes.length); >>>> >>>> Modified: incubator/cassandra/trunk/src/org/apache/cassandra/io/Sequen= ceFile.java >>>> URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/ap= ache/cassandra/io/SequenceFile.java?rev=3D756155&r1=3D756154&r2=3D756155&vi= ew=3Ddiff >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>> --- incubator/cassandra/trunk/src/org/apache/cassandra/io/SequenceFile= .java (original) >>>> +++ incubator/cassandra/trunk/src/org/apache/cassandra/io/SequenceFile= .java Thu Mar 19 19:48:21 2009 >>>> @@ -974,7 +974,7 @@ >>>> >>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Coordinate coordinate = =3D columnRange.coordinate(); >>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* seek= to the correct offset to the data, and calculate the data size */ >>>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0file_.skipBytes((int)= coordinate.start_); >>>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0file_.skipBytes((int)= coordinate.start_); >>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 dataSize =3D (int)(coo= rdinate.end_ - coordinate.start_); >>>> >>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* >>>> >>>> >>>> >>> >> >