AccessController.java 文件源码

java
阅读 42 收藏 0 点赞 0 评论 0

项目:ditb 作者:
void initialize(RegionCoprocessorEnvironment e) throws IOException {
  final Region region = e.getRegion();
  Configuration conf = e.getConfiguration();
  Map<byte[], ListMultimap<String,TablePermission>> tables =
      AccessControlLists.loadAll(region);
  // For each table, write out the table's permissions to the respective
  // znode for that table.
  for (Map.Entry<byte[], ListMultimap<String,TablePermission>> t:
    tables.entrySet()) {
    byte[] entry = t.getKey();
    ListMultimap<String,TablePermission> perms = t.getValue();
    byte[] serialized = AccessControlLists.writePermissionsAsBytes(perms, conf);
    this.authManager.getZKPermissionWatcher().writeToZookeeper(entry, serialized);
  }
  initialized = true;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号