You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by vi...@apache.org on 2012/01/18 19:42:39 UTC

svn commit: r1232994 - in /incubator/accumulo/trunk: ./ docs/examples/README.visibility src/server/ src/server/src/main/java/org/apache/accumulo/server/fate/Print.java src/server/src/main/java/org/apache/accumulo/server/fate/ZooStore.java

Author: vines
Date: Wed Jan 18 18:42:39 2012
New Revision: 1232994

URL: http://svn.apache.org/viewvc?rev=1232994&view=rev
Log:
ACCUMULO-280 - merging constraint info
ACCUMULO-317 - some of Keith's stuff is coming along for the ride


Added:
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/fate/Print.java
      - copied unchanged from r1232992, incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/fate/Print.java
Modified:
    incubator/accumulo/trunk/   (props changed)
    incubator/accumulo/trunk/docs/examples/README.visibility
    incubator/accumulo/trunk/src/server/   (props changed)
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/fate/ZooStore.java

Propchange: incubator/accumulo/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 18 18:42:39 2012
@@ -1,3 +1,3 @@
 /incubator/accumulo/branches/1.3:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215,1227231,1227611,1228195,1230180,1230736,1231043
 /incubator/accumulo/branches/1.3.5rc:1209938
-/incubator/accumulo/branches/1.4:1201902-1232617
+/incubator/accumulo/branches/1.4:1201902-1232992

Modified: incubator/accumulo/trunk/docs/examples/README.visibility
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/docs/examples/README.visibility?rev=1232994&r1=1232993&r2=1232994&view=diff
==============================================================================
--- incubator/accumulo/trunk/docs/examples/README.visibility (original)
+++ incubator/accumulo/trunk/docs/examples/README.visibility Wed Jan 18 18:42:39 2012
@@ -109,3 +109,23 @@ The default authorizations for a scan ar
     row f3:q3 [(apple&carrot)|broccoli|spinach]    v3
     username@instance vistest> scan -s B
     username@instance vistest> 
+    
+If you want, you can limit a user to only be able to insert data which they can read themselves.
+It can be set with the following constraint.
+
+    username@instance vistest> user root
+    Enter password for user root: ******
+    root@instance vistest> config -t vistest -s table.constraint.1=org.apache.accumulo.core.security.VisibilityConstraint    
+    root@instance vistest> user username
+    Enter password for user username: ********
+    username@instance vistest> insert row f4 q4 v4 -l spinach                                                                
+        Constraint Failures:
+            ConstraintViolationSummary(constrainClass:org.apache.accumulo.core.security.VisibilityConstraint, violationCode:2, violationDescription:User does not have authorization on column visibility, numberOfViolatingMutations:1)
+    username@instance vistest> insert row f4 q4 v4 -l spinach|broccoli
+    username@instance vistest> scan
+    row f1:q1 [A]    v1
+    row f2:q2 [A&B]    v2
+    row f3:q3 [(apple&carrot)|broccoli|spinach]    v3
+    row f4:q4 [spinach|broccoli]    v4
+    username@instance vistest> 
+    
\ No newline at end of file

Propchange: incubator/accumulo/trunk/src/server/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 18 18:42:39 2012
@@ -1,3 +1,3 @@
-/incubator/accumulo/branches/1.3.5rc/src/server:1209938
 /incubator/accumulo/branches/1.3/src/server:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215,1227231,1227611
-/incubator/accumulo/branches/1.4/src/server:1201902-1232617
+/incubator/accumulo/branches/1.3.5rc/src/server:1209938
+/incubator/accumulo/branches/1.4/src/server:1201902-1232992

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/fate/ZooStore.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/fate/ZooStore.java?rev=1232994&r1=1232993&r2=1232994&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/fate/ZooStore.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/fate/ZooStore.java Wed Jan 18 18:42:39 2012
@@ -409,4 +409,17 @@ public class ZooStore<T> implements TSto
       throw new RuntimeException(e);
     }
   }
+  
+  public List<Long> list() {
+    try {
+      ArrayList<Long> l = new ArrayList<Long>();
+      List<String> transactions = zk.getChildren(path);
+      for (String txid : transactions) {
+        l.add(parseTid(txid));
+      }
+      return l;
+    } catch (Exception e) {
+      throw new RuntimeException(e);
+    }
+  }
 }