----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35181/#review87052 -----------------------------------------------------------
common/src/java/org/apache/hadoop/hive/common/JvmPauseMonitor.java <https://reviews.apache.org/r/35181/#comment139315> nit: getInstance could be called once - Sergey Shelukhin On June 7, 2015, 11:47 p.m., Szehon Ho wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/35181/ > ----------------------------------------------------------- > > (Updated June 7, 2015, 11:47 p.m.) > > > Review request for hive and Sergey Shelukhin. > > > Repository: hive-git > > > Description > ------- > > Eliminated the redundant conf checks and eliminate synchronization in the > code path, by making the static Metrics instance as a static volatile > variable. Achieved this by removing the Metrics init() method and moved > directly to the constructor. > > Left some of the synchronization in the old LegacyMetrics the same. > > > Diffs > ----- > > common/src/java/org/apache/hadoop/hive/common/JvmPauseMonitor.java c3949f2 > common/src/java/org/apache/hadoop/hive/common/metrics/LegacyMetrics.java > 14f7afb > common/src/java/org/apache/hadoop/hive/common/metrics/common/Metrics.java > 13a5336 > > common/src/java/org/apache/hadoop/hive/common/metrics/common/MetricsFactory.java > 12a309d > > common/src/java/org/apache/hadoop/hive/common/metrics/metrics2/CodahaleMetrics.java > e59da99 > > common/src/test/org/apache/hadoop/hive/common/metrics/TestLegacyMetrics.java > c14c7ee > > common/src/test/org/apache/hadoop/hive/common/metrics/metrics2/TestCodahaleMetrics.java > 8749349 > metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java > 85a734c > service/src/java/org/apache/hive/service/server/HiveServer2.java 7820ed5 > > Diff: https://reviews.apache.org/r/35181/diff/ > > > Testing > ------- > > Ran affected tests, ran HS2 with and without metrics enabled. > > > Thanks, > > Szehon Ho > >