henrib commented on code in PR #4749:
URL: https://github.com/apache/hive/pull/4749#discussion_r1347376367


##########
common/src/java/org/apache/hadoop/hive/ql/log/PerfLogger.java:
##########
@@ -89,17 +90,13 @@ public class PerfLogger {
   public static final String HIVE_GET_NOT_NULL_CONSTRAINT = 
"getNotNullConstraints";
   public static final String HIVE_GET_TABLE_CONSTRAINTS = 
"getTableConstraints";
 
-  protected final Map<String, Long> startTimes = new HashMap<String, Long>();
-  protected final Map<String, Long> endTimes = new HashMap<String, Long>();
+  protected final Map<String, Long> startTimes = new ConcurrentHashMap<>();
+  protected final Map<String, Long> endTimes = new ConcurrentHashMap<>();
 
-  static final private Logger LOG = 
LoggerFactory.getLogger(PerfLogger.class.getName());
-  protected static final ThreadLocal<PerfLogger> perfLogger = new 
ThreadLocal<PerfLogger>();
+  private static final Logger LOG = 
LoggerFactory.getLogger(PerfLogger.class.getName());
+  protected static final ThreadLocal<PerfLogger> perfLogger = new 
ThreadLocal<>();
 
 
-  private PerfLogger() {
-    // Use getPerfLogger to get an instance of PerfLogger
-  }
-

Review Comment:
   No good reason, putting it back.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to