public void start(int n, String jvmArg) { logger.info("Starting: " + IP_PREFIX + n + " with " + jvmArg); execute( CCM_COMMAND + " node%d start --wait-other-notice --wait-for-binary-proto --jvm_arg=%s", n, jvmArg); }
public void updateDseConfig(Map<String, String> configs) { StringBuilder confStr = new StringBuilder(); for (Map.Entry<String, String> entry : configs.entrySet()) { confStr.append(entry.getKey() + ":" + entry.getValue() + " "); } execute(CCM_COMMAND + " updatedseconf " + confStr); }
public CCMBridge build() { CCMBridge ccm = new CCMBridge(); ccm.execute(buildCreateCommand()); ccm.updateConfig(cassandraConfiguration); if (start) ccm.start(); return ccm; }
public void bootstrapNodeWithPorts( int n, int thriftPort, int storagePort, int binaryPort, int jmxPort, int remoteDebugPort) { String thriftItf = IP_PREFIX + n + ":" + thriftPort; String storageItf = IP_PREFIX + n + ":" + storagePort; String binaryItf = IP_PREFIX + n + ":" + binaryPort; String remoteLogItf = IP_PREFIX + n + ":" + remoteDebugPort; execute( CCM_COMMAND + " add node%d -i %s%d -b -t %s -l %s --binary-itf %s -j %d -r %s -s", n, IP_PREFIX, n, thriftItf, storageItf, binaryItf, jmxPort, remoteLogItf); execute(CCM_COMMAND + " node%d start --wait-other-notice --wait-for-binary-proto", n); }
public void bootstrapNode(int n, String dc) { if (dc == null) execute( CCM_COMMAND + " add node%d -i %s%d -j %d -r %d -b -s", n, IP_PREFIX, n, 7000 + 100 * n, 8000 + 100 * n); else execute( CCM_COMMAND + " add node%d -i %s%d -j %d -b -d %s -s", n, IP_PREFIX, n, 7000 + 100 * n, dc); execute(CCM_COMMAND + " node%d start --wait-other-notice --wait-for-binary-proto", n); }
public void setLog() { logger.info("Showing Log: "); execute(CCM_COMMAND + " setlog TRACE"); }
public void stop(int n) { logger.info("Stopping: " + IP_PREFIX + n); execute(CCM_COMMAND + " node%d stop", n); }
public void remove(int n) { logger.info("Removing: " + IP_PREFIX + n); execute(CCM_COMMAND + " node%d remove", n); }
public void showLog(int n) { logger.info("Showing Log: "); execute(CCM_COMMAND + " node%d showlog", n); }
public void remove() { stop(); execute(CCM_COMMAND + " remove"); }
public void remove(String clusterName) { stop(clusterName); execute(CCM_COMMAND + " remove " + clusterName); }
public void setSolResourceGeneration(int node) { execute(CCM_COMMAND + " node%d dsetool create_core KS.k generateResources=true", node); }
public void start() { execute(CCM_COMMAND + " start --wait-other-notice --wait-for-binary-proto"); }
public void stop() { execute(CCM_COMMAND + " stop"); }
public void forceStop() { execute(CCM_COMMAND + " stop --not-gently"); }
public void start(int n) { logger.info("Starting: " + IP_PREFIX + n); execute(CCM_COMMAND + " node%d start --wait-other-notice --wait-for-binary-proto", n); }
public void setWorkload(int n, String workload) { logger.info("Setting Workload for node" + n); execute(CCM_COMMAND + " node%d setworkload %s", n, workload); }
public void clusterStatus() { logger.info("Getting Cluster Status: "); execute(CCM_COMMAND + " status"); }
public void decommissionNode(int n) { execute(CCM_COMMAND + " node%d decommission", n); }
public void stop(String clusterName) { logger.info("Stopping Cluster : " + clusterName); execute(CCM_COMMAND + " stop " + clusterName); }
public void forceStop(int n) { logger.info("Force stopping: " + IP_PREFIX + n); execute(CCM_COMMAND + " node%d stop --not-gently", n); }
public void flush() { execute(CCM_COMMAND + " flush"); }