keith-turner commented on a change in pull request #436: ACCUMULO-4813 New bulk
import process and API
URL: https://github.com/apache/accumulo/pull/436#discussion_r183090023
##########
File path:
core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java
##########
@@ -619,6 +620,63 @@ void setLocalityGroups(String tableName,
Map<String,Set<Text>> groups)
void importDirectory(String tableName, String dir, String failureDir,
boolean setTime)
throws TableNotFoundException, IOException, AccumuloException,
AccumuloSecurityException;
+ /**
+ * @since 2.0.0
+ */
+ public static interface ImportSourceOptions {
+ ImportSourceOptions settingLogicalTime();
+
+ void load()
+ throws TableNotFoundException, IOException, AccumuloException,
AccumuloSecurityException;
+ }
+
+ /**
+ * @since 2.0.0
+ */
+ public static interface ImportExecutorOptions extends ImportSourceOptions {
+ /**
+ * Files need must be inspected to determine what tablets they go to. This
inspection is done in
+ * the current process. If this property is not set, then the client
property
+ * {@code bulk.threads} is used to create a thread pool.
+ *
+ * @param service
+ * Use this executor to run file inspection task
+ * @return ImportSourceOptions
+ */
+ ImportSourceOptions usingExecutor(Executor service);
+
+ /**
+ * Files need must be inspected to determine what tablets they go to. This
inspection is done in
+ * the current process. If this property is not set, then the client
property
+ * {@code bulk.threads} is used to create a thread pool.
+ *
+ * @param numThreads
+ * Create a thread pool with this many thread to run file
inspection task.
+ * @return ImportSourceOptions
+ */
+ ImportSourceOptions usingThreads(int numThreads);
+ }
+
+ /**
+ * @since 2.0.0
+ */
+ public static interface ImportSourceArguments {
+ /**
+ *
+ * @param directory
+ * Load files from this directory
+ * @return ImportSourceOptions
+ */
+ ImportSourceOptions from(String directory);
Review comment:
I think this should return ImportExecutorOptions
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services