accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmil...@apache.org
Subject [accumulo] branch master updated: Rename new Bulk import API (#648)
Date Fri, 14 Sep 2018 22:25:15 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 576280a  Rename new Bulk import API (#648)
576280a is described below

commit 576280a4157207d7e8938d3f6ccb65464dd4b4c3
Author: Mike Miller <mmiller@apache.org>
AuthorDate: Fri Sep 14 18:25:10 2018 -0400

    Rename new Bulk import API (#648)
    
    * Also added an example for importDirectory fluent API
---
 .../core/client/admin/TableOperations.java         | 31 +++++++++++++---------
 .../accumulo/core/client/impl/BulkImport.java      | 26 +++++++++---------
 .../core/client/impl/TableOperationsImpl.java      |  4 +--
 .../accumulo/core/client/rfile/RFileWriter.java    |  2 +-
 .../apache/accumulo/core/conf/ClientProperty.java  |  4 +--
 .../org/apache/accumulo/core/data/LoadPlan.java    |  4 +--
 .../org/apache/accumulo/proxy/ProxyServer.java     |  6 ++---
 .../shell/commands/ImportDirectoryCommand.java     |  4 +--
 .../org/apache/accumulo/test/AuditMessageIT.java   |  4 +--
 .../accumulo/test/BulkImportSequentialRowsIT.java  |  2 +-
 .../org/apache/accumulo/test/NamespacesIT.java     |  2 +-
 .../accumulo/test/functional/BulkFileIT.java       |  2 +-
 .../apache/accumulo/test/functional/BulkIT.java    |  2 +-
 .../accumulo/test/functional/BulkLoadIT.java       | 18 ++++++-------
 .../test/functional/BulkSplitOptimizationIT.java   |  2 +-
 .../accumulo/test/functional/CompactionIT.java     |  2 +-
 16 files changed, 61 insertions(+), 54 deletions(-)

diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java
index 4de0abe..e18cc57 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java
@@ -612,7 +612,7 @@ public interface TableOperations {
    * @throws TableNotFoundException
    *           when the table no longer exists
    *
-   * @deprecated since 2.0.0 use {@link #addFilesTo(String)} instead.
+   * @deprecated since 2.0.0 use {@link #importDirectory(String)} instead.
    */
   @Deprecated
   void importDirectory(String tableName, String dir, String failureDir, boolean setTime)
@@ -629,7 +629,7 @@ public interface TableOperations {
      *
      * @see NewTableConfiguration#setTimeType(TimeType)
      */
-    ImportDestinationOptions tableTime();
+    ImportMappingOptions tableTime();
 
     /**
      * Loads the files into the table.
@@ -639,9 +639,11 @@ public interface TableOperations {
   }
 
   /**
+   * Options giving control of how the bulk import file mapping is done.
+   *
    * @since 2.0.0
    */
-  interface ImportDestinationOptions extends ImportOptions {
+  interface ImportMappingOptions extends ImportOptions {
 
     /**
      * This is the default number of threads used to determine where to load files. A suffix
of
@@ -662,7 +664,7 @@ public interface TableOperations {
      * Files are examined to determine where to load them. This examination is done in the
current
      * process using multiple threads. If this method is not called, then the client property
      * {@code bulk.threads} is used to create a thread pool. This property defaults to
-     * {@value ImportDestinationOptions#BULK_LOAD_THREADS_DEFAULT}.
+     * {@value ImportMappingOptions#BULK_LOAD_THREADS_DEFAULT}.
      *
      * @param service
      *          Use this executor to run file examination task
@@ -675,7 +677,7 @@ public interface TableOperations {
      * Files are examined to determine where to load them. This examination is done in the
current
      * process using multiple threads. If this method is not called, then the client property
      * {@code bulk.threads} is used to create a thread pool. This property defaults to
-     * {@value org.apache.accumulo.core.client.admin.TableOperations.ImportDestinationOptions#BULK_LOAD_THREADS_DEFAULT}.
+     * {@value ImportMappingOptions#BULK_LOAD_THREADS_DEFAULT}.
      *
      * @param numThreads
      *          Create a thread pool with this many thread to run file examination task.
@@ -686,30 +688,35 @@ public interface TableOperations {
   /**
    * @since 2.0.0
    */
-  interface ImportSourceArguments {
+  interface ImportDestinationArguments {
     /**
      *
-     * @param directory
-     *          Load files from this directory
+     * @param tableName
+     *          Import files to this tableName
      */
-    ImportDestinationOptions from(String directory);
+    ImportMappingOptions to(String tableName);
   }
 
   /**
    * Bulk import the files in a directory into a table. Files can be created using
    * {@code AccumuloFileOutputFormat} and {@link RFile#newWriter()}.
-   *
    * <p>
    * This new method of bulk import examines files in the current process outside of holding
a table
    * lock. The old bulk import method ({@link #importDirectory(String, String, String, boolean)})
    * examines files on the server side while holding a table read lock.
-   *
    * <p>
    * This API supports adding files to online and offline tables.
+   * <p>
+   * For example, to bulk import files from the directory 'dir1' into the table 'table1'
use the
+   * following code.
+   *
+   * <pre>
+   * client.tableOperations().importDirectory("dir1").to("table1").load();
+   * </pre>
    *
    * @since 2.0.0
    */
-  default ImportSourceArguments addFilesTo(String tableName) {
+  default ImportDestinationArguments importDirectory(String directory) {
     throw new UnsupportedOperationException();
   }
 
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/BulkImport.java b/core/src/main/java/org/apache/accumulo/core/client/impl/BulkImport.java
index 7e9544c..8b6f01a 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/BulkImport.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/BulkImport.java
@@ -50,8 +50,8 @@ import org.apache.accumulo.core.client.NamespaceExistsException;
 import org.apache.accumulo.core.client.NamespaceNotFoundException;
 import org.apache.accumulo.core.client.TableExistsException;
 import org.apache.accumulo.core.client.TableNotFoundException;
-import org.apache.accumulo.core.client.admin.TableOperations.ImportDestinationOptions;
-import org.apache.accumulo.core.client.admin.TableOperations.ImportSourceArguments;
+import org.apache.accumulo.core.client.admin.TableOperations.ImportDestinationArguments;
+import org.apache.accumulo.core.client.admin.TableOperations.ImportMappingOptions;
 import org.apache.accumulo.core.client.impl.Bulk.FileInfo;
 import org.apache.accumulo.core.client.impl.Bulk.Files;
 import org.apache.accumulo.core.client.impl.Table.ID;
@@ -84,27 +84,27 @@ import com.google.common.cache.Cache;
 import com.google.common.cache.CacheBuilder;
 import com.google.common.collect.Sets;
 
-public class BulkImport implements ImportSourceArguments, ImportDestinationOptions {
+public class BulkImport implements ImportDestinationArguments, ImportMappingOptions {
 
   private static final Logger log = LoggerFactory.getLogger(BulkImport.class);
 
   private boolean setTime = false;
   private Executor executor = null;
-  private String dir;
+  private final String dir;
   private int numThreads = -1;
 
   private final ClientContext context;
-  private final String tableName;
+  private String tableName;
 
   private LoadPlan plan = null;
 
-  BulkImport(String tableName, ClientContext context) {
+  BulkImport(String directory, ClientContext context) {
     this.context = context;
-    this.tableName = Objects.requireNonNull(tableName);
+    this.dir = Objects.requireNonNull(directory);
   }
 
   @Override
-  public ImportDestinationOptions tableTime() {
+  public ImportMappingOptions tableTime() {
     this.setTime = true;
     return this;
   }
@@ -170,13 +170,13 @@ public class BulkImport implements ImportSourceArguments, ImportDestinationOptio
   }
 
   @Override
-  public ImportDestinationOptions executor(Executor service) {
+  public ImportMappingOptions executor(Executor service) {
     this.executor = Objects.requireNonNull(service);
     return this;
   }
 
   @Override
-  public ImportDestinationOptions threads(int numThreads) {
+  public ImportMappingOptions threads(int numThreads) {
     Preconditions.checkArgument(numThreads > 0, "Non positive number of threads given
: %s",
         numThreads);
     this.numThreads = numThreads;
@@ -184,14 +184,14 @@ public class BulkImport implements ImportSourceArguments, ImportDestinationOptio
   }
 
   @Override
-  public ImportDestinationOptions plan(LoadPlan plan) {
+  public ImportMappingOptions plan(LoadPlan plan) {
     this.plan = plan;
     return this;
   }
 
   @Override
-  public ImportDestinationOptions from(String directory) {
-    this.dir = Objects.requireNonNull(directory);
+  public ImportMappingOptions to(String tableName) {
+    this.tableName = Objects.requireNonNull(tableName);
     return this;
   }
 
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
b/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
index 1cbd2ab..82846a2 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
@@ -1949,7 +1949,7 @@ public class TableOperationsImpl extends TableOperationsHelper {
   }
 
   @Override
-  public ImportSourceArguments addFilesTo(String tableName) {
-    return new BulkImport(tableName, context);
+  public ImportDestinationArguments importDirectory(String directory) {
+    return new BulkImport(directory, context);
   }
 }
diff --git a/core/src/main/java/org/apache/accumulo/core/client/rfile/RFileWriter.java b/core/src/main/java/org/apache/accumulo/core/client/rfile/RFileWriter.java
index e466a09..8b05088 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/rfile/RFileWriter.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/rfile/RFileWriter.java
@@ -37,7 +37,7 @@ import com.google.common.base.Preconditions;
 
 /**
  * This class provides an API for writing RFiles. It can be used to create file for bulk
import into
- * Accumulo using {@link TableOperations#addFilesTo(String)}
+ * Accumulo using {@link TableOperations#importDirectory(String)}
  *
  * <p>
  * A RFileWriter has the following constraints. Violating these constraints will result in
runtime
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/ClientProperty.java b/core/src/main/java/org/apache/accumulo/core/conf/ClientProperty.java
index a5229f6..f2fd9d8 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/ClientProperty.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/ClientProperty.java
@@ -25,7 +25,7 @@ import java.util.Objects;
 import java.util.Properties;
 
 import org.apache.accumulo.core.Constants;
-import org.apache.accumulo.core.client.admin.TableOperations.ImportDestinationOptions;
+import org.apache.accumulo.core.client.admin.TableOperations.ImportMappingOptions;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.client.security.tokens.CredentialProviderToken;
 import org.apache.accumulo.core.client.security.tokens.DelegationToken;
@@ -71,7 +71,7 @@ public enum ClientProperty {
       "Number of concurrent query threads to spawn for querying"),
 
   // Bulk load
-  BULK_LOAD_THREADS("bulk.threads", ImportDestinationOptions.BULK_LOAD_THREADS_DEFAULT,
+  BULK_LOAD_THREADS("bulk.threads", ImportMappingOptions.BULK_LOAD_THREADS_DEFAULT,
       "The number of threads used to inspect bulk load files to determine where files go.
 "
           + "If the value ends with C, then it will be multiplied by the number of cores
on the "
           + "system. This property is only used by the bulk import API introduced in 2.0.0."),
diff --git a/core/src/main/java/org/apache/accumulo/core/data/LoadPlan.java b/core/src/main/java/org/apache/accumulo/core/data/LoadPlan.java
index 58dfabf..be5910a 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/LoadPlan.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/LoadPlan.java
@@ -21,7 +21,7 @@ import java.nio.file.Paths;
 import java.util.Arrays;
 import java.util.Collection;
 
-import org.apache.accumulo.core.client.admin.TableOperations.ImportDestinationOptions;
+import org.apache.accumulo.core.client.admin.TableOperations.ImportMappingOptions;
 import org.apache.hadoop.io.Text;
 
 import com.google.common.base.Preconditions;
@@ -31,7 +31,7 @@ import com.google.common.primitives.UnsignedBytes;
 /**
  * Information about where to load files into an Accumulo table.
  *
- * @see ImportDestinationOptions#plan(LoadPlan)
+ * @see ImportMappingOptions#plan(LoadPlan)
  * @since 2.0.0
  */
 public class LoadPlan {
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/ProxyServer.java b/proxy/src/main/java/org/apache/accumulo/proxy/ProxyServer.java
index 9a7caa7..7f964cb 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/ProxyServer.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/ProxyServer.java
@@ -59,7 +59,7 @@ import org.apache.accumulo.core.client.admin.ActiveCompaction;
 import org.apache.accumulo.core.client.admin.ActiveScan;
 import org.apache.accumulo.core.client.admin.CompactionConfig;
 import org.apache.accumulo.core.client.admin.NewTableConfiguration;
-import org.apache.accumulo.core.client.admin.TableOperations.ImportDestinationOptions;
+import org.apache.accumulo.core.client.admin.TableOperations.ImportMappingOptions;
 import org.apache.accumulo.core.client.admin.TimeType;
 import org.apache.accumulo.core.client.impl.ClientConfConverter;
 import org.apache.accumulo.core.client.impl.Credentials;
@@ -1765,8 +1765,8 @@ public class ProxyServer implements AccumuloProxy.Iface {
       org.apache.accumulo.proxy.thrift.AccumuloException,
       org.apache.accumulo.proxy.thrift.AccumuloSecurityException, TException {
     try {
-      ImportDestinationOptions loader = getConnector(login).tableOperations().addFilesTo(tableName)
-          .from(importDir);
+      ImportMappingOptions loader = getConnector(login).tableOperations().importDirectory(importDir)
+          .to(tableName);
       if (setTime) {
         loader.tableTime().load();
       } else {
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 9b01c76..6727c28 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
@@ -49,8 +49,8 @@ public class ImportDirectoryCommand extends Command {
     // new bulk import only takes 2 args
     if (args.length == 2) {
       setTime = Boolean.parseBoolean(cl.getArgs()[1]);
-      TableOperations.ImportDestinationOptions bulk = shellState.getConnector().tableOperations()
-          .addFilesTo(shellState.getTableName()).from(dir);
+      TableOperations.ImportMappingOptions bulk = shellState.getConnector().tableOperations()
+          .importDirectory(dir).to(shellState.getTableName());
       if (setTime)
         bulk.tableTime().load();
       else
diff --git a/test/src/main/java/org/apache/accumulo/test/AuditMessageIT.java b/test/src/main/java/org/apache/accumulo/test/AuditMessageIT.java
index b98dda0..12b7259 100644
--- a/test/src/main/java/org/apache/accumulo/test/AuditMessageIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/AuditMessageIT.java
@@ -334,8 +334,8 @@ public class AuditMessageIT extends ConfigurableMacBase {
 
     // Now do a Directory (bulk) import of the same data.
     auditConnector.tableOperations().create(THIRD_TEST_TABLE_NAME);
-    auditConnector.tableOperations().addFilesTo(THIRD_TEST_TABLE_NAME)
-        .from(exportDirBulk.toString()).load();
+    auditConnector.tableOperations().importDirectory(exportDirBulk.toString())
+        .to(THIRD_TEST_TABLE_NAME).load();
     auditConnector.tableOperations().online(OLD_TEST_TABLE_NAME);
 
     // Stop testing activities here
diff --git a/test/src/main/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java b/test/src/main/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java
index 0ad0336..dc30609 100644
--- a/test/src/main/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java
@@ -96,7 +96,7 @@ public class BulkImportSequentialRowsIT extends AccumuloClusterHarness {
     // Then import a single rfile to all the tablets, hoping that we get a failure to import
because
     // of the balancer moving tablets around
     // and then we get to verify that the bug is actually fixed.
-    to.addFilesTo(tableName).from(bulk.toString()).load();
+    to.importDirectory(bulk.toString()).to(tableName).load();
 
     // The bug is that some tablets don't get imported into.
     assertEquals(NR * NV,
diff --git a/test/src/main/java/org/apache/accumulo/test/NamespacesIT.java b/test/src/main/java/org/apache/accumulo/test/NamespacesIT.java
index 2460071..6f59631 100644
--- a/test/src/main/java/org/apache/accumulo/test/NamespacesIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/NamespacesIT.java
@@ -1245,7 +1245,7 @@ public class NamespacesIT extends AccumuloClusterHarness {
             fail();
             break;
           case 18:
-            ops.addFilesTo(tableName).from("").load();
+            ops.importDirectory("").to(tableName).load();
             fail();
             break;
           case 19:
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/BulkFileIT.java b/test/src/main/java/org/apache/accumulo/test/functional/BulkFileIT.java
index 05ba141..6b8c646 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/BulkFileIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/BulkFileIT.java
@@ -78,7 +78,7 @@ public class BulkFileIT extends AccumuloClusterHarness {
     writeData(conf, aconf, fs, dir, "f2", 334, 999);
     writeData(conf, aconf, fs, dir, "f3", 1000, 1999);
 
-    c.tableOperations().addFilesTo(tableName).from(dir).load();
+    c.tableOperations().importDirectory(dir).to(tableName).load();
 
     FunctionalTestUtils.checkRFiles(c, tableName, 6, 6, 1, 1);
 
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/BulkIT.java b/test/src/main/java/org/apache/accumulo/test/functional/BulkIT.java
index a642198..5217cfc 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/BulkIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/BulkIT.java
@@ -134,7 +134,7 @@ public class BulkIT extends AccumuloClusterHarness {
       c.tableOperations().importDirectory(tableName, files.toString(), bulkFailures.toString(),
           false);
     } else {
-      c.tableOperations().addFilesTo(tableName).from(files.toString()).load();
+      c.tableOperations().importDirectory(files.toString()).to(tableName).load();
     }
 
   }
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/BulkLoadIT.java b/test/src/main/java/org/apache/accumulo/test/functional/BulkLoadIT.java
index a115385..15dab60 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/BulkLoadIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/BulkLoadIT.java
@@ -123,7 +123,7 @@ public class BulkLoadIT extends AccumuloClusterHarness {
 
     String h1 = writeData(dir + "/f1.", aconf, 0, 332);
 
-    c.tableOperations().addFilesTo(tableName).from(dir).load();
+    c.tableOperations().importDirectory(dir).to(tableName).load();
 
     if (offline)
       c.tableOperations().online(tableName);
@@ -153,7 +153,7 @@ public class BulkLoadIT extends AccumuloClusterHarness {
 
     String h1 = writeData(dir + "/f1.", aconf, 0, 333);
 
-    c.tableOperations().addFilesTo(tableName).from(dir).load();
+    c.tableOperations().importDirectory(dir).to(tableName).load();
 
     if (offline)
       c.tableOperations().online(tableName);
@@ -185,7 +185,7 @@ public class BulkLoadIT extends AccumuloClusterHarness {
     FsPermission originalPerms = fs.getFileStatus(rFilePath).getPermission();
     fs.setPermission(rFilePath, FsPermission.valueOf("----------"));
     try {
-      c.tableOperations().addFilesTo(tableName).from(dir).load();
+      c.tableOperations().importDirectory(dir).to(tableName).load();
     } catch (Exception e) {
       Throwable cause = e.getCause();
       if (!(cause instanceof FileNotFoundException)
@@ -198,7 +198,7 @@ public class BulkLoadIT extends AccumuloClusterHarness {
     originalPerms = fs.getFileStatus(new Path(dir)).getPermission();
     fs.setPermission(new Path(dir), FsPermission.valueOf("dr--r--r--"));
     try {
-      c.tableOperations().addFilesTo(tableName).from(dir).load();
+      c.tableOperations().importDirectory(dir).to(tableName).load();
     } catch (AccumuloException ae) {
       if (!(ae.getCause() instanceof FileNotFoundException))
         fail("Expected FileNotFoundException but threw " + ae.getCause());
@@ -245,9 +245,9 @@ public class BulkLoadIT extends AccumuloClusterHarness {
           .loadFileTo("f2.rf", RangeType.TABLE, row(333), row(999))
           .loadFileTo("f3.rf", RangeType.FILE, row(1000), row(1499))
           .loadFileTo("f4.rf", RangeType.FILE, row(1500), row(1999)).build();
-      c.tableOperations().addFilesTo(tableName).from(dir).plan(loadPlan).load();
+      c.tableOperations().importDirectory(dir).to(tableName).plan(loadPlan).load();
     } else {
-      c.tableOperations().addFilesTo(tableName).from(dir).load();
+      c.tableOperations().importDirectory(dir).to(tableName).load();
     }
 
     if (offline)
@@ -292,7 +292,7 @@ public class BulkLoadIT extends AccumuloClusterHarness {
         .loadFileTo("f2.rf", RangeType.TABLE, null, row(666))
         .loadFileTo("f3.rf", RangeType.TABLE, null, row(666)).build();
     try {
-      c.tableOperations().addFilesTo(tableName).from(dir).plan(loadPlan).load();
+      c.tableOperations().importDirectory(dir).to(tableName).plan(loadPlan).load();
       fail();
     } catch (IllegalArgumentException e) {
       // ignore
@@ -301,7 +301,7 @@ public class BulkLoadIT extends AccumuloClusterHarness {
     // Create a plan with less files than exists in dir
     loadPlan = LoadPlan.builder().loadFileTo("f1.rf", RangeType.TABLE, null, row(333)).build();
     try {
-      c.tableOperations().addFilesTo(tableName).from(dir).plan(loadPlan).load();
+      c.tableOperations().importDirectory(dir).to(tableName).plan(loadPlan).load();
       fail();
     } catch (IllegalArgumentException e) {
       // ignore
@@ -311,7 +311,7 @@ public class BulkLoadIT extends AccumuloClusterHarness {
     loadPlan = LoadPlan.builder().loadFileTo("f1.rf", RangeType.TABLE, null, row(555))
         .loadFileTo("f2.rf", RangeType.TABLE, null, row(555)).build();
     try {
-      c.tableOperations().addFilesTo(tableName).from(dir).plan(loadPlan).load();
+      c.tableOperations().importDirectory(dir).to(tableName).plan(loadPlan).load();
       fail();
     } catch (AccumuloException e) {
       // ignore
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/BulkSplitOptimizationIT.java
b/test/src/main/java/org/apache/accumulo/test/functional/BulkSplitOptimizationIT.java
index b17d7a8..7bf321e 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/BulkSplitOptimizationIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/BulkSplitOptimizationIT.java
@@ -92,7 +92,7 @@ public class BulkSplitOptimizationIT extends AccumuloClusterHarness {
     FileStatus[] stats = fs.listStatus(testDir);
 
     System.out.println("Number of generated files: " + stats.length);
-    c.tableOperations().addFilesTo(tableName).from(testDir.toString()).load();
+    c.tableOperations().importDirectory(testDir.toString()).to(tableName).load();
     FunctionalTestUtils.checkSplits(c, tableName, 0, 0);
     FunctionalTestUtils.checkRFiles(c, tableName, 1, 1, 100, 100);
 
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/CompactionIT.java b/test/src/main/java/org/apache/accumulo/test/functional/CompactionIT.java
index 4989976..f4a879b 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/CompactionIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/CompactionIT.java
@@ -114,7 +114,7 @@ public class CompactionIT extends AccumuloClusterHarness {
     Path testrf = new Path(root, "testrf");
     FunctionalTestUtils.createRFiles(c, fs, testrf.toString(), 500000, 59, 4);
 
-    c.tableOperations().addFilesTo(tableName).from(testrf.toString()).load();
+    c.tableOperations().importDirectory(testrf.toString()).to(tableName).load();
     int beforeCount = countFiles(c);
 
     final AtomicBoolean fail = new AtomicBoolean(false);


Mime
View raw message