keith-turner commented on a change in pull request #743: New MapReduce API
URL: https://github.com/apache/accumulo/pull/743#discussion_r230077383
##########
File path:
hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoop/mapreduce/AccumuloInputFormat.java
##########
@@ -17,52 +17,41 @@
package org.apache.accumulo.hadoop.mapreduce;
import java.io.IOException;
+import java.util.Collection;
import java.util.Map.Entry;
+import java.util.stream.Collectors;
-import org.apache.accumulo.core.client.ClientInfo;
+import org.apache.accumulo.core.client.IteratorSetting;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Value;
-import org.apache.accumulo.core.security.Authorizations;
+import org.apache.accumulo.core.util.Pair;
import org.apache.accumulo.core.util.format.DefaultFormatter;
-import org.apache.hadoop.mapreduce.InputFormat;
+import org.apache.accumulo.hadoopImpl.mapreduce.InputFormatBase;
+import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.InputSplit;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.RecordReader;
import org.apache.hadoop.mapreduce.TaskAttemptContext;
-import org.apache.log4j.Level;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* This class allows MapReduce jobs to use Accumulo as the source of data.
This {@link InputFormat}
* provides keys and values of type {@link Key} and {@link Value} to the Map
function.
*
- * The user must specify the following via static configurator methods:
+ * The user must specify the following via static configurator method:
*
* <ul>
- * <li>{@link AccumuloInputFormat#setClientInfo(Job, ClientInfo)}
- * <li>{@link AccumuloInputFormat#setInputTableName(Job, String)}
- * <li>{@link AccumuloInputFormat#setScanAuthorizations(Job, Authorizations)}
+ * <li>{@link AccumuloInputFormat#setInfo(Job, InputInfo)}
* </ul>
*
- * Other static methods are optional.
+ * For required parameters and all available options use {@link
InputInfo#builder()}
*/
public class AccumuloInputFormat extends InputFormatBase<Key,Value> {
Review comment:
Extending InputFormatBase pulls all of the protected methods in
InputFormatBase into the public API. Instead of extending it, the
implementation could call the static methods directly. For example in
`setInfo()` could do `InputFormatBase.setClientInfo(job, info.getClientInfo());`
----------------------------------------------------------------
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