accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1459793 - in /accumulo/branches/1.5/core/src: main/java/org/apache/accumulo/core/util/shell/commands/DUCommand.java test/java/org/apache/accumulo/core/util/shell/ShellTest.java
Date Fri, 22 Mar 2013 14:21:34 GMT
Author: ecn
Date: Fri Mar 22 14:21:33 2013
New Revision: 1459793

URL: http://svn.apache.org/r1459793
Log:
ACCUMULO-1196 applying Kevin Faro's patch to make du context-aware

Modified:
    accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DUCommand.java
    accumulo/branches/1.5/core/src/test/java/org/apache/accumulo/core/util/shell/ShellTest.java

Modified: accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DUCommand.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DUCommand.java?rev=1459793&r1=1459792&r2=1459793&view=diff
==============================================================================
--- accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DUCommand.java
(original)
+++ accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/util/shell/commands/DUCommand.java
Fri Mar 22 14:21:33 2013
@@ -47,6 +47,9 @@ public class DUCommand extends Command {
           tablesToFlush.add(table);
         }
       }
+    } else {
+      shellState.checkTableState();
+      tablesToFlush.add(shellState.getTableName());
     }
     try {
       final AccumuloConfiguration acuConf = new ConfigurationCopy(shellState.getConnector().instanceOperations().getSystemConfiguration());

Modified: accumulo/branches/1.5/core/src/test/java/org/apache/accumulo/core/util/shell/ShellTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/core/src/test/java/org/apache/accumulo/core/util/shell/ShellTest.java?rev=1459793&r1=1459792&r2=1459793&view=diff
==============================================================================
--- accumulo/branches/1.5/core/src/test/java/org/apache/accumulo/core/util/shell/ShellTest.java
(original)
+++ accumulo/branches/1.5/core/src/test/java/org/apache/accumulo/core/util/shell/ShellTest.java
Fri Mar 22 14:21:33 2013
@@ -166,6 +166,14 @@ public class ShellTest {
   }
   
   @Test
+  public void duContextTest() throws Exception {
+    Shell.log.debug("Starting du context test --------------------------");
+    exec("createtable t", true);
+    exec("du", true, "0 [t]");
+    exec("deletetable t -f", true, "Table: [t] has been deleted");
+  }
+
+  @Test
   public void duTest() throws IOException {
     Shell.log.debug("Starting DU test --------------------------");
     exec("createtable t", true);



Mime
View raw message