[ 
https://issues.apache.org/jira/browse/HIVE-25165?focusedWorklogId=605805&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-605805
 ]

ASF GitHub Bot logged work on HIVE-25165:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Jun/21 10:01
            Start Date: 03/Jun/21 10:01
    Worklog Time Spent: 10m 
      Work Description: aasha commented on a change in pull request #2321:
URL: https://github.com/apache/hive/pull/2321#discussion_r643827420



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/parse/repl/ReplLogger.java
##########
@@ -47,4 +48,8 @@ public void dataCopyLog(String message) {
 
   public void setParams(String dbName, String dumpDirectory, long numTables, 
long numFunctions) {
   }
+
+  public ReplStatsTracker getReplStatsTracker() {

Review comment:
       mark this as abstract

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplStatsTracker.java
##########
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hive.ql.exec.repl;
+
+import org.apache.commons.collections4.map.ListOrderedMap;
+import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Tracks the replication statistics per event type.
+ */
+public class ReplStatsTracker {
+
+  // Maintains the descriptive statistics per event type.
+  private HashMap<String, DescriptiveStatistics> descMap;
+
+  // Maintains the top K costliest eventId's
+  private HashMap<String, ListOrderedMap<Long, Long>> topKEvents;

Review comment:
       this is not thread safe. check if it can have an impact

##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/parse/repl/metric/event/Stage.java
##########
@@ -35,6 +35,7 @@
   private Map<String, Metric> metrics = new HashMap<>();
   private String errorLogPath;
   private SnapshotUtils.ReplSnapshotCount replSnapshotCount = new 
SnapshotUtils.ReplSnapshotCount();
+  private String replStats = "";

Review comment:
       set to null instead?




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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 605805)
    Time Spent: 20m  (was: 10m)

> Generate & track statistics per event type for incremental load in 
> replication metrics
> --------------------------------------------------------------------------------------
>
>                 Key: HIVE-25165
>                 URL: https://issues.apache.org/jira/browse/HIVE-25165
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Ayush Saxena
>            Assignee: Ayush Saxena
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Generate and track statistics like mean, median. standard deviation, variance 
> etc per event type during incremental load and store them in replication 
> statisticsĀ 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to