Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AF23C1086D for ; Fri, 20 Dec 2013 16:49:13 +0000 (UTC) Received: (qmail 72892 invoked by uid 500); 20 Dec 2013 16:44:58 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 72646 invoked by uid 500); 20 Dec 2013 16:44:46 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 72567 invoked by uid 99); 20 Dec 2013 16:44:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Dec 2013 16:44:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Dec 2013 16:44:39 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E686C23889D5; Fri, 20 Dec 2013 16:44:18 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1552727 - /hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java Date: Fri, 20 Dec 2013 16:44:18 -0000 To: commits@hbase.apache.org From: anoopsamjohn@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131220164418.E686C23889D5@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: anoopsamjohn Date: Fri Dec 20 16:44:18 2013 New Revision: 1552727 URL: http://svn.apache.org/r1552727 Log: HBASE-10173 Need HFile version check in security coprocessors Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java?rev=1552727&r1=1552726&r2=1552727&view=diff ============================================================================== --- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java (original) +++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java Fri Dec 20 16:44:18 2013 @@ -155,13 +155,6 @@ public class AccessController extends Ba 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 Ba /* ---- 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