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/08 12:11:27 UTC

[GitHub] [hive] kgyrtkirk commented on a change in pull request #1223: HIVE-23813 : Fix flaky tests due to JDO Exception

kgyrtkirk commented on a change in pull request #1223:
URL: https://github.com/apache/hive/pull/1223#discussion_r451486233



##########
File path: standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ReplicationMetricsMaintTask.java
##########
@@ -63,13 +63,12 @@ public void run() {
       if (!MetastoreConf.getBoolVar(conf, ConfVars.SCHEDULED_QUERIES_ENABLED)) {

Review comment:
       please correct the comment in `initialDelay` method as well

##########
File path: standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ReplicationMetricsMaintTask.java
##########
@@ -63,13 +63,12 @@ public void run() {
       if (!MetastoreConf.getBoolVar(conf, ConfVars.SCHEDULED_QUERIES_ENABLED)) {

Review comment:
       I think this class should depend on a different config knob

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/parse/repl/metric/MetricSink.java
##########
@@ -121,6 +121,7 @@ public void run() {
             ObjectMapper mapper = new ObjectMapper();

Review comment:
       is this method supposed to be fast? (because `ArrayList` was created for a specified size)
   ...anyway try not to throw away `ObjectMapper` instances right after use - `ObjectMapper`'s first time use cost could be high

##########
File path: standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ReplicationMetricsMaintTask.java
##########
@@ -63,13 +63,12 @@ public void run() {
       if (!MetastoreConf.getBoolVar(conf, ConfVars.SCHEDULED_QUERIES_ENABLED)) {
         return;
       }
-      LOG.debug("Cleaning up older Metrics");
       RawStore ms = HiveMetaStore.HMSHandler.getMSForConf(conf);
-      int maxRetainSecs = (int) TimeUnit.DAYS.toSeconds(MetastoreConf.getTimeVar(conf,
-        ConfVars.REPL_METRICS_MAX_AGE, TimeUnit.DAYS));
+      int maxRetainSecs = (int) MetastoreConf.getTimeVar(conf, ConfVars.REPL_METRICS_MAX_AGE, TimeUnit.SECONDS);
+      LOG.info("Cleaning up Metrics older than {} ", maxRetainSecs);
       int deleteCnt = ms.deleteReplicationMetrics(maxRetainSecs);
       if (deleteCnt > 0L){

Review comment:
       nit: space before `{`




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