cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject [1/2] git commit: make sequential nodetool repair the default patch by ltodorov reviewed by dbrosius for cassandra-5950
Date Sat, 28 Sep 2013 00:48:58 GMT
Updated Branches:
  refs/heads/trunk bce594f38 -> fe54388ba


make sequential nodetool repair the default
patch by ltodorov reviewed by dbrosius for cassandra-5950


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3a709335
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3a709335
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3a709335

Branch: refs/heads/trunk
Commit: 3a7093356ca032d9ce8767b2c47980aebe4bce60
Parents: 2fb089e
Author: Dave Brosius <dbrosius@apache.org>
Authored: Fri Sep 27 20:44:52 2013 -0400
Committer: Dave Brosius <dbrosius@apache.org>
Committed: Fri Sep 27 20:44:52 2013 -0400

----------------------------------------------------------------------
 CHANGES.txt                                               |  1 +
 src/java/org/apache/cassandra/tools/NodeCmd.java          | 10 +++++-----
 .../org/apache/cassandra/tools/NodeToolHelp.yaml          |  6 ++++--
 3 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3a709335/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 3d4d19c..9e962ca 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,7 @@
  * Track clients' remote addresses in ClientState (CASSANDRA-6070)
  * Create snapshot dir if it does not exist when migrating
    leveled manifest (CASSANDRA-6093)
+ * make sequential nodetool repair the default (CASSANDRA-5950)
 Merged from 1.2:
  * Allow estimated memtable size to exceed slab allocator size (CASSANDRA-6078)
  * Start MeteredFlusher earlier to prevent OOM during CL replay (CASSANDRA-6087)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3a709335/src/java/org/apache/cassandra/tools/NodeCmd.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/NodeCmd.java b/src/java/org/apache/cassandra/tools/NodeCmd.java
index 943db7d..00375ab 100644
--- a/src/java/org/apache/cassandra/tools/NodeCmd.java
+++ b/src/java/org/apache/cassandra/tools/NodeCmd.java
@@ -64,7 +64,7 @@ public class NodeCmd
     private static final Pair<String, String> TAG_OPT = Pair.create("t", "tag");
     private static final Pair<String, String> TOKENS_OPT = Pair.create("T", "tokens");
     private static final Pair<String, String> PRIMARY_RANGE_OPT = Pair.create("pr",
"partitioner-range");
-    private static final Pair<String, String> SNAPSHOT_REPAIR_OPT = Pair.create("snapshot",
"with-snapshot");
+    private static final Pair<String, String> PARALLEL_REPAIR_OPT = Pair.create("par",
"parallel");
     private static final Pair<String, String> LOCAL_DC_REPAIR_OPT = Pair.create("local",
"in-local-dc");
     private static final Pair<String, String> START_TOKEN_OPT = Pair.create("st", "start-token");
     private static final Pair<String, String> END_TOKEN_OPT = Pair.create("et", "end-token");
@@ -88,7 +88,7 @@ public class NodeCmd
         options.addOption(TAG_OPT,      true, "optional name to give a snapshot");
         options.addOption(TOKENS_OPT,   false, "display all tokens");
         options.addOption(PRIMARY_RANGE_OPT, false, "only repair the first range returned
by the partitioner for the node");
-        options.addOption(SNAPSHOT_REPAIR_OPT, false, "repair one node at a time using snapshots");
+        options.addOption(PARALLEL_REPAIR_OPT, false, "repair nodes in parallel.");
         options.addOption(LOCAL_DC_REPAIR_OPT, false, "only repair against nodes in the same
datacenter");
         options.addOption(START_TOKEN_OPT, true, "token at which repair range starts");
         options.addOption(END_TOKEN_OPT, true, "token at which repair range ends");
@@ -1439,13 +1439,13 @@ public class NodeCmd
             switch (nc)
             {
                 case REPAIR  :
-                    boolean snapshot = cmd.hasOption(SNAPSHOT_REPAIR_OPT.left);
+                    boolean sequential = !cmd.hasOption(PARALLEL_REPAIR_OPT.left);
                     boolean localDC = cmd.hasOption(LOCAL_DC_REPAIR_OPT.left);
                     boolean primaryRange = cmd.hasOption(PRIMARY_RANGE_OPT.left);
                     if (cmd.hasOption(START_TOKEN_OPT.left) || cmd.hasOption(END_TOKEN_OPT.left))
-                        probe.forceRepairRangeAsync(System.out, keyspace, snapshot, localDC,
cmd.getOptionValue(START_TOKEN_OPT.left), cmd.getOptionValue(END_TOKEN_OPT.left), columnFamilies);
+                        probe.forceRepairRangeAsync(System.out, keyspace, sequential, localDC,
cmd.getOptionValue(START_TOKEN_OPT.left), cmd.getOptionValue(END_TOKEN_OPT.left), columnFamilies);
                     else
-                        probe.forceRepairAsync(System.out, keyspace, snapshot, localDC, primaryRange,
columnFamilies);
+                        probe.forceRepairAsync(System.out, keyspace, sequential, localDC,
primaryRange, columnFamilies);
                     break;
                 case FLUSH   :
                     try { probe.forceKeyspaceFlush(keyspace, columnFamilies); }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3a709335/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml
----------------------------------------------------------------------
diff --git a/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml b/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml
index e22da96..4e8a8a0 100644
--- a/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml
+++ b/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml
@@ -144,7 +144,9 @@ commands:
       Flush one or more column families
   - name: repair [keyspace] [cfnames]
     help: |
-      Repair one or more column families (use -pr to repair only the first range returned
by the partitioner; -snapshot to repair one node at a time sequentially using snapshots)
+      Repair one or more column families
+         Use -pr to repair only the first range returned by the partitioner.
+         Use -par to carry out a parallel repair.
   - name: cleanup [keyspace] [cfnames]
     help: |
       Run cleanup on one or more column families
@@ -157,7 +159,7 @@ commands:
   - name: upgradesstables [-a|--include-all-sstables] [keyspace] [cfnames]
     help: |
       Rewrite sstables (for the requested column families) that are not on the current version
(thus upgrading them to said current version).
-      Use -a to include all sstables, even those already on the current version.
+         Use -a to include all sstables, even those already on the current version.
   - name: setcompactionthreshold <keyspace> <cfname>
     help: |
       Set min and max compaction thresholds for a given column family


Mime
View raw message