mikewalch commented on a change in pull request #20: Update bulkIngest example.
Fixes #17
URL: https://github.com/apache/accumulo-examples/pull/20#discussion_r180571289
##########
File path:
src/main/java/org/apache/accumulo/examples/mapreduce/bulk/VerifyIngest.java
##########
@@ -27,37 +27,25 @@
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Range;
import org.apache.accumulo.core.data.Value;
-import org.apache.accumulo.examples.cli.ClientOnRequiredTable;
+import org.apache.accumulo.core.security.Authorizations;
import org.apache.hadoop.io.Text;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.beust.jcommander.Parameter;
-
public class VerifyIngest {
private static final Logger log =
LoggerFactory.getLogger(VerifyIngest.class);
- static class Opts extends ClientOnRequiredTable {
- @Parameter(names = "--start-row")
- int startRow = 0;
- @Parameter(names = "--count", required = true, description = "number of
rows to verify")
- int numRows = 0;
- }
-
public static void main(String[] args) throws AccumuloException,
AccumuloSecurityException, TableNotFoundException {
- Opts opts = new Opts();
- opts.parseArgs(VerifyIngest.class.getName(), args);
-
- Connector connector = opts.getConnector();
- Scanner scanner = connector.createScanner(opts.getTableName(), opts.auths);
+ Connector connector =
Connector.builder().usingProperties("conf/accumulo-client.properties").build();
+ Scanner scanner = connector.createScanner(SetupTable.tableName,
Authorizations.EMPTY);
- scanner.setRange(new Range(new Text(String.format("row_%010d",
opts.startRow)), null));
+ scanner.setRange(new Range(new Text(String.format("row_%010d", 0)), null));
Review comment:
Could avoid using Text here
----------------------------------------------------------------
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