/** * NodeProbe constructor. * * @param host cassandra jmx host * @param port cassandra jmx port * @param username cassandra jmx username (optional) * @param password cassandra jmx password (optional) * @throws IOException JMX connection exception */ public NodeProbeWrapper(String host, int port, String username, String password) throws IOException { this.nodeProbe = new NodeProbe(host, port, username, password); }
/** * NodeProbe constructor. * * @param host cassandra jmx host * @param port cassandra jmx port * @param username cassandra jmx username (optional) * @param password cassandra jmx password (optional) * @throws IOException JMX connection exception */ public NodeProbeWrapper(String host, int port, String username, String password) throws IOException { this.nodeProbe = new NodeProbe(host, port, username, password); }
/** * NodeProbe constructor. * * @param host cassandra jmx host * @param port cassandra jmx port * @param username cassandra jmx username (optional) * @param password cassandra jmx password (optional) * @throws IOException JMX connection exception */ public NodeProbeWrapper(String host, int port, String username, String password) throws IOException { this.nodeProbe = new NodeProbe(host, port, username, password); }
/** * NodeProbe constructor. * * @param host cassandra jmx host * @param port cassandra jmx port * @param username cassandra jmx username (optional) * @param password cassandra jmx password (optional) * @throws IOException JMX connection exception */ public NodeProbeWrapper(String host, int port, String username, String password) throws IOException { this.nodeProbe = new NodeProbe(host, port, username, password); }
/** * NodeProbe constructor. * * @param host cassandra jmx host * @param port cassandra jmx port * @throws IOException JMX connection exception */ public NodeProbeWrapper(String host, int port) throws IOException { this.nodeProbe = new NodeProbe(host, port); }
/** * NodeProbe constructor. * * @param host cassandra jmx host * @param port cassandra jmx port * @throws IOException JMX connection exception */ public NodeProbeWrapper(String host, int port) throws IOException { this.nodeProbe = new NodeProbe(host, port); }
/** * NodeProbe constructor. * * @param host cassandra jmx host * @param port cassandra jmx port * @throws IOException JMX connection exception */ public NodeProbeWrapper(String host, int port) throws IOException { this.nodeProbe = new NodeProbe(host, port); }
/** * NodeProbe constructor. * * @param host cassandra jmx host * @param port cassandra jmx port * @throws IOException JMX connection exception */ public NodeProbeWrapper(String host, int port) throws IOException { this.nodeProbe = new NodeProbe(host, port); }
public NodeProbe getNodeProbe() { try { return jmxUsername != null && jmxPassword != null ? new NodeProbe(hostName, jmxPort, jmxUsername, jmxPassword) : new NodeProbe(hostName, jmxPort); } catch (Exception e) { JVMStabilityInspector.inspectThrowable(e); err.printf("WARNING: Could not connect to the JMX on %s:%d - some information won't be shown.%n%n", hostName, jmxPort); } return null; } }
private NodeProbe connect() { NodeProbe nodeClient = null; try { if (username.isEmpty()) nodeClient = new NodeProbe(host, parseInt(port)); else nodeClient = new NodeProbe(host, parseInt(port), username, password); } catch (IOException | SecurityException e) { Throwable rootCause = Throwables.getRootCause(e); System.err.println(format("nodetool: Failed to connect to '%s:%s' - %s: '%s'.", host, port, rootCause.getClass().getSimpleName(), rootCause.getMessage())); System.exit(1); } return nodeClient; }
private NodeProbe connect() { NodeProbe nodeClient = null; try { if (username.isEmpty()) nodeClient = new NodeProbe(host, parseInt(port)); else nodeClient = new NodeProbe(host, parseInt(port), username, password); } catch (IOException | SecurityException e) { Throwable rootCause = Throwables.getRootCause(e); System.err.println(format("nodetool: Failed to connect to '%s:%s' - %s: '%s'.", host, port, rootCause.getClass().getSimpleName(), rootCause.getMessage())); System.exit(1); } return nodeClient; }
private NodeProbe connect() { NodeProbe nodeClient = null; try { if (username.isEmpty()) nodeClient = new NodeProbe(host, parseInt(port)); else nodeClient = new NodeProbe(host, parseInt(port), username, password); } catch (IOException | SecurityException e) { Throwable rootCause = Throwables.getRootCause(e); System.err.println(format("nodetool: Failed to connect to '%s:%s' - %s: '%s'.", host, port, rootCause.getClass().getSimpleName(), rootCause.getMessage())); System.exit(1); } return nodeClient; }
private NodeProbe connect() { NodeProbe nodeClient = null; try { if (username.isEmpty()) nodeClient = new NodeProbe(host, parseInt(port)); else nodeClient = new NodeProbe(host, parseInt(port), username, password); } catch (IOException e) { Throwable rootCause = Throwables.getRootCause(e); System.err.println(format("nodetool: Failed to connect to '%s:%s' - %s: '%s'.", host, port, rootCause.getClass().getSimpleName(), rootCause.getMessage())); System.exit(1); } return nodeClient; }
public static void main(String[] args) throws IOException { if (args.length < 1) { System.out.println(String.format("Usage: %s [ALL | host [host ...]]", TruncateHints.class.getName())); System.exit(1); } NodeProbe nodeProbe = new NodeProbe(InetAddress.getLocalHost().getCanonicalHostName(), 7199); for (String arg : args) { if (arg.equals("ALL")) { nodeProbe.truncateHints(); } else { nodeProbe.truncateHints(arg); } } System.out.println("Hints truncated!"); } }
private NodeProbe connectProbe() { while (true) { try { NodeProbe nodeProbe = new NodeProbe("127.0.0.1", task.getConfig().getJmxPort()); logger.info("Node probe is successfully connected to the Cassandra Daemon: port {}", task.getConfig().getJmxPort()); return nodeProbe; } catch (Exception ex) { logger.info("Connection to server failed backing off for 500 ms"); try { Thread.sleep(500); } catch (InterruptedException e) { } } } } }