HDFS-8693. Addendum patch to execute the command using UGI. Contributed by Brahma Reddy Battula.
(cherry picked from commit 35c17351ca
)
This commit is contained in:
parent
41cf2b8e7c
commit
055d5e0b85
|
@ -253,7 +253,20 @@ class BlockPoolManager {
|
|||
lifelineAddrs.add(nnIdToLifelineAddr != null ?
|
||||
nnIdToLifelineAddr.get(nnId) : null);
|
||||
}
|
||||
try {
|
||||
UserGroupInformation.getLoginUser()
|
||||
.doAs(new PrivilegedExceptionAction<Object>() {
|
||||
@Override
|
||||
public Object run() throws Exception {
|
||||
bpos.refreshNNList(addrs, lifelineAddrs);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
} catch (InterruptedException ex) {
|
||||
IOException ioe = new IOException();
|
||||
ioe.initCause(ex.getCause());
|
||||
throw ioe;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue