accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1431410 - /accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/MergeCommand.java
Date Thu, 10 Jan 2013 15:17:57 GMT
Author: ecn
Date: Thu Jan 10 15:17:57 2013
New Revision: 1431410

URL: http://svn.apache.org/viewvc?rev=1431410&view=rev
Log:
ACCUMULO-952 confirm a full table merge

Modified:
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/MergeCommand.java

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/MergeCommand.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/MergeCommand.java?rev=1431410&r1=1431409&r2=1431410&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/MergeCommand.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/commands/MergeCommand.java
Thu Jan 10 15:17:57 2013
@@ -47,6 +47,14 @@ public class MergeCommand extends Comman
     if (cl.hasOption(sizeOpt.getOpt())) {
       size = AccumuloConfiguration.getMemoryInBytes(cl.getOptionValue(sizeOpt.getOpt()));
     }
+    if (startRow == null && endRow == null) {
+      shellState.getReader().flushConsole();
+      String line = shellState.getReader().readLine("Merge the entire table { " + tableName
+ " } into one tablet (yes|no)? ");
+      if (line == null)
+        return 0;
+      if (!line.equalsIgnoreCase("y") && !line.equalsIgnoreCase("yes"))
+        return 0;
+    }
     if (size < 0) {
       shellState.getConnector().tableOperations().merge(tableName, startRow, endRow);
     } else {



Mime
View raw message