virajjasani commented on a change in pull request #1747: URL: https://github.com/apache/hbase/pull/1747#discussion_r429228069
########## File path: src/main/asciidoc/_chapters/slow_log_responses_from_systable.adoc ########## @@ -0,0 +1,116 @@ +//// +/** + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +//// + +[[slow_log_responses_from_systable]] +==== Get Slow/Large Response Logs from System table hbase:slowlog + +The above section provides details about Admin APIs: + +* get_slowlog_responses +* get_largelog_responses +* clear_slowlog_responses + +All of the above APIs access online in-memory ring buffers from +individual RegionServers and accumulate logs from ring buffers to display +to end user. However, they can only be used for an ongoing slow/large RPC calls +and user can retrieve ongoing issues with RPC logs. After RegionServer is +restarted, all the objects held in memory of that RegionServer will be cleaned up +and previous problematic logs are lost. What if we want to persist all these logs? +What if we want to store them in such a manner that operator can get all historical +records with some filters? e.g get me all large/slow RPC logs that are triggered by +user1 and are related to region: +cluster_test,cccccccc,1589635796466.aa45e1571d533f5ed0bb31cdccaaf9cf. + +If we have a system table that stores such logs in increasing (not so strictly though) +order of time, it can definitely help operators debug some historical events +(scan, get, put, compaction, flush etc) with detailed inputs. + +Config which enabled system table to be created and store all log events is +`hbase.regionserver.slowlog.systable.enabled`. + +The default value for this config is `false`. If provided `true` +(Note: `hbase.regionserver.slowlog.buffer.enabled` should also be `true`), +HMaster will create system table `hbase:slowlog` and each RegionServer, upon Review comment: Done. Provided sufficient info as per your suggestion. ---------------------------------------------------------------- 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]
