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 AB1522B51 for ; Thu, 5 May 2011 20:07:26 +0000 (UTC) Received: (qmail 63553 invoked by uid 500); 5 May 2011 20:07:24 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 63511 invoked by uid 500); 5 May 2011 20:07:24 -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 63503 invoked by uid 99); 5 May 2011 20:07:24 -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 20:07:24 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.216.44] (HELO mail-qw0-f44.google.com) (209.85.216.44) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 May 2011 20:07:19 +0000 Received: by qwc23 with SMTP id 23so2144089qwc.31 for ; Thu, 05 May 2011 13:06:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.72.232 with SMTP id g8mr3656881vdv.160.1304626017706; Thu, 05 May 2011 13:06:57 -0700 (PDT) Received: by 10.220.185.139 with HTTP; Thu, 5 May 2011 13:06:57 -0700 (PDT) X-Originating-IP: [69.200.243.125] In-Reply-To: References: Date: Thu, 5 May 2011 16:06:57 -0400 Message-ID: Subject: Re: estimateRowsFromIndex exception in 0.7.5 From: Wenjun Che To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=bcaec501608b59a44804a28cea99 --bcaec501608b59a44804a28cea99 Content-Type: text/plain; charset=ISO-8859-1 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 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:232) > > at > > > org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java: > > 480) > > at > > > org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.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(AbstractCassandraDaemon.java:1 > > 61) > > at > > > org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.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? > > 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 > --bcaec501608b59a44804a28cea99 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Sylvain, thanks for the quick response, and you are correct: there is an em= pty index file.=A0 I removed the file and tried to start it up.=A0 Now Cass= andra is reporting corrupt sstables.=A0 Does this mean I can't just sim= ply back up var/lib directory (use snapshots instead) ? We don't have m= uch data right now so I thought it'd be easier to back up the entire di= rectory.

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 Ch= e <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).=A0 The data is being backed up by=A0 a cron job that perio= dically
> tar/gzip entire
> var/lib directory.=A0 when I tested the backup by restoring the last t= ar 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
> =A0=A0=A0=A0=A0=A0=A0 at
> org.apache.cassandra.io.sstable.SSTable.estimateRowsFromIndex(SSTable.= java:233)
> =A0=A0=A0=A0=A0=A0=A0 at
> org.apache.cassandra.io.sstable.SSTableReader.load(SSTableReader.java:= 286)
> =A0=A0=A0=A0=A0=A0=A0 at
> org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:= 191)
> =A0=A0=A0=A0=A0=A0=A0 at
> org.apache.cassandra.db.ColumnFamilyStore.<init>(ColumnFamilySto= re.java:232)
> =A0=A0=A0=A0=A0=A0=A0 at
> org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(Colu= mnFamilyStore.java:
> 480)
> =A0=A0=A0=A0=A0=A0=A0 at
> org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(Colu= mnFamilyStore.java:
> 461)
> =A0=A0=A0=A0=A0=A0=A0 at org.apache.cassandra.db.Table.initCf(Table.ja= va:308)
> =A0=A0=A0=A0=A0=A0=A0 at org.apache.cassandra.db.Table.<init>(Ta= ble.java:245)
> =A0=A0=A0=A0=A0=A0=A0 at org.apache.cassandra.db.Table.open(Table.java= :106)
> =A0=A0=A0=A0=A0=A0=A0 at
> org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCas= sandraDaemon.java:1
> 61)
> =A0=A0=A0=A0=A0=A0=A0 at
> org.apache.cassandra.service.AbstractCassandraDaemon.activate(Abstract= CassandraDaemon.jav
> a:315)
> =A0=A0=A0=A0=A0=A0=A0 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.= =A0 Can
> this be caused by the way I am backing=A0 it up?

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

--
Sylvain

--bcaec501608b59a44804a28cea99--