@Override public void handleConnectionClosed(long timestamp, String message) { handleConnectionFailed(timestamp, message); }
public void repairAsync(final PrintStream out, final String keyspace, Map<String, String> options) throws IOException { RepairRunner runner = new RepairRunner(out, ssProxy, keyspace, options); try { 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); } } }
public void forceRepairRangeAsync(final PrintStream out, final String keyspaceName, RepairParallelism parallelismDegree, Collection<String> dataCenters, final Collection<String> hosts, final String startToken, final String endToken, boolean fullRepair, String... columnFamilies) throws IOException { RepairRunner runner = new RepairRunner(out, keyspaceName, columnFamilies); try { jmxc.addConnectionNotificationListener(runner, null, null); ssProxy.addNotificationListener(runner, null, null); if (!runner.repairRangeAndWait(ssProxy, parallelismDegree, dataCenters, hosts, startToken, endToken, fullRepair)) failed = true; } 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); } } }
public void forceRepairAsync(final PrintStream out, final String keyspaceName, RepairParallelism parallelismDegree, Collection<String> dataCenters, final Collection<String> hosts, boolean primaryRange, boolean fullRepair, String... columnFamilies) throws IOException { RepairRunner runner = new RepairRunner(out, keyspaceName, columnFamilies); try { jmxc.addConnectionNotificationListener(runner, null, null); ssProxy.addNotificationListener(runner, null, null); if (!runner.repairAndWait(ssProxy, parallelismDegree, dataCenters, hosts, primaryRange, fullRepair)) failed = true; } catch (Exception e) { throw new IOException(e) ; } finally { try { ssProxy.removeNotificationListener(runner); jmxc.removeConnectionNotificationListener(runner); } catch (Throwable t) { JVMStabilityInspector.inspectThrowable(t); out.println("Exception occurred during clean-up. " + t); } } }
public boolean repairAndWait(StorageServiceMBean ssProxy, RepairParallelism parallelismDegree, Collection<String> dataCenters, Collection<String> hosts, boolean primaryRangeOnly, boolean fullRepair) throws Exception { cmd = ssProxy.forceRepairAsync(keyspace, parallelismDegree.ordinal(), dataCenters, hosts, primaryRangeOnly, fullRepair, columnFamilies); waitForRepair(); return success; }
public void repairAsync(final PrintStream out, final String keyspace, Map<String, String> options) throws IOException { RepairRunner runner = new RepairRunner(out, ssProxy, keyspace, options); try { 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); } } }
public boolean repairRangeAndWait(StorageServiceMBean ssProxy, RepairParallelism parallelismDegree, Collection<String> dataCenters, Collection<String> hosts, String startToken, String endToken, boolean fullRepair) throws Exception { cmd = ssProxy.forceRepairRangeAsync(startToken, endToken, keyspace, parallelismDegree.ordinal(), dataCenters, hosts, fullRepair, columnFamilies); waitForRepair(); return success; }
public void repairAsync(final PrintStream out, final String keyspace, Map<String, String> options) throws IOException { RepairRunner runner = new RepairRunner(out, ssProxy, keyspace, options); try { 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); } } }
@Override public void handleConnectionClosed(long timestamp, String message) { handleConnectionFailed(timestamp, message); }
@Override public void handleConnectionClosed(long timestamp, String message) { handleConnectionFailed(timestamp, message); }