YutSean commented on a change in pull request #3972:
URL: https://github.com/apache/hbase/pull/3972#discussion_r776709051



##########
File path: bin/region_mover.rb
##########
@@ -493,11 +493,30 @@ def getFilename(options, targetServer, port)
   return filename
 end
 
+def getServersRSGroup(servers, rsgroup_admin, hostname, port)
+  rsgroup = rsgroup_admin.getRSGroupOfServer(Address.fromParts(hostname,
+                                             java.lang.Integer.parseInt(port)))
+  return rsgroup unless rsgroup.nil?
+  begin
+    server_name = getServerName(servers, hostname, port)
+    regions = getRegions(getConfiguration(), server_name)
+    if !regions.nil? && regions.empty?

Review comment:
       Checked the code. Currently, RSRpcService will return an empty list of 
regions as the RPC response or throw a RemoteServiceException.  It should be 
not nil at the client side. However, I also found that the ProtobufUtil used at 
client side will return null when the response is null. In my opinion, it is a 
guarantee here. Could be left as it is currently. What do you think?




-- 
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]


Reply via email to