This is an automated email from the ASF dual-hosted git repository.

edcoleman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo.git

commit a6b72c5ae7f704fdeb683929667fc7c6b0e79b3b
Author: Ed Coleman <d...@etcoleman.com>
AuthorDate: Thu Aug 15 16:57:41 2019 -0400

    Merge 1.9 into 2.0
---
 .../shell/commands/ImportDirectoryCommand.java     |  8 ++++----
 .../shell/commands/ImportDirectoryCommandTest.java | 22 +++++++++++-----------
 .../org/apache/accumulo/test/ShellServerIT.java    |  1 -
 3 files changed, 15 insertions(+), 16 deletions(-)

diff --git 
a/shell/src/main/java/org/apache/accumulo/shell/commands/ImportDirectoryCommand.java
 
b/shell/src/main/java/org/apache/accumulo/shell/commands/ImportDirectoryCommand.java
index ac5a30f..5decaed 100644
--- 
a/shell/src/main/java/org/apache/accumulo/shell/commands/ImportDirectoryCommand.java
+++ 
b/shell/src/main/java/org/apache/accumulo/shell/commands/ImportDirectoryCommand.java
@@ -51,8 +51,8 @@ public class ImportDirectoryCommand extends Command {
     // new bulk import only takes 2 args
     if (args.length == 2) {
       setTime = Boolean.parseBoolean(cl.getArgs()[1]);
-      shellState.getAccumuloClient().tableOperations().importDirectory(dir)
-          .to(tableName).tableTime(setTime).load();
+      
shellState.getAccumuloClient().tableOperations().importDirectory(dir).to(tableName)
+          .tableTime(setTime).load();
     } else if (args.length == 3) {
       // warn using deprecated bulk import
       Shell.log.warn(
@@ -60,8 +60,8 @@ public class ImportDirectoryCommand extends Command {
               + "as an argument.");
       String failureDir = args[1];
       setTime = Boolean.parseBoolean(cl.getArgs()[2]);
-      
shellState.getAccumuloClient().tableOperations().importDirectory(tableName,
-          dir, failureDir, setTime);
+      
shellState.getAccumuloClient().tableOperations().importDirectory(tableName, 
dir, failureDir,
+          setTime);
       return 0;
     } else {
       shellState.printException(
diff --git 
a/shell/src/test/java/org/apache/accumulo/shell/commands/ImportDirectoryCommandTest.java
 
b/shell/src/test/java/org/apache/accumulo/shell/commands/ImportDirectoryCommandTest.java
index c819d6c..963d919 100644
--- 
a/shell/src/test/java/org/apache/accumulo/shell/commands/ImportDirectoryCommandTest.java
+++ 
b/shell/src/test/java/org/apache/accumulo/shell/commands/ImportDirectoryCommandTest.java
@@ -18,7 +18,7 @@ package org.apache.accumulo.shell.commands;
 
 import static org.easymock.EasyMock.expectLastCall;
 
-import org.apache.accumulo.core.client.Connector;
+import org.apache.accumulo.core.client.AccumuloClient;
 import org.apache.accumulo.core.client.admin.TableOperations;
 import org.apache.accumulo.shell.Shell;
 import org.apache.commons.cli.CommandLine;
@@ -30,7 +30,7 @@ public class ImportDirectoryCommandTest {
 
   private ImportDirectoryCommand cmd;
 
-  private Connector conn;
+  private AccumuloClient client;
   private CommandLine cli;
   private Shell shellState;
   private TableOperations tableOperations;
@@ -42,7 +42,7 @@ public class ImportDirectoryCommandTest {
     // Initialize that internal state
     cmd.getOptions();
 
-    conn = EasyMock.createMock(Connector.class);
+    client = EasyMock.createMock(AccumuloClient.class);
     cli = EasyMock.createMock(CommandLine.class);
     shellState = EasyMock.createMock(Shell.class);
     tableOperations = EasyMock.createMock(TableOperations.class);
@@ -68,19 +68,19 @@ public class ImportDirectoryCommandTest {
     EasyMock.expect(cli.getArgs()).andReturn(cliArgs);
     EasyMock.expect(cli.getArgs()).andReturn(cliArgs);
 
-    EasyMock.expect(shellState.getConnector()).andReturn(conn);
+    EasyMock.expect(shellState.getAccumuloClient()).andReturn(client);
     EasyMock.expect(shellState.getTableName()).andReturn("tablename");
 
     shellState.checkTableState();
     expectLastCall().andVoid();
 
     // Table exists
-    EasyMock.expect(conn.tableOperations()).andReturn(tableOperations);
+    EasyMock.expect(client.tableOperations()).andReturn(tableOperations);
 
     tableOperations.importDirectory("tablename", "in_dir", "fail_dir", false);
     expectLastCall().times(3);
 
-    EasyMock.replay(conn, cli, shellState, tableOperations);
+    EasyMock.replay(client, cli, shellState, tableOperations);
 
     cmd.execute("importdirectory in_dir fail_dir false", cli, shellState);
 
@@ -104,25 +104,25 @@ public class ImportDirectoryCommandTest {
     EasyMock.expect(cli.getOptionValue("t")).andReturn("passedName");
 
     EasyMock.expect(tableOperations.exists("passedName")).andReturn(true);
-    EasyMock.expect(shellState.getConnector()).andReturn(conn);
-    EasyMock.expect(conn.tableOperations()).andReturn(tableOperations);
+    EasyMock.expect(shellState.getAccumuloClient()).andReturn(client);
+    EasyMock.expect(client.tableOperations()).andReturn(tableOperations);
 
     EasyMock.expect(cli.getArgs()).andReturn(cliArgs);
     EasyMock.expect(cli.getArgs()).andReturn(cliArgs);
     EasyMock.expect(cli.getArgs()).andReturn(cliArgs);
 
-    EasyMock.expect(shellState.getConnector()).andReturn(conn);
+    EasyMock.expect(shellState.getAccumuloClient()).andReturn(client);
 
     shellState.checkTableState();
     expectLastCall().andVoid();
 
     // Table exists
-    EasyMock.expect(conn.tableOperations()).andReturn(tableOperations);
+    EasyMock.expect(client.tableOperations()).andReturn(tableOperations);
 
     tableOperations.importDirectory("passedName", "in_dir", "fail_dir", false);
     expectLastCall().times(3);
 
-    EasyMock.replay(conn, cli, shellState, tableOperations);
+    EasyMock.replay(client, cli, shellState, tableOperations);
 
     cmd.execute("importdirectory in_dir fail_dir false", cli, shellState);
 
diff --git a/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java 
b/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
index 1f6e203..a185fd2 100644
--- a/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/ShellServerIT.java
@@ -1926,7 +1926,6 @@ public class ShellServerIT extends SharedMiniClusterBase {
     ts.exec("deletetable -f " + table);
   }
 
-
   /**
    * Validate importdirectory command accepts addinig -t tablename option or 
the accepts original
    * format that uses the current working table. Currently this test does not 
validate the actual

Reply via email to