ZanderXu opened a new pull request, #4670:
URL: https://github.com/apache/hadoop/pull/4670
### Description of PR
When I read some class about HDFS NameNode, I found there are many redundant
throw exception in org.apahce.hadoop.hdfs.server.namenode package, such as:
```
public synchronized void transitionToObserver(StateChangeRequestInfo req)
throws ServiceFailedException, AccessControlException, IOException {
checkNNStartup();
nn.checkHaStateChange(req);
nn.transitionToObserver();
}
```
Because ServiceFailedException and AccessControlException is subClass of
IOException, so I feel that ServiceFailedException and AccessControlException
are redundant, so we can remove it to make code clearer, such as:
```
public synchronized void transitionToObserver(StateChangeRequestInfo req)
throws IOException {
checkNNStartup();
nn.checkHaStateChange(req);
nn.transitionToObserver();
}
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]