incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject svn commit: r1229639 - in /incubator/accumulo/trunk: ./ src/core/ src/core/src/main/java/org/apache/accumulo/core/iterators/user/ src/server/ src/server/src/main/java/org/apache/accumulo/server/client/ src/server/src/main/java/org/apache/accumulo/serve...
Date Tue, 10 Jan 2012 17:05:29 GMT
Author: kturner
Date: Tue Jan 10 17:05:28 2012
New Revision: 1229639

URL: http://svn.apache.org/viewvc?rev=1229639&view=rev
Log:
ACCUMULO-270 ACCUMULO-271 ACCUMULO-297 merged changes to trunk

Modified:
    incubator/accumulo/trunk/   (props changed)
    incubator/accumulo/trunk/src/core/   (props changed)
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/user/WholeRowIterator.java
    incubator/accumulo/trunk/src/server/   (props changed)
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/security/Auditor.java
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/security/Authenticator.java
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/security/ZKAuthenticator.java

Propchange: incubator/accumulo/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 10 17:05:28 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
 /incubator/accumulo/branches/1.3.5rc:1209938
-/incubator/accumulo/branches/1.4:1201902-1228245,1228308,1229205,1229220,1229248,1229357,1229588
+/incubator/accumulo/branches/1.4:1201902-1228245,1228308,1229205,1229220,1229248,1229357,1229424,1229427-1229428,1229588

Propchange: incubator/accumulo/trunk/src/core/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 10 17:05:28 2012
@@ -1,3 +1,3 @@
-/incubator/accumulo/branches/1.3.5rc/src/core:1209938
 /incubator/accumulo/branches/1.3/src/core: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
-/incubator/accumulo/branches/1.4/src/core:1201902-1228245,1228308,1229205,1229220,1229248,1229357,1229588
+/incubator/accumulo/branches/1.3.5rc/src/core:1209938
+/incubator/accumulo/branches/1.4/src/core:1201902-1228245,1228308,1229205,1229220,1229248,1229357,1229424,1229427-1229428,1229588

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/user/WholeRowIterator.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/user/WholeRowIterator.java?rev=1229639&r1=1229638&r2=1229639&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/user/WholeRowIterator.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/user/WholeRowIterator.java
Tue Jan 10 17:05:28 2012
@@ -204,7 +204,7 @@ public class WholeRowIterator implements
   
   @Override
   public boolean hasTop() {
-    return topKey != null || sourceIter.hasTop();
+    return topKey != null;
   }
   
   @Override

Propchange: incubator/accumulo/trunk/src/server/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 10 17:05:28 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-1228245,1228308,1229205,1229220,1229248,1229357,1229588
+/incubator/accumulo/branches/1.3.5rc/src/server:1209938
+/incubator/accumulo/branches/1.4/src/server:1201902-1228245,1228308,1229205,1229220,1229248,1229357,1229424,1229427-1229428,1229588

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java?rev=1229639&r1=1229638&r2=1229639&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
(original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
Tue Jan 10 17:05:28 2012
@@ -62,9 +62,14 @@ public class ClientServiceHandler implem
   }
   
   protected String checkTableId(String tableName, TableOperation operation) throws ThriftTableOperationException
{
-    final String tableId = Tables.getNameToIdMap(HdfsZooInstance.getInstance()).get(tableName);
-    if (tableId == null)
-      throw new ThriftTableOperationException(null, tableName, operation, TableOperationExceptionType.NOTFOUND,
null);
+    String tableId = Tables.getNameToIdMap(HdfsZooInstance.getInstance()).get(tableName);
+    if (tableId == null) {
+      // maybe the table exist, but the cache was not updated yet... so try to clear the
cache and check again
+      Tables.clearCache(HdfsZooInstance.getInstance());
+      tableId = Tables.getNameToIdMap(HdfsZooInstance.getInstance()).get(tableName);
+      if (tableId == null)
+        throw new ThriftTableOperationException(null, tableName, operation, TableOperationExceptionType.NOTFOUND,
null);
+    }
     return tableId;
   }
   

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/Master.java?rev=1229639&r1=1229638&r2=1229639&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
(original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
Tue Jan 10 17:05:28 2012
@@ -516,6 +516,8 @@ public class Master implements LiveTServ
   
   private boolean check(AuthInfo credentials, SystemPermission permission) throws ThriftSecurityException
{
     try {
+      // clear the cache so the check is done using current info
+      authenticator.clearCache(credentials.user);
       return authenticator.hasSystemPermission(credentials, credentials.user, permission);
     } catch (AccumuloSecurityException e) {
       throw e.asThriftException();
@@ -524,6 +526,8 @@ public class Master implements LiveTServ
   
   private boolean check(AuthInfo credentials, String tableId, TablePermission permission)
throws ThriftSecurityException {
     try {
+      // clear the cache so the check is done using current info
+      authenticator.clearCache(credentials.user, tableId);
       return authenticator.hasTablePermission(credentials, credentials.user, tableId, permission);
     } catch (AccumuloSecurityException e) {
       throw e.asThriftException();

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/security/Auditor.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/security/Auditor.java?rev=1229639&r1=1229638&r2=1229639&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/security/Auditor.java
(original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/security/Auditor.java
Tue Jan 10 17:05:28 2012
@@ -221,4 +221,14 @@ public class Auditor implements Authenti
       throw ex;
     }
   }
+  
+  @Override
+  public void clearCache(String user) {
+    impl.clearCache(user);
+  }
+  
+  @Override
+  public void clearCache(String user, String tableId) {
+    impl.clearCache(user, tableId);
+  }
 }

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/security/Authenticator.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/security/Authenticator.java?rev=1229639&r1=1229638&r2=1229639&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/security/Authenticator.java
(original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/security/Authenticator.java
Tue Jan 10 17:05:28 2012
@@ -57,4 +57,8 @@ public interface Authenticator {
   public void revokeTablePermission(AuthInfo credentials, String user, String table, TablePermission
permission) throws AccumuloSecurityException;
   
   public void deleteTable(AuthInfo credentials, String table) throws AccumuloSecurityException;
+  
+  public void clearCache(String user);
+  
+  public void clearCache(String user, String tableId);
 }

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/security/ZKAuthenticator.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/security/ZKAuthenticator.java?rev=1229639&r1=1229638&r2=1229639&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/security/ZKAuthenticator.java
(original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/security/ZKAuthenticator.java
Tue Jan 10 17:05:28 2012
@@ -683,4 +683,14 @@ public final class ZKAuthenticator imple
       return toReturn;
     }
   }
+  
+  @Override
+  public void clearCache(String user) {
+    zooCache.clear(ZKUserPath + "/" + user);
+  }
+  
+  @Override
+  public void clearCache(String user, String tableId) {
+    zooCache.clear(ZKUserPath + "/" + user + ZKUserTablePerms + "/" + tableId);
+  }
 }



Mime
View raw message