[ https://issues.apache.org/jira/browse/HIVE-11891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14876773#comment-14876773 ]
Brock Noland edited comment on HIVE-11891 at 9/19/15 1:03 AM: -------------------------------------------------------------- I was looking at it again and I think it can be done by moving most {{getPerfLogger}} calls to {{SessionState}}. Updated patch attached. Note this patch logs at {{INFO}} since that is what PerfLogger does by default. I think that is OK since the HMS logs a few messages per call to the HMS anyway. Example output: {noformat} 2015-09-18T18:01:04,389 INFO [pool-6-thread-1]: log.PerfLogger (PerfLogger.java:PerfLogBegin(117)) - <PERFLOG method=set_ugi from=org.apache.hadoop.hive.metastore.RetryingHMSHandler> 2015-09-18T18:01:04,389 INFO [pool-6-thread-1]: log.PerfLogger (PerfLogger.java:PerfLogEnd(157)) - </PERFLOG method=set_ugi start=1442624464388 end=1442624464389 duration=1 from=org.apache.hadoop.hive.metastore.RetryingHMSHandler threadId=1 retryCount=0 error=false> {noformat} was (Author: brocknoland): I was looking at it again and I think it can be done by moving most {{getPerfLogger}} calls to {{SessionState}}. Updated patch attached. Note this patch logs at {{LOG}} since that is what PerfLogger does by default. I think that is OK since the HMS logs a few messages per call to the HMS anyway. Example output: {noformat} 2015-09-18T18:01:04,389 INFO [pool-6-thread-1]: log.PerfLogger (PerfLogger.java:PerfLogBegin(117)) - <PERFLOG method=set_ugi from=org.apache.hadoop.hive.metastore.RetryingHMSHandler> 2015-09-18T18:01:04,389 INFO [pool-6-thread-1]: log.PerfLogger (PerfLogger.java:PerfLogEnd(157)) - </PERFLOG method=set_ugi start=1442624464388 end=1442624464389 duration=1 from=org.apache.hadoop.hive.metastore.RetryingHMSHandler threadId=1 retryCount=0 error=false> {noformat} > Add basic performance logging at trace level to metastore calls > --------------------------------------------------------------- > > Key: HIVE-11891 > URL: https://issues.apache.org/jira/browse/HIVE-11891 > Project: Hive > Issue Type: Improvement > Components: Metastore > Affects Versions: 1.0.0, 1.2.0, 1.1.0 > Reporter: Brock Noland > Assignee: Brock Noland > Priority: Minor > Fix For: 2.0.0 > > Attachments: HIVE-11891.patch, HIVE-11891.patch, HIVE-11891.patch > > > At present it's extremely difficult to debug slow calls to the metastore. > Ideally there would be some basic means of doing so. -- This message was sent by Atlassian JIRA (v6.3.4#6332)