incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject svn commit: r1239397 - in /incubator/accumulo/branches/1.4: docs/examples/ src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/
Date Wed, 01 Feb 2012 23:11:38 GMT
Author: kturner
Date: Wed Feb  1 23:11:38 2012
New Revision: 1239397

URL: http://svn.apache.org/viewvc?rev=1239397&view=rev
Log:
ACCUMULO-277 made command line arguments for helloworld examples consistent with other example

Modified:
    incubator/accumulo/branches/1.4/docs/examples/README.helloworld
    incubator/accumulo/branches/1.4/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/InsertWithBatchWriter.java
    incubator/accumulo/branches/1.4/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/InsertWithOutputFormat.java
    incubator/accumulo/branches/1.4/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/ReadData.java

Modified: incubator/accumulo/branches/1.4/docs/examples/README.helloworld
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/docs/examples/README.helloworld?rev=1239397&r1=1239396&r2=1239397&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/docs/examples/README.helloworld (original)
+++ incubator/accumulo/branches/1.4/docs/examples/README.helloworld Wed Feb  1 23:11:38 2012
@@ -32,11 +32,11 @@ Create a table called 'hellotable':
 
 Launch a Java program that inserts data with a BatchWriter:
 
-    $ ./bin/accumulo org.apache.accumulo.examples.simple.helloworld.InsertWithBatchWriter
instance zookeepers hellotable username password
+    $ ./bin/accumulo org.apache.accumulo.examples.simple.helloworld.InsertWithBatchWriter
instance zookeepers username password hellotable 
 
 Alternatively, the same data can be inserted using MapReduce writers:
 
-    $ ./bin/accumulo org.apache.accumulo.examples.simple.helloworld.InsertWithOutputFormat
instance zookeepers hellotable username password
+    $ ./bin/accumulo org.apache.accumulo.examples.simple.helloworld.InsertWithOutputFormat
instance zookeepers username password hellotable 
 
 On the accumulo status page at the URL below (where 'master' is replaced with the name or
IP of your accumulo master), you should see 50K entries
 	
@@ -49,4 +49,4 @@ To view the entries, use the shell to sc
 
 You can also use a Java class to scan the table:
 
-    $ ./bin/accumulo org.apache.accumulo.examples.simple.helloworld.ReadData instance zookeepers
hellotable username password row_0 row_1001
+    $ ./bin/accumulo org.apache.accumulo.examples.simple.helloworld.ReadData instance zookeepers
username password hellotable row_0 row_1001

Modified: incubator/accumulo/branches/1.4/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/InsertWithBatchWriter.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/InsertWithBatchWriter.java?rev=1239397&r1=1239396&r2=1239397&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/InsertWithBatchWriter.java
(original)
+++ incubator/accumulo/branches/1.4/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/InsertWithBatchWriter.java
Wed Feb  1 23:11:38 2012
@@ -34,15 +34,15 @@ public class InsertWithBatchWriter {
       TableNotFoundException {
     if (args.length != 5) {
       System.out
-          .println("Usage: bin/tool.sh accumulo-examplesjar accumulo.examples.helloworld.InsertWithBatchWriter
<instance name> <zoo keepers> <tableName> <username> <password>");
+          .println("Usage: bin/tool.sh accumulo-examplesjar accumulo.examples.helloworld.InsertWithBatchWriter
<instance name> <zoo keepers> <username> <password> <tableName>");
       System.exit(1);
     }
     
     String instanceName = args[0];
     String zooKeepers = args[1];
-    String tableName = args[2];
-    String user = args[3];
-    byte[] pass = args[4].getBytes();
+    String user = args[2];
+    byte[] pass = args[3].getBytes();
+    String tableName = args[4];
     
     ZooKeeperInstance instance = new ZooKeeperInstance(instanceName, zooKeepers);
     Connector connector = instance.getConnector(user, pass);

Modified: incubator/accumulo/branches/1.4/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/InsertWithOutputFormat.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/InsertWithOutputFormat.java?rev=1239397&r1=1239396&r2=1239397&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/InsertWithOutputFormat.java
(original)
+++ incubator/accumulo/branches/1.4/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/InsertWithOutputFormat.java
Wed Feb  1 23:11:38 2012
@@ -38,14 +38,14 @@ public class InsertWithOutputFormat exte
   @Override
   public int run(String[] args) throws Exception {
     if (args.length != 5) {
-      System.out.println("Usage: accumulo " + this.getClass().getName() + " <instance
name> <zoo keepers> <tablename> <username> <password>");
+      System.out.println("Usage: accumulo " + this.getClass().getName() + " <instance
name> <zoo keepers> <username> <password> <tablename>");
       return 1;
     }
-    Text tableName = new Text(args[2]);
+    Text tableName = new Text(args[4]);
     Job job = new Job(getConf());
     Configuration conf = job.getConfiguration();
     AccumuloOutputFormat.setZooKeeperInstance(conf, args[0], args[1]);
-    AccumuloOutputFormat.setOutputInfo(conf, args[3], args[4].getBytes(), true, null);
+    AccumuloOutputFormat.setOutputInfo(conf, args[2], args[3].getBytes(), true, null);
     job.setOutputFormatClass(AccumuloOutputFormat.class);
     
     // when running a mapreduce, you won't need to instantiate the output

Modified: incubator/accumulo/branches/1.4/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/ReadData.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/ReadData.java?rev=1239397&r1=1239396&r2=1239397&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/ReadData.java
(original)
+++ incubator/accumulo/branches/1.4/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/helloworld/ReadData.java
Wed Feb  1 23:11:38 2012
@@ -35,15 +35,15 @@ public class ReadData {
   public static void main(String[] args) throws AccumuloException, AccumuloSecurityException,
TableNotFoundException {
     if (args.length < 5 || args.length > 7) {
       System.out
-          .println("bin/accumulo accumulo.examples.helloworld.ReadData <instance name>
<zoo keepers> <tablename> <username> <password> [startkey [endkey]]");
+          .println("bin/accumulo accumulo.examples.helloworld.ReadData <instance name>
<zoo keepers> <username> <password> <tablename> [startkey [endkey]]");
       System.exit(1);
     }
     
     String instanceName = args[0];
     String zooKeepers = args[1];
-    String tableName = args[2];
-    String user = args[3];
-    byte[] pass = args[4].getBytes();
+    String user = args[2];
+    byte[] pass = args[3].getBytes();
+    String tableName = args[4];
     
     ZooKeeperInstance instance = new ZooKeeperInstance(instanceName, zooKeepers);
     Connector connector = instance.getConnector(user, pass);



Mime
View raw message