bolerio commented on a change in pull request #2887:
URL: https://github.com/apache/hadoop/pull/2887#discussion_r631301512



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/NamenodeHeartbeatService.java
##########
@@ -170,7 +172,20 @@ protected void serviceInit(Configuration configuration) 
throws Exception {
 
   @Override
   public void periodicInvoke() {
-    updateState();
+    try {
+      SecurityUtil.doAsCurrentUser(
+          new PrivilegedExceptionAction<Object>() {
+            @Override
+            public Object run() {
+              updateState();
+              return null;
+            }
+          });
+    } catch (IOException e) {
+      // Generic error that we don't know about
+      LOG.error("Unexpected exception while communicating with {}: {}",

Review comment:
       Ok, will try to create one. Thanks for checking this out @goiri , 
somehow I missed the notification re your comments, Will follow up with a unit 
test soon.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to