You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2018/03/26 15:02:34 UTC

[GitHub] keith-turner commented on a change in pull request #11: Fixes #10 - Update helloworld example to new Connector builder

keith-turner commented on a change in pull request #11: Fixes #10 - Update helloworld example to new Connector builder
URL: https://github.com/apache/accumulo-examples/pull/11#discussion_r177122018
 
 

 ##########
 File path: src/main/java/org/apache/accumulo/examples/helloworld/ReadData.java
 ##########
 @@ -27,52 +26,29 @@
 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.examples.cli.ScannerOpts;
+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;
-
 /**
- * Reads all data between two rows; all data after a given row; or all data in a table, depending on the number of arguments given.
+ * Reads all data between two rows
  */
 public class ReadData {
 
   private static final Logger log = LoggerFactory.getLogger(ReadData.class);
 
-  static class Opts extends ClientOnRequiredTable {
-    @Parameter(names = "--startKey")
-    String startKey;
-    @Parameter(names = "--endKey")
-    String endKey;
-  }
-
   public static void main(String[] args) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
-    Opts opts = new Opts();
-    ScannerOpts scanOpts = new ScannerOpts();
-    opts.parseArgs(ReadData.class.getName(), args, scanOpts);
-
-    Connector connector = opts.getConnector();
 
-    Scanner scan = connector.createScanner(opts.getTableName(), opts.auths);
 
 Review comment:
   Really nice to see so much code go away.

----------------------------------------------------------------
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