ndimiduk commented on a change in pull request #754: HBASE-22978 : Online slow 
response log
URL: https://github.com/apache/hbase/pull/754#discussion_r377269839
 
 

 ##########
 File path: hbase-shell/src/main/ruby/hbase/admin.rb
 ##########
 @@ -1453,6 +1453,97 @@ def list_decommissioned_regionservers
       @admin.listDecommissionedRegionServers
     end
 
+    
#----------------------------------------------------------------------------------------------
+    # Retrieve SlowLog Responses from RegionServers
+    def get_slowlog_responses(server_names, args)
+      unless server_names.is_a?(Array) || server_names.is_a?(String)
+        raise(ArgumentError,
+              "#{server_names.class} of #{server_names.inspect} is not of 
Array/String type")
+      end
+      if server_names == '*'
+        server_names = getServerNames([], true)
+      else
+        server_names_list = get_server_names(server_names)
+        server_names = getServerNames(server_names_list, false)
+      end
+      slow_log_responses = @admin.getSlowLogResponses(server_names)
+      filtered_log_responses = filter_slow_responses(args,
+                                                     slow_log_responses)
+      puts 'Retrieved SlowLog Responses from RegionServers.....'
+      if args.empty?
+        puts slow_log_responses.to_s
+      else
+        puts filtered_log_responses.to_s
+      end
+    end
+
+    def filter_slow_responses(args, slow_log_responses)
+      filtered_log_responses = java.util.ArrayList.new
 
 Review comment:
   Oh, here's where your filters get applied. Please perform filtering on the 
server-side, where it can be distributed across all the region servers 
involved, and avoid the network and client overhead.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to