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

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

                Author: ASF GitHub Bot
            Created on: 27/Aug/21 12:52
            Start Date: 27/Aug/21 12:52
    Worklog Time Spent: 10m 
      Work Description: klcopp commented on a change in pull request #2607:
URL: https://github.com/apache/hive/pull/2607#discussion_r697415476



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/metrics/DeltaFilesMetricReporter.java
##########
@@ -240,19 +245,24 @@ public static void mergeDeltaFilesStats(AcidDirectory 
dir, long checkThresholdIn
 
     String path = getRelPath(dir);
 
-    filterAndAddToDeltaFilesStats(NUM_DELTAS, numDeltas, deltasThreshold, 
deltaFilesStats, path, maxCacheSize);
+    String serializedMetadata = 
conf.get(JOB_CONF_DELTA_FILES_METRICS_METADATA);
+    HashMap<Path, DeltaFilesMetadata> pathToMetadata = new HashMap<>();
+    pathToMetadata = 
SerializationUtilities.deserializeObject(serializedMetadata, 
pathToMetadata.getClass());

Review comment:
       deserializeObject could return null

##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/HiveSplitGenerator.java
##########
@@ -224,6 +228,24 @@ private void prepare(InputInitializerContext 
initializerContext) throws IOExcept
 
         }
 
+        HashMap<Path, DeltaFilesMetricReporter.DeltaFilesMetadata> 
deltaFilesMetadata = new HashMap();
+
+        work.getPathToPartitionInfo().entrySet().forEach(e -> {
+          DeltaFilesMetricReporter.DeltaFilesMetadata metadata = new 
DeltaFilesMetricReporter.DeltaFilesMetadata();
+          TableDesc tableDesc = e.getValue().getTableDesc();
+          metadata.dbName = tableDesc.getDbName();
+          metadata.tableName = tableDesc.getTableName();
+          LinkedHashMap<String, String> partSpec = e.getValue().getPartSpec();
+          if (partSpec != null && !partSpec.isEmpty()) {
+            metadata.partitionName = String.valueOf(partSpec);
+          }
+          deltaFilesMetadata.put(e.getKey(), metadata);
+        });
+
+        String serializedMetadata = 
SerializationUtilities.serializeObject(deltaFilesMetadata);

Review comment:
       serializeObject could return null?

##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/metrics/DeltaFilesMetricReporter.java
##########
@@ -240,19 +245,24 @@ public static void mergeDeltaFilesStats(AcidDirectory 
dir, long checkThresholdIn
 
     String path = getRelPath(dir);

Review comment:
       path isn't used




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


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

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

> Delta metrics keys should contain database name
> -----------------------------------------------
>
>                 Key: HIVE-25450
>                 URL: https://issues.apache.org/jira/browse/HIVE-25450
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Karen Coppage
>            Assignee: László Pintér
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Currently metrics about the number of deltas in a given partition or 
> unpartitioned table include information about the table name and the 
> partition name (if applicable), but they should also include the database 
> name, since there could be 2 tables in different databases with the same name.



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

Reply via email to