HBASE-12635 Delete acl notify znode of table after the table is deleted (Liu Shaohui)
This commit is contained in:
parent
04444299ab
commit
e690a83d41
|
@ -926,6 +926,7 @@ public class AccessController extends BaseMasterAndRegionObserver
|
|||
return null;
|
||||
}
|
||||
});
|
||||
this.authManager.getZKPermissionWatcher().deleteTableACLNode(tableName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -193,4 +193,22 @@ public class ZKPermissionWatcher extends ZooKeeperListener {
|
|||
watcher.abort("Failed writing node "+zkNode+" to zookeeper", e);
|
||||
}
|
||||
}
|
||||
|
||||
/***
|
||||
* Delete the acl notify node of table
|
||||
* @param tableName
|
||||
*/
|
||||
public void deleteTableACLNode(final TableName tableName) {
|
||||
String zkNode = ZKUtil.joinZNode(watcher.baseZNode, ACL_NODE);
|
||||
zkNode = ZKUtil.joinZNode(zkNode, tableName.getNameAsString());
|
||||
|
||||
try {
|
||||
ZKUtil.deleteNode(watcher, zkNode);
|
||||
} catch (KeeperException.NoNodeException e) {
|
||||
LOG.warn("No acl notify node of table '" + tableName + "'");
|
||||
} catch (KeeperException e) {
|
||||
LOG.error("Failed deleting acl node of table '" + tableName + "'", e);
|
||||
watcher.abort("Failed deleting node " + zkNode, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue