Example usage for org.apache.cassandra.io.util FileUtils delete

List of usage examples for org.apache.cassandra.io.util FileUtils delete

Introduction

In this page you can find the example usage for org.apache.cassandra.io.util FileUtils delete.

Prototype

public static void delete(File... files) 

Source Link

Usage

From source file:me.tango.cassandra.bench.SchemaLoader.java

License:Apache License

protected static void cleanupSavedCaches() {
    File cachesDir = new File(DatabaseDescriptor.getSavedCachesLocation());

    if (!cachesDir.exists() || !cachesDir.isDirectory())
        return;/*from   w  w w  .ja va  2  s . c  o m*/

    FileUtils.delete(cachesDir.listFiles());
}

From source file:org.ebayopensource.turmeric.manager.cassandra.server.CassandraTestManager.java

License:Open Source License

private static void cleanupData() throws IOException {
    String[] allDataFileLocations = DatabaseDescriptor.getAllDataFileLocations();
    for (String s : allDataFileLocations) {
        File dirFile = new File(s + "/rl");
        if (dirFile.exists() && dirFile.isDirectory()) {
            FileUtils.delete(dirFile.listFiles());
        }//from ww  w.  j ava  2  s .c  o  m
    }
}

From source file:org.ebayopensource.turmeric.monitoring.aggregation.util.CassandraTestManager.java

License:Open Source License

private static void cleanupData() throws IOException {
    String[] allDataFileLocations = DatabaseDescriptor.getAllDataFileLocations();
    for (String s : allDataFileLocations) {
        File dirFile = new File(s);
        if (dirFile.exists() && dirFile.isDirectory()) {
            FileUtils.delete(dirFile.listFiles());
        }//from w  ww.  ja  v a2 s  .c  o  m
    }
}

From source file:org.ebayopensource.turmeric.rateLimiterproviderImpl.RateLimiterProviderImplTest.java

License:Open Source License

private void cleanupData() throws IOException {
    String[] allDataFileLocations = DatabaseDescriptor.getAllDataFileLocations();
    for (String s : allDataFileLocations) {
        File dirFile = new File(s);
        if (dirFile.exists() && dirFile.isDirectory()) {
            FileUtils.delete(dirFile.listFiles());
        }/*from   w  ww  .  ja  v  a  2 s .c o  m*/
    }
}