SetOwner should update the usersgroups cache on all namenodes
@@ -2212,6 +2212,7 @@ public void setOwner(String src, String username, String groupname)
checkOpen();
try {
namenode.setOwner(src, username, groupname);
+ updateUserGroupCacheOnOtherNamenode(username, groupname);
} catch(RemoteException re) {
throw re.unwrapRemoteException(AccessControlException.class,
FileNotFoundException.class,
@@ -2991,6 +2992,11 @@ public void addUserGroup(final String userName, final String groupName)
throw re.unwrapRemoteException();
}
+ updateUserGroupCacheOnOtherNamenode(userName, groupName);
+ }
+
+ private void updateUserGroupCacheOnOtherNamenode(final String userName, final String groupName)
+ throws IOException {
if(userName != null && groupName != null){
for(ClientProtocol nn : allNNs) {
try{
