hiping-tech commented on code in PR #6845:
URL: https://github.com/apache/hbase/pull/6845#discussion_r2011176754
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java:
##########
@@ -3961,9 +3961,14 @@ public ExecuteProceduresResponse
executeProcedures(RpcController controller,
public GetAllBootstrapNodesResponse getAllBootstrapNodes(RpcController
controller,
GetAllBootstrapNodesRequest request) throws ServiceException {
GetAllBootstrapNodesResponse.Builder builder =
GetAllBootstrapNodesResponse.newBuilder();
- server.getBootstrapNodes()
- .forEachRemaining(server ->
builder.addNode(ProtobufUtil.toServerName(server)));
- return builder.build();
+ try {
+ checkOpen();
+ server.getBootstrapNodes()
+ .forEachRemaining(server ->
builder.addNode(ProtobufUtil.toServerName(server)));
+ return builder.build();
+ } catch (IOException e) {
+ throw new ServiceException(e);
Review Comment:
CheckOpen only ensures that getBootstrapNodes is non-null, but it does not
guarantee whether getBootstrapNodes has successfully retrieved the nodes.
Therefore, additional validation is needed to ensure completeness.
Please help review this.
--
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]