예제 #1
0
 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);
 }
예제 #2
0
 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);
 }
예제 #3
0
 public CCMBridge build() {
   CCMBridge ccm = new CCMBridge();
   ccm.execute(buildCreateCommand());
   ccm.updateConfig(cassandraConfiguration);
   if (start) ccm.start();
   return ccm;
 }
예제 #4
0
 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);
 }
예제 #5
0
 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);
 }
예제 #6
0
 public void setLog() {
   logger.info("Showing Log: ");
   execute(CCM_COMMAND + " setlog TRACE");
 }
예제 #7
0
 public void stop(int n) {
   logger.info("Stopping: " + IP_PREFIX + n);
   execute(CCM_COMMAND + " node%d stop", n);
 }
예제 #8
0
 public void remove(int n) {
   logger.info("Removing: " + IP_PREFIX + n);
   execute(CCM_COMMAND + " node%d remove", n);
 }
예제 #9
0
 public void showLog(int n) {
   logger.info("Showing Log: ");
   execute(CCM_COMMAND + " node%d showlog", n);
 }
예제 #10
0
 public void remove() {
   stop();
   execute(CCM_COMMAND + " remove");
 }
예제 #11
0
 public void remove(String clusterName) {
   stop(clusterName);
   execute(CCM_COMMAND + " remove " + clusterName);
 }
예제 #12
0
 public void setSolResourceGeneration(int node) {
   execute(CCM_COMMAND + " node%d dsetool create_core KS.k generateResources=true", node);
 }
예제 #13
0
 public void start() {
   execute(CCM_COMMAND + " start --wait-other-notice --wait-for-binary-proto");
 }
예제 #14
0
 public void stop() {
   execute(CCM_COMMAND + " stop");
 }
예제 #15
0
 public void forceStop() {
   execute(CCM_COMMAND + " stop --not-gently");
 }
예제 #16
0
 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);
 }
예제 #17
0
 public void setWorkload(int n, String workload) {
   logger.info("Setting Workload for node" + n);
   execute(CCM_COMMAND + " node%d setworkload %s", n, workload);
 }
예제 #18
0
 public void clusterStatus() {
   logger.info("Getting Cluster Status: ");
   execute(CCM_COMMAND + " status");
 }
예제 #19
0
 public void decommissionNode(int n) {
   execute(CCM_COMMAND + " node%d decommission", n);
 }
예제 #20
0
 public void stop(String clusterName) {
   logger.info("Stopping Cluster : " + clusterName);
   execute(CCM_COMMAND + " stop " + clusterName);
 }
예제 #21
0
 public void forceStop(int n) {
   logger.info("Force stopping: " + IP_PREFIX + n);
   execute(CCM_COMMAND + " node%d stop --not-gently", n);
 }
예제 #22
0
 public void flush() {
   execute(CCM_COMMAND + " flush");
 }