accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r1454481 - in /accumulo/trunk: ./ examples/ examples/instamo/src/main/java/org/apache/accumulo/instamo/ examples/instamo/src/test/java/org/apache/accumulo/instamo/ examples/simple/src/test/java/org/apache/accumulo/examples/simple/dirlist/ e...
Date Fri, 08 Mar 2013 17:54:40 GMT
Author: vines
Date: Fri Mar  8 17:54:39 2013
New Revision: 1454481

URL: http://svn.apache.org/r1454481
Log:
ACCUMULO-1160 - some more cleaned up code



Modified:
    accumulo/trunk/   (props changed)
    accumulo/trunk/examples/   (props changed)
    accumulo/trunk/examples/instamo/src/main/java/org/apache/accumulo/instamo/AccumuloApp.java
    accumulo/trunk/examples/instamo/src/test/java/org/apache/accumulo/instamo/ExampleAccumuloUnitTest.java
    accumulo/trunk/examples/simple/src/test/java/org/apache/accumulo/examples/simple/dirlist/CountTest.java
    accumulo/trunk/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkInputFormatTest.java
    accumulo/trunk/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkInputStreamTest.java

Propchange: accumulo/trunk/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5:r1454166-1454422,1454424-1454480

Propchange: accumulo/trunk/examples/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/examples:r1453977-1453997,1453999-1454001,1454003-1454422,1454424-1454480

Modified: accumulo/trunk/examples/instamo/src/main/java/org/apache/accumulo/instamo/AccumuloApp.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/examples/instamo/src/main/java/org/apache/accumulo/instamo/AccumuloApp.java?rev=1454481&r1=1454480&r2=1454481&view=diff
==============================================================================
--- accumulo/trunk/examples/instamo/src/main/java/org/apache/accumulo/instamo/AccumuloApp.java
(original)
+++ accumulo/trunk/examples/instamo/src/main/java/org/apache/accumulo/instamo/AccumuloApp.java
Fri Mar  8 17:54:39 2013
@@ -25,18 +25,19 @@ import org.apache.accumulo.core.client.C
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.ZooKeeperInstance;
+import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
 
 public class AccumuloApp {
   
-  public static void run(String instanceName, String zookeepers, String rootPassword, String
args[]) throws Exception {
+  public static void run(String instanceName, String zookeepers, AuthenticationToken token,
String args[]) throws Exception {
     // edit this method to play with Accumulo
 
     Instance instance = new ZooKeeperInstance(instanceName, zookeepers);
     
-    Connector conn = instance.getConnector("root", rootPassword);
+    Connector conn = instance.getConnector("root", token);
     
     conn.tableOperations().create("foo");
     

Modified: accumulo/trunk/examples/instamo/src/test/java/org/apache/accumulo/instamo/ExampleAccumuloUnitTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/examples/instamo/src/test/java/org/apache/accumulo/instamo/ExampleAccumuloUnitTest.java?rev=1454481&r1=1454480&r2=1454481&view=diff
==============================================================================
--- accumulo/trunk/examples/instamo/src/test/java/org/apache/accumulo/instamo/ExampleAccumuloUnitTest.java
(original)
+++ accumulo/trunk/examples/instamo/src/test/java/org/apache/accumulo/instamo/ExampleAccumuloUnitTest.java
Fri Mar  8 17:54:39 2013
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.instamo;
 
+import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.test.MiniAccumuloCluster;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -45,7 +46,7 @@ public class ExampleAccumuloUnitTest {
 
   @Test(timeout = 30000)
   public void test() throws Exception {
-    AccumuloApp.run(accumulo.getInstanceName(), accumulo.getZooKeepers(), "superSecret",
new String[0]);
+    AccumuloApp.run(accumulo.getInstanceName(), accumulo.getZooKeepers(), new PasswordToken("superSecret"),
new String[0]);
   }
   
   @AfterClass

Modified: accumulo/trunk/examples/simple/src/test/java/org/apache/accumulo/examples/simple/dirlist/CountTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/examples/simple/src/test/java/org/apache/accumulo/examples/simple/dirlist/CountTest.java?rev=1454481&r1=1454480&r2=1454481&view=diff
==============================================================================
--- accumulo/trunk/examples/simple/src/test/java/org/apache/accumulo/examples/simple/dirlist/CountTest.java
(original)
+++ accumulo/trunk/examples/simple/src/test/java/org/apache/accumulo/examples/simple/dirlist/CountTest.java
Fri Mar  8 17:54:39 2013
@@ -29,6 +29,7 @@ import org.apache.accumulo.core.client.B
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.mock.MockInstance;
+import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.Authorizations;
@@ -40,7 +41,7 @@ import org.apache.hadoop.io.Text;
 public class CountTest extends TestCase {
   {
     try {
-      Connector conn = new MockInstance("counttest").getConnector("root", "".getBytes());
+      Connector conn = new MockInstance("counttest").getConnector("root", new PasswordToken(""));
       conn.tableOperations().create("dirlisttable");
       BatchWriter bw = conn.createBatchWriter("dirlisttable", new BatchWriterConfig());
       ColumnVisibility cv = new ColumnVisibility();
@@ -61,7 +62,7 @@ public class CountTest extends TestCase 
   }
   
   public void test() throws Exception {
-    Scanner scanner = new MockInstance("counttest").getConnector("root", "".getBytes()).createScanner("dirlisttable",
new Authorizations());
+    Scanner scanner = new MockInstance("counttest").getConnector("root", new PasswordToken("")).createScanner("dirlisttable",
new Authorizations());
     scanner.fetchColumn(new Text("dir"), new Text("counts"));
     assertFalse(scanner.iterator().hasNext());
     

Modified: accumulo/trunk/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkInputFormatTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkInputFormatTest.java?rev=1454481&r1=1454480&r2=1454481&view=diff
==============================================================================
--- accumulo/trunk/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkInputFormatTest.java
(original)
+++ accumulo/trunk/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkInputFormatTest.java
Fri Mar  8 17:54:39 2013
@@ -224,7 +224,7 @@ public class ChunkInputFormatTest extend
   
   public void test() throws Exception {
     MockInstance instance = new MockInstance("instance1");
-    Connector conn = instance.getConnector("root", "".getBytes());
+    Connector conn = instance.getConnector("root", new PasswordToken(""));
     conn.tableOperations().create("test");
     BatchWriter bw = conn.createBatchWriter("test", new BatchWriterConfig());
     
@@ -243,7 +243,7 @@ public class ChunkInputFormatTest extend
   
   public void testErrorOnNextWithoutClose() throws Exception {
     MockInstance instance = new MockInstance("instance2");
-    Connector conn = instance.getConnector("root", "".getBytes());
+    Connector conn = instance.getConnector("root", new PasswordToken(""));
     conn.tableOperations().create("test");
     BatchWriter bw = conn.createBatchWriter("test", new BatchWriterConfig());
     
@@ -263,7 +263,7 @@ public class ChunkInputFormatTest extend
   
   public void testInfoWithoutChunks() throws Exception {
     MockInstance instance = new MockInstance("instance3");
-    Connector conn = instance.getConnector("root", "".getBytes());
+    Connector conn = instance.getConnector("root", new PasswordToken(""));
     conn.tableOperations().create("test");
     BatchWriter bw = conn.createBatchWriter("test", new BatchWriterConfig());
     for (Entry<Key,Value> e : baddata) {

Modified: accumulo/trunk/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkInputStreamTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkInputStreamTest.java?rev=1454481&r1=1454480&r2=1454481&view=diff
==============================================================================
--- accumulo/trunk/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkInputStreamTest.java
(original)
+++ accumulo/trunk/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkInputStreamTest.java
Fri Mar  8 17:54:39 2013
@@ -32,6 +32,7 @@ import org.apache.accumulo.core.client.S
 import org.apache.accumulo.core.client.TableExistsException;
 import org.apache.accumulo.core.client.TableNotFoundException;
 import org.apache.accumulo.core.client.mock.MockInstance;
+import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.KeyValue;
 import org.apache.accumulo.core.data.Mutation;
@@ -221,7 +222,7 @@ public class ChunkInputStreamTest extend
   }
   
   public void testWithAccumulo() throws AccumuloException, AccumuloSecurityException, TableExistsException,
TableNotFoundException, IOException {
-    Connector conn = new MockInstance().getConnector("root", "".getBytes());
+    Connector conn = new MockInstance().getConnector("root", new PasswordToken(""));
     conn.tableOperations().create("test");
     BatchWriter bw = conn.createBatchWriter("test", new BatchWriterConfig());
     



Mime
View raw message