[ https://issues.apache.org/jira/browse/CASSANDRA-4540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13440932#comment-13440932 ]
Dave Brosius commented on CASSANDRA-4540: ----------------------------------------- seems to work in the standard case here (mint). Do you have a huge number of snapshot directories? > nodetool clearsnapshot broken: gives java.io.IOException when trying to > delete snapshot folder > ---------------------------------------------------------------------------------------------- > > Key: CASSANDRA-4540 > URL: https://issues.apache.org/jira/browse/CASSANDRA-4540 > Project: Cassandra > Issue Type: Bug > Components: Tools > Affects Versions: 1.1.2 > Environment: Debian 6 > Reporter: Christopher Lörken > Priority: Trivial > Labels: lhf > Fix For: 1.1.5 > > > nodetool clearsnapshots failes to delete snapshot directories and exits > prematurely causing the exception at the bottom. > The actual snapshot files _within_ the directory are correctly deleted but > the folder itself is not deleted. > I've chmodded all files and folders in the snapshots directory to 777 and > rund the command as root to exclude file permissions as a cause. I also > restarted cassandra which has no effect on the command. > ----------- > root@server:/var/lib/cassandra/data/MyKeyspace/MyCf/snapshots# nodetool > clearsnapshot MyKeyspace > Requested snapshot for: MyKeyspace > Exception in thread "main" java.io.IOException: Failed to delete > /var/lib/cassandra/data/MyKeyspace/MyCf/snapshots/1344875270796 > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:54) > at > org.apache.cassandra.io.util.FileUtils.deleteRecursive(FileUtils.java:220) > at > org.apache.cassandra.io.util.FileUtils.deleteRecursive(FileUtils.java:216) > at > org.apache.cassandra.db.Directories.clearSnapshot(Directories.java:371) > at > org.apache.cassandra.db.ColumnFamilyStore.clearSnapshot(ColumnFamilyStore.java:1560) > at org.apache.cassandra.db.Table.clearSnapshot(Table.java:268) > at > org.apache.cassandra.service.StorageService.clearSnapshot(StorageService.java:1866) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(Unknown > Source) > at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(Unknown > Source) > at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(Unknown Source) > at com.sun.jmx.mbeanserver.PerInterface.invoke(Unknown Source) > at com.sun.jmx.mbeanserver.MBeanSupport.invoke(Unknown Source) > at > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source) > at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source) > at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown > Source) > at javax.management.remote.rmi.RMIConnectionImpl.access$200(Unknown > Source) > at > javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown > Source) > at > javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown > Source) > at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown > Source) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) > at sun.rmi.transport.Transport$1.run(Unknown Source) > at sun.rmi.transport.Transport$1.run(Unknown Source) > at java.security.AccessController.doPrivileged(Native Method) > at sun.rmi.transport.Transport.serviceCall(Unknown Source) > at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) > at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown > Source) > at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown > Source) > at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) > at java.lang.Thread.run(Unknown Source) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira