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 2022/02/03 14:36:25 UTC

[GitHub] [hive] ayushtkn commented on a change in pull request #2907: HIVE-25814: Add entry in replication_metrics table for skipped replication.

ayushtkn commented on a change in pull request #2907:
URL: https://github.com/apache/hive/pull/2907#discussion_r798610011



##########
File path: common/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java
##########
@@ -614,7 +614,6 @@
 
   SPARK_JOB_RUNTIME_ERROR(40001, "Spark job failed due to: {0}", true),
   SPARK_TASK_RUNTIME_ERROR(40002, "Spark job failed due to task failures: {0}", true),
-  REPL_DATABASE_IS_TARGET_OF_REPLICATION(40003, "Cannot dump database as it is a Target of replication."),

Review comment:
       Unrelated to the change, we are doing here, can avoid this

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/util/ReplUtils.java
##########
@@ -474,4 +475,17 @@ public static void addLoggerTask(ReplLogger replLogger, List<Task<?>> tasks, Hiv
       DAGTraversal.traverse(tasks, new AddDependencyToLeaves(Collections.singletonList(task)));
     }
   }
+
+  public static void reportStatusInReplicationMetrics(String stageName, Status status, String errorLogPath,
+                                                      HiveConf conf)
+          throws SemanticException {
+    GenericMetricCollector metricCollector = new GenericMetricCollector(0, conf);

Review comment:
       What advantage is ``GenericMetricCollector`` class giving you?
   It is just calling the super constructor with pre-set value, that you could do it here itself. Or by having a Constructor in the parent class which takes only two params and set other values as ``null``




-- 
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: gitbox-unsubscribe@hive.apache.org

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