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
This commit is contained in:
parent
46148bfbd9
commit
25b72708a2
|
@ -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<byte[], ListMultimap<String,TablePermission>> 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
|
||||
|
|
Loading…
Reference in New Issue