From user-return-16507-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Thu May 5 23:45:25 2011 Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 05B572083 for ; Thu, 5 May 2011 23:45:25 +0000 (UTC) Received: (qmail 30964 invoked by uid 500); 5 May 2011 23:45:22 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 30937 invoked by uid 500); 5 May 2011 23:45:22 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 30929 invoked by uid 99); 5 May 2011 23:45:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 May 2011 23:45:22 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a79.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 May 2011 23:45:18 +0000 Received: from homiemail-a79.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a79.g.dreamhost.com (Postfix) with ESMTP id 7129B7D4059 for ; Thu, 5 May 2011 16:44:55 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; q=dns; s=thelastpickle.com; b=RK5mY1C+ml 5KeoIAcNIfNDm0IFoiscQfsA6osEySyl9+hEphvKtXChFlz0vJOm7LaENpTOKZup TCxcG5A2Rq7EzJc+UdBGqguUY1718mL/gusnL1N/xp0+QkxoiHl/TOXv2fAN8+Gl rwW6f+5GKy3WwqvLFbuH53ma/WlJI+V+I= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; s=thelastpickle.com; bh=UpG34XRLGfHPl1ZH Md1oBM3CHM4=; b=ez0zhXVc765xz5zDmkDpMNxpKv/XDbUx7QWtQZbKDiRQs5Iu mhaXbRes8paU9+Th1e+hLz62I9gnIv0NTc8fHvAe1L4siX0xH3mdIl4vgVxI1dKZ 3tB/ugyJZcqYVIsuRHiJRUsQ28lITjuYQ3HQe96HBzq55I8ZVVpqLdPV6fQ= Received: from [10.0.1.151] (121-73-157-230.cable.telstraclear.net [121.73.157.230]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a79.g.dreamhost.com (Postfix) with ESMTPSA id C95A07D4057 for ; Thu, 5 May 2011 16:44:54 -0700 (PDT) From: aaron morton Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: multipart/alternative; boundary=Apple-Mail-25--85622263 Subject: Re: estimateRowsFromIndex exception in 0.7.5 Date: Fri, 6 May 2011 11:44:52 +1200 In-Reply-To: To: user@cassandra.apache.org References: Message-Id: X-Mailer: Apple Mail (2.1084) --Apple-Mail-25--85622263 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Use snapshots or borrow from simplegeo.com = https://github.com/simplegeo/tablesnap If you grab the directory at an arbitrary time there is no guarantee the = data will be consistent. Cheers ----------------- Aaron Morton Freelance Cassandra Developer @aaronmorton http://www.thelastpickle.com On 6 May 2011, at 08:06, Wenjun Che wrote: > Sylvain, thanks for the quick response, and you are correct: there is = an empty index file. I removed the file and tried to start it up. Now = Cassandra is reporting corrupt sstables. Does this mean I can't just = simply back up var/lib directory (use snapshots instead) ? We don't have = much data right now so I thought it'd be easier to back up the entire = directory. >=20 > Thanks >=20 > On Thu, May 5, 2011 at 2:56 PM, Sylvain Lebresne = wrote: > On Thu, May 5, 2011 at 8:38 PM, Wenjun Che wrote: > > Hello, > > > > I have a one node cluster (refresh install from 0.7.4 and upgraded = to 0.7.5 > > last week). The data is being backed up by a cron job that = periodically > > tar/gzip entire > > var/lib directory. when I tested the backup by restoring the last = tar file, > > I am seeing the following exception: > > > > DEBUG 13:45:37,830 Load statistics for > > \var\lib\cassandra\data\Appoji\ApplicationUserPermission-f-6 > > ERROR 13:45:37,832 Exception encountered during startup. > > java.lang.AssertionError > > at > > = org.apache.cassandra.io.sstable.SSTable.estimateRowsFromIndex(SSTable.java= :233) > > at > > = org.apache.cassandra.io.sstable.SSTableReader.load(SSTableReader.java:286)= > > at > > = org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:191)= > > at > > = org.apache.cassandra.db.ColumnFamilyStore.(ColumnFamilyStore.java:23= 2) > > at > > = org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFa= milyStore.java: > > 480) > > at > > = org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFa= milyStore.java: > > 461) > > at org.apache.cassandra.db.Table.initCf(Table.java:308) > > at org.apache.cassandra.db.Table.(Table.java:245) > > at org.apache.cassandra.db.Table.open(Table.java:106) > > at > > = org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassand= raDaemon.java:1 > > 61) > > at > > = org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCass= andraDaemon.jav > > a:315) > > at > > = org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:79) > > Exception encountered during startup. > > > > I checked few other earlier backup tar files and they seem to be = fine. Can > > this be caused by the way I am backing it up? >=20 > I think that could be triggered if you have a 0 bytes index file for > instance, so if you had one such > index file in the backup, that could be a problem. >=20 > -- > Sylvain >=20 --Apple-Mail-25--85622263 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii simplegeo.com https://github.com/simpleg= eo/tablesnap

If you grab the directory at = an arbitrary time there is no guarantee the data will be = consistent.

Cheers

http://www.thelastpickle.com

On 6 May 2011, at 08:06, Wenjun Che wrote:

Sylvain, = thanks for the quick response, and you are correct: there is an empty = index file.  I removed the file and tried to start it up.  Now = Cassandra is reporting corrupt sstables.  Does this mean I can't = just simply back up var/lib directory (use snapshots instead) ? We don't = have much data right now so I thought it'd be easier to back up the = entire directory.

Thanks

On Thu, May 5, 2011 at 2:56 = PM, Sylvain Lebresne <sylvain@datastax.com> = wrote:
On Thu, May 5, 2011 at 8:38 PM, Wenjun = Che <wenjun@openf.in> = wrote:
> Hello,
>
> I have a one node cluster (refresh install from 0.7.4 and upgraded = to 0.7.5
> last week).  The data is being backed up by  a cron job = that periodically
> tar/gzip entire
> var/lib directory.  when I tested the backup by restoring the = last tar file,
> I am seeing the following exception:
>
> DEBUG 13:45:37,830 Load statistics for
> \var\lib\cassandra\data\Appoji\ApplicationUserPermission-f-6
> ERROR 13:45:37,832 Exception encountered during startup.
> java.lang.AssertionError
>         at
> = org.apache.cassandra.io.sstable.SSTable.estimateRowsFromIndex(SSTable.java= :233)
>         at
> = org.apache.cassandra.io.sstable.SSTableReader.load(SSTableReader.java:286)=
>         at
> = org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:191)=
>         at
> = org.apache.cassandra.db.ColumnFamilyStore.<init>(ColumnFamilyStore.j= ava:232)
>         at
> = org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFa= milyStore.java:
> 480)
>         at
> = org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFa= milyStore.java:
> 461)
>         at = org.apache.cassandra.db.Table.initCf(Table.java:308)
>         at = org.apache.cassandra.db.Table.<init>(Table.java:245)
>         at = org.apache.cassandra.db.Table.open(Table.java:106)
>         at
> = org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassand= raDaemon.java:1
> 61)
>         at
> = org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCass= andraDaemon.jav
> a:315)
>         at
> = org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:79)<= br> > Exception encountered during startup.
>
> I checked few other earlier backup tar files and they seem to be = fine.  Can
> this be caused by the way I am backing  it up?

I think that could be triggered if you have a 0 bytes index = file for
instance, so if you had one such
index file in the backup, that could be a problem.

--
Sylvain


= --Apple-Mail-25--85622263--