Return-Path: Delivered-To: apmail-incubator-cassandra-user-archive@minotaur.apache.org Received: (qmail 88367 invoked from network); 9 Oct 2009 01:46:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Oct 2009 01:46:11 -0000 Received: (qmail 92344 invoked by uid 500); 9 Oct 2009 01:46:10 -0000 Delivered-To: apmail-incubator-cassandra-user-archive@incubator.apache.org Received: (qmail 92329 invoked by uid 500); 9 Oct 2009 01:46:10 -0000 Mailing-List: contact cassandra-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-user@incubator.apache.org Delivered-To: mailing list cassandra-user@incubator.apache.org Received: (qmail 92319 invoked by uid 99); 9 Oct 2009 01:46:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Oct 2009 01:46:10 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.216.175] (HELO mail-px0-f175.google.com) (209.85.216.175) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Oct 2009 01:46:01 +0000 Received: by pxi5 with SMTP id 5so5966112pxi.12 for ; Thu, 08 Oct 2009 18:45:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.115.101.18 with SMTP id d18mr2942679wam.191.1255052739030; Thu, 08 Oct 2009 18:45:39 -0700 (PDT) In-Reply-To: References: Date: Thu, 8 Oct 2009 18:45:39 -0700 Message-ID: Subject: Re: Remove not working for me From: Ramzi Rabah To: cassandra-user@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 Yeah I wiped out my commitLog files and data files and restarted the server, and I still ran into this problem. Thanks Ray On Thu, Oct 8, 2009 at 6:37 PM, Jonathan Ellis wrote: > Yes, that's a bug all right. > > Is this reproducible when you start with an empty database? > > On Thu, Oct 8, 2009 at 7:53 PM, Ramzi Rabah wrote: >> Hi Jonathan thanks a lot for the quick response :) here is the error >> in the server log >> >> DEBUG [pool-1-thread-4] 2009-10-08 20:24:17,428 StorageProxy.java >> (line 515) weakreadlocal reading >> SliceFromReadCommand(table=3D'Keyspace1', key=3D'user1', >> column_parent=3D'QueryPath(columnFamilyName=3D'Datastore', >> superColumnName=3D'[B@1a5e65f', columnName=3D'null')', start=3D'', >> finish=3D'', reversed=3Dfalse, count=3D3) >> ERROR [pool-1-thread-4] 2009-10-08 20:24:17,430 Cassandra.java (line >> 657) Internal error processing get_slice >> java.lang.AssertionError >> =A0 =A0 =A0 at org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily= (ColumnFamilyStore.java:1347) >> =A0 =A0 =A0 at org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily= (ColumnFamilyStore.java:1325) >> =A0 =A0 =A0 at org.apache.cassandra.db.Table.getRow(Table.java:590) >> =A0 =A0 =A0 at org.apache.cassandra.db.SliceFromReadCommand.getRow(Slice= FromReadCommand.java:59) >> =A0 =A0 =A0 at org.apache.cassandra.service.StorageProxy.weakReadLocal(S= torageProxy.java:518) >> =A0 =A0 =A0 at org.apache.cassandra.service.StorageProxy.readProtocol(St= orageProxy.java:310) >> =A0 =A0 =A0 at org.apache.cassandra.service.CassandraServer.readColumnFa= mily(CassandraServer.java:99) >> =A0 =A0 =A0 at org.apache.cassandra.service.CassandraServer.getSlice(Cas= sandraServer.java:180) >> =A0 =A0 =A0 at org.apache.cassandra.service.CassandraServer.multigetSlic= eInternal(CassandraServer.java:249) >> =A0 =A0 =A0 at org.apache.cassandra.service.CassandraServer.get_slice(Ca= ssandraServer.java:218) >> =A0 =A0 =A0 at org.apache.cassandra.service.Cassandra$Processor$get_slic= e.process(Cassandra.java:651) >> =A0 =A0 =A0 at org.apache.cassandra.service.Cassandra$Processor.process(= Cassandra.java:609) >> =A0 =A0 =A0 at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.= run(TThreadPoolServer.java:253) >> =A0 =A0 =A0 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadP= oolExecutor.java:1110) >> =A0 =A0 =A0 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Thread= PoolExecutor.java:603) >> =A0 =A0 =A0 at java.lang.Thread.run(Thread.java:636) >> >> On Thu, Oct 8, 2009 at 5:41 PM, Jonathan Ellis wrote= : >>> "Internal error" usually means you found a bug. =A0Are there any >>> exceptions in the server log? >>> >>> On Thu, Oct 8, 2009 at 7:33 PM, Ramzi Rabah wrote: >>>> Hello all, >>>> >>>> I am trying to test Cassandra for deploying it in production in our >>>> company, and I am very pleased with the performance of the >>>> reads/writes on Columns. I did run into an issue with the API though >>>> while trying to play with supercolumns. Here is my code: >>>> >>>> // Creating a supercolumn with name =3D "key" and columns ("value", "c= reated"). >>>> =A0 =A0 =A0 =A0long now =3D System.currentTimeMillis(); >>>> =A0 =A0 =A0 =A0byte[] keyAsBytes =3D key.getBytes(); >>>> >>>> =A0 =A0 =A0 =A0ColumnOrSuperColumn colOrSuperCol =3D new ColumnOrSuper= Column(); >>>> =A0 =A0 =A0 =A0SuperColumn superCol =3D new SuperColumn(); >>>> =A0 =A0 =A0 =A0colOrSuperCol.setSuper_column(superCol); >>>> =A0 =A0 =A0 =A0superCol.setName(keyAsBytes); >>>> =A0 =A0 =A0 =A0List cols =3D new ArrayList(); >>>> >>>> =A0 =A0 =A0 =A0// first the key/value pair >>>> =A0 =A0 =A0 =A0Column col =3D new Column(); >>>> =A0 =A0 =A0 =A0col.setName("value".getBytes()); >>>> =A0 =A0 =A0 =A0col.setValue(value); >>>> =A0 =A0 =A0 =A0cols.add(col); >>>> >>>> =A0 =A0 =A0 =A0// then the time created >>>> =A0 =A0 =A0 =A0col =3D new Column(); >>>> =A0 =A0 =A0 =A0col.setName("created".getBytes()); >>>> =A0 =A0 =A0 =A0col.setValue((now + "").getBytes()); >>>> =A0 =A0 =A0 =A0cols.add(col); >>>> >>>> =A0 =A0 =A0 =A0superCol.setColumns(cols); >>>> >>>> =A0 =A0 =A0 =A0Map> map =3D new >>>> HashMap>(); >>>> =A0 =A0 =A0 =A0List list =3D new ArrayList(); >>>> =A0 =A0 =A0 =A0list.add(colOrSuperCol); >>>> =A0 =A0 =A0 =A0map.put(COLUMN_FAMILY_NAME, list); >>>> >>>> =A0 =A0 =A0 =A0client.batch_insert(KEYSPACE_NAME, key, map, Consistenc= yLevel.ONE); >>>> >>>> >>>> // The GET of the supercolumn >>>> =A0 =A0 =A0 =A0SlicePredicate predicate =3D new SlicePredicate(null, n= ew >>>> SliceRange(new byte >>>> [0], new byte[0], false, 2)); >>>> =A0 =A0 =A0 =A0ColumnParent parent =3D new ColumnParent(COLUMN_FAMILY_= NAME, >>>> key.getBytes()); >>>> >>>> =A0 =A0 =A0 =A0List columns =3D null; >>>> =A0 =A0 =A0 =A0 =A0 =A0columns =3D client.get_slice(KEYSPACE_NAME, key= , >>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0parent, predicate, ConsistencyL= evel.ONE); >>>> >>>> >>>> // delete the supercolumn >>>> =A0 =A0 =A0 =A0 =A0 =A0client.remove(KEYSPACE_NAME, key,new >>>> ColumnPath(COLUMN_FAMILY_NAME, null, null), >>>> System.currentTimeMillis(),ConsistencyLevel.ONE); >>>> >>>> // Do the get again >>>> >>>> When I try to delete the super column and then I try to read it again, >>>> I get an exception thrown by cassandra >>>> >>>> org.apache.thrift.TApplicationException: Internal error processing get= _slice >>>> =A0 =A0 =A0 =A0at org.apache.thrift.TApplicationException.read(TApplic= ationException.java:107) >>>> =A0 =A0 =A0 =A0at org.apache.cassandra.service.Cassandra$Client.recv_g= et_slice(Cassandra.java:171) >>>> =A0 =A0 =A0 =A0at org.apache.cassandra.service.Cassandra$Client.get_sl= ice(Cassandra.java:150) >>>> =A0 =A0 =A0 =A0at com.playdom.cassandra.datastore.CassandraDataStore.t= estGet(CassandraDataStore.java:233) >>>> =A0 =A0 =A0 =A0at com.playdom.cassandra.test.TestCassandraDataStore.te= stSetAndGetTrial(TestCassandraDataStore.java:58) >>>> =A0 =A0 =A0 =A0at sun.reflect.NativeMethodAccessorImpl.invoke0(Native = Method) >>>> =A0 =A0 =A0 =A0at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMe= thodAccessorImpl.java:39) >>>> =A0 =A0 =A0 =A0at sun.reflect.DelegatingMethodAccessorImpl.invoke(Dele= gatingMethodAccessorImpl.java:25) >>>> =A0 =A0 =A0 =A0at java.lang.reflect.Method.invoke(Method.java:597) >>>> =A0 =A0 =A0 =A0at junit.framework.TestCase.runTest(TestCase.java:168) >>>> =A0 =A0 =A0 =A0at junit.framework.TestCase.runBare(TestCase.java:134) >>>> =A0 =A0 =A0 =A0at junit.framework.TestResult$1.protect(TestResult.java= :110) >>>> =A0 =A0 =A0 =A0at junit.framework.TestResult.runProtected(TestResult.j= ava:128) >>>> =A0 =A0 =A0 =A0at junit.framework.TestResult.run(TestResult.java:113) >>>> =A0 =A0 =A0 =A0at junit.framework.TestCase.run(TestCase.java:124) >>>> =A0 =A0 =A0 =A0at junit.framework.TestSuite.runTest(TestSuite.java:232= ) >>>> =A0 =A0 =A0 =A0at junit.framework.TestSuite.run(TestSuite.java:227) >>>> =A0 =A0 =A0 =A0at junit.textui.TestRunner.doRun(TestRunner.java:116) >>>> =A0 =A0 =A0 =A0at com.intellij.rt.execution.junit.IdeaTestRunner.doRun= (IdeaTestRunner.java:94) >>>> =A0 =A0 =A0 =A0at junit.textui.TestRunner.doRun(TestRunner.java:109) >>>> =A0 =A0 =A0 =A0at com.intellij.rt.execution.junit.IdeaTestRunner.start= RunnerWithArgs(IdeaTestRunner.java:22) >>>> =A0 =A0 =A0 =A0at com.intellij.rt.execution.junit.JUnitStarter.prepare= StreamsAndStart(JUnitStarter.java:118) >>>> =A0 =A0 =A0 =A0at com.intellij.rt.execution.junit.JUnitStarter.main(JU= nitStarter.java:40) >>>> >>>> I was expecting a NotFoundException() since I thought the read will >>>> not find anything. Also anytime I try to rerun this after the delete I >>>> always get an exception in the reads. >>>> >>>> Am I doing something seriously wrong? Thanks a lot for your help >>>> >>>> Ray >>>> >>> >> >