incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Ellis <jbel...@gmail.com>
Subject Re: Exception when truncate
Date Sat, 19 May 2012 17:08:10 GMT
Sounds like you have a permissions problem.  Cassandra creates a
subdirectory for each snapshot.

On Thu, May 17, 2012 at 4:57 AM, ruslan usifov <ruslan.usifov@gmail.com> wrote:
> Hello
>
> I have follow situation on our test server:
>
> from cassandra-cli i try to use
>
> truncate purchase_history;
>
> 3 times i got:
>
> [default@township_6waves] truncate purchase_history;
> null
> UnavailableException()
>        at org.apache.cassandra.thrift.Cassandra$truncate_result.read(Cassandra.java:20212)
>        at org.apache.cassandra.thrift.Cassandra$Client.recv_truncate(Cassandra.java:1077)
>        at org.apache.cassandra.thrift.Cassandra$Client.truncate(Cassandra.java:1052)
>        at org.apache.cassandra.cli.CliClient.executeTruncate(CliClient.java:1445)
>        at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:272)
>        at org.apache.cassandra.cli.CliMain.processStatementInteractive(CliMain.java:220)
>        at org.apache.cassandra.cli.CliMain.main(CliMain.java:348)
>
>
> So this looks that truncate goes very slow and too long, than
> rpc_timeout_in_ms: 10000 (this can happens because we have very slow
> disck on test machine)
>
> But in in cassandra system log i see follow exception:
>
>
> ERROR [MutationStage:7022] 2012-05-17 12:19:14,356
> AbstractCassandraDaemon.java (line 139) Fatal exception in thread
> Thread[MutationStage:7022,5,main]
> java.io.IOError: java.io.IOException: unable to mkdirs
> /home/cassandra/1.0.0/data/township_6waves/snapshots/1337242754356-purchase_history
>        at org.apache.cassandra.db.ColumnFamilyStore.snapshotWithoutFlush(ColumnFamilyStore.java:1433)
>        at org.apache.cassandra.db.ColumnFamilyStore.snapshot(ColumnFamilyStore.java:1462)
>        at org.apache.cassandra.db.ColumnFamilyStore.truncate(ColumnFamilyStore.java:1657)
>        at org.apache.cassandra.db.TruncateVerbHandler.doVerb(TruncateVerbHandler.java:50)
>        at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:59)
>        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>        at java.lang.Thread.run(Thread.java:662)
> Caused by: java.io.IOException: unable to mkdirs
> /home/cassandra/1.0.0/data/township_6waves/snapshots/1337242754356-purchase_history
>        at org.apache.cassandra.io.util.FileUtils.createDirectory(FileUtils.java:140)
>        at org.apache.cassandra.io.util.FileUtils.createDirectory(FileUtils.java:131)
>        at org.apache.cassandra.db.ColumnFamilyStore.snapshotWithoutFlush(ColumnFamilyStore.java:1409)
>        ... 7 more
>
>
> Also i see that in snapshort dir already exists
> 1337242754356-purchase_history directory, so i think that snapshort
> names that generate cassandra not uniquely.
>
> PS: We use cassandra 1.0.10 on Ubuntu 10.0.4-LTS



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com

Mime
View raw message