From 25b72708a29acfcce497b0b0967551bd4f8a744a Mon Sep 17 00:00:00 2001 From: anoopsamjohn Date: Fri, 20 Dec 2013 16:44:40 +0000 Subject: [PATCH] HBASE-10173 Need HFile version check in security coprocessors git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1552728 13f79535-47bb-0310-9956-ffa450edef68 --- .../hbase/security/access/AccessController.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java index 965deac17aa..3543760a710 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java @@ -155,13 +155,6 @@ public class AccessController extends BaseRegionObserver void initialize(RegionCoprocessorEnvironment e) throws IOException { final HRegion region = e.getRegion(); - canPersistCellACLs = HFile.getFormatVersion(e.getConfiguration()) >= - HFile.MIN_FORMAT_VERSION_WITH_TAGS; - if (!canPersistCellACLs) { - LOG.info("A minimum HFile version of " + HFile.MIN_FORMAT_VERSION_WITH_TAGS - + " is required to persist cell ACLs. Consider setting " + HFile.FORMAT_VERSION_KEY - + " accordingly."); - } Map> tables = AccessControlLists.loadAll(region); // For each table, write out the table's permissions to the respective @@ -633,7 +626,13 @@ public class AccessController extends BaseRegionObserver /* ---- MasterObserver implementation ---- */ public void start(CoprocessorEnvironment env) throws IOException { - + canPersistCellACLs = HFile.getFormatVersion(env.getConfiguration()) >= + HFile.MIN_FORMAT_VERSION_WITH_TAGS; + if (!canPersistCellACLs) { + LOG.info("A minimum HFile version of " + HFile.MIN_FORMAT_VERSION_WITH_TAGS + + " is required to persist cell ACLs. Consider setting " + HFile.FORMAT_VERSION_KEY + + " accordingly."); + } ZooKeeperWatcher zk = null; if (env instanceof MasterCoprocessorEnvironment) { // if running on HMaster