accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] keith-turner commented on a change in pull request #765: MR Improvements Closes #753 #751
Date Wed, 21 Nov 2018 18:35:15 GMT
keith-turner commented on a change in pull request #765: MR Improvements Closes #753 #751
URL: https://github.com/apache/accumulo/pull/765#discussion_r235493083
 
 

 ##########
 File path: hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoop/mapreduce/OutputFormatBuilder.java
 ##########
 @@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.accumulo.hadoop.mapreduce;
+
+import java.util.Properties;
+
+import org.apache.accumulo.core.client.ClientInfo;
+
+/**
+ * Builder for all the information needed for the Map Reduce job. Fluent API used by
+ * {@link AccumuloOutputFormat#configure()}
+ *
+ * @since 2.0
+ */
+public interface OutputFormatBuilder {
+
+  /**
+   * Required params for client
+   *
+   * @since 2.0
+   */
+  interface ClientParams<T> {
+    /**
+     * Set the connection information needed to communicate with Accumulo in this job. ClientInfo
+     * param can be created using {@link ClientInfo#from(Properties)}
+     *
+     * @param clientInfo
+     *          Accumulo connection information
+     */
+    OutputOptions<T> clientInfo(ClientInfo clientInfo);
+  }
+
+  /**
+   * Builder options
+   *
+   * @since 2.0
+   */
+  interface OutputOptions<T> {
+    /**
+     * Sets the default table name to use if one emits a null in place of a table name for
a given
+     * mutation. Table names can only be alpha-numeric and underscores.
+     *
+     * @param tableName
+     *          the table to use when the tablename is null in the write call
+     */
+    OutputOptions<T> defaultTableName(String tableName);
+
+    /**
+     * Enables the directive to create new tables, as necessary. Table names can only be
+     * alpha-numeric and underscores.
+     * <p>
+     * By default, this feature is <b>disabled</b>.
+     */
+    OutputOptions<T> enableCreateTables();
+
+    /**
+     * Enables the directive to use simulation mode for this job. In simulation mode, no
output is
+     * produced. This is useful for testing.
+     * <p>
+     * By default, this feature is <b>disabled</b>.
+     */
+    OutputOptions<T> enableSimulationMode();
 
 Review comment:
   Didn't see test for this.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message