You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2020/07/13 02:45:41 UTC

[GitHub] [hive] dengzhhu653 commented on a change in pull request #1197: HIVE-23793: Review of QueryInfo Class

dengzhhu653 commented on a change in pull request #1197:
URL: https://github.com/apache/hive/pull/1197#discussion_r453406382



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/QueryInfo.java
##########
@@ -17,48 +17,58 @@
  */
 package org.apache.hadoop.hive.ql;
 
+import java.util.concurrent.TimeUnit;
+
 /**
- * The class is synchronized, as WebUI may access information about a running query.
+ * Provide WebUI information about a running query. Class is thread safe so that
+ * multiple browser sessions can access the data simultaneously.
  */
 public class QueryInfo {
 
   private final String userName;
   private final String executionEngine;
-  private final long beginTime;
   private final String operationId;
-  private Long runtime;  // tracks only running portion of the query.
 
-  private Long endTime;
   private String state;
   private QueryDisplay queryDisplay;
 
+  /*
+   * Times are stored internally with nanosecond precision.
+   */
+  private final long beginTime;
+  private long runtime;

Review comment:
       Should the runtime, endTime, state better make them volatile if remove the synchronized?




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



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org