incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bil...@apache.org
Subject svn commit: r1213848 - /incubator/accumulo/branches/1.4/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/Ingest.java
Date Tue, 13 Dec 2011 18:44:15 GMT
Author: billie
Date: Tue Dec 13 18:44:14 2011
New Revision: 1213848

URL: http://svn.apache.org/viewvc?rev=1213848&view=rev
Log: (empty)

Modified:
    incubator/accumulo/branches/1.4/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/Ingest.java

Modified: incubator/accumulo/branches/1.4/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/Ingest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/Ingest.java?rev=1213848&r1=1213847&r2=1213848&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/Ingest.java
(original)
+++ incubator/accumulo/branches/1.4/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/Ingest.java
Tue Dec 13 18:44:14 2011
@@ -18,8 +18,6 @@ package org.apache.accumulo.examples.dir
 
 import java.io.File;
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
 
 import org.apache.accumulo.core.client.BatchWriter;
 import org.apache.accumulo.core.client.Connector;
@@ -28,7 +26,6 @@ import org.apache.accumulo.core.data.Mut
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.iterators.LongCombiner;
 import org.apache.accumulo.core.iterators.TypedValueCombiner.Encoder;
-import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.ColumnVisibility;
 import org.apache.accumulo.examples.filedata.FileDataIngest;
 import org.apache.hadoop.io.Text;
@@ -126,7 +123,6 @@ public class Ingest {
     String nameTable = args[4];
     String indexTable = args[5];
     String dataTable = args[6];
-    byte[] visibility = args[7].getBytes();
     ColumnVisibility colvis = new ColumnVisibility(args[7]);
     int chunkSize = Integer.parseInt(args[8]);
     
@@ -137,17 +133,7 @@ public class Ingest {
       conn.tableOperations().create(indexTable);
     if (!conn.tableOperations().exists(dataTable))
       conn.tableOperations().create(dataTable);
-    Authorizations auths = conn.securityOperations().getUserAuthorizations(user);
-    if (!auths.contains(visibility)) {
-      List<byte[]> copy = new ArrayList<byte[]>(auths.getAuthorizations());
-      copy.add(visibility);
-      try {
-        conn.securityOperations().changeUserAuthorizations(user, new Authorizations(copy));
-      } catch (Exception ex) {
-        System.out.println("Unable to add visiblity to user " + user + ": " + ex);
-        System.exit(1);
-      }
-    }
+    
     BatchWriter dirBW = conn.createBatchWriter(nameTable, 50000000, 300000l, 4);
     BatchWriter indexBW = conn.createBatchWriter(indexTable, 50000000, 300000l, 4);
     BatchWriter dataBW = conn.createBatchWriter(dataTable, 50000000, 300000l, 4);



Mime
View raw message