hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r1562312 - /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityController.java
Date Tue, 28 Jan 2014 23:42:31 GMT
Author: apurtell
Date: Tue Jan 28 23:42:30 2014
New Revision: 1562312

URL: http://svn.apache.org/r1562312
Log:
HBASE-10429 Make Visibility Controller to throw a better msg if it is of type RegionServerCoprocessor
(Ramkrishna S. Vasudevan)

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityController.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityController.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityController.java?rev=1562312&r1=1562311&r2=1562312&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityController.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityController.java
Tue Jan 28 23:42:30 2014
@@ -71,6 +71,7 @@ import org.apache.hadoop.hbase.coprocess
 import org.apache.hadoop.hbase.coprocessor.ObserverContext;
 import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.coprocessor.RegionObserver;
+import org.apache.hadoop.hbase.coprocessor.RegionServerCoprocessorEnvironment;
 import org.apache.hadoop.hbase.exceptions.DeserializationException;
 import org.apache.hadoop.hbase.filter.Filter;
 import org.apache.hadoop.hbase.filter.FilterList;
@@ -178,6 +179,10 @@ public class VisibilityController extend
       // if running at region
       regionEnv = (RegionCoprocessorEnvironment) env;
       zk = regionEnv.getRegionServerServices().getZooKeeper();
+    } else if (env instanceof RegionServerCoprocessorEnvironment) {
+      throw new RuntimeException(
+          "Visibility controller should not be configured as " +
+          "'hbase.coprocessor.regionserver.classes'.");
     }
 
     // If zk is null or IOException while obtaining auth manager,



Mime
View raw message