Example usage for org.apache.cassandra.tools RepairRunner run

List of usage examples for org.apache.cassandra.tools RepairRunner run

Introduction

In this page you can find the example usage for org.apache.cassandra.tools RepairRunner run.

Prototype

public void run() throws Exception 

Source Link

Usage

From source file:com.wenyu.utils.ClusterToolNodeProbe.java

License:Apache License

public void repairAsync(final PrintStream out, final String keyspace, Map<String, String> options)
        throws IOException {
    RepairRunner runner = new RepairRunner(out, ssProxy, keyspace, options);
    try {//  ww  w .  j av  a  2 s.  c  o  m
        jmxc.addConnectionNotificationListener(runner, null, null);
        ssProxy.addNotificationListener(runner, null, null);
        runner.run();
    } catch (Exception e) {
        throw new IOException(e);
    } finally {
        try {
            ssProxy.removeNotificationListener(runner);
            jmxc.removeConnectionNotificationListener(runner);
        } catch (Throwable e) {
            out.println("Exception occurred during clean-up. " + e);
        }
    }
}