Пример #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");
 }