[ https://issues.apache.org/jira/browse/HIVE-25842?focusedWorklogId=711212&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-711212 ]
ASF GitHub Bot logged work on HIVE-25842: ----------------------------------------- Author: ASF GitHub Bot Created on: 19/Jan/22 09:34 Start Date: 19/Jan/22 09:34 Worklog Time Spent: 10m Work Description: lcspinter commented on a change in pull request #2916: URL: https://github.com/apache/hive/pull/2916#discussion_r787541067 ########## File path: ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/metrics/DeltaFilesMetricReporter.java ########## @@ -398,13 +156,6 @@ private static long getBaseSize(AcidDirectory dir) throws IOException { return baseSize; } - private static long getModificationTime(AcidUtils.ParsedDirectory dir, FileSystem fs) throws IOException { - return dir.getFiles(fs, Ref.from(false)).stream() - .map(HadoopShims.HdfsFileStatusWithId::getFileStatus) - .mapToLong(FileStatus::getModificationTime) - .max() - .orElse(new Date().getTime()); - } private static long getDirSize(AcidUtils.ParsedDirectory dir, FileSystem fs) throws IOException { Review comment: I think we should collect the small delta metrics because they can indicate issues with streaming (I wish I had such a metric when I investigated the Northfolk escalation :) ) Also, we are doing the same calculation in the `Initiator` code (`Initiator#sumDirSize`) to determine the compaction type. -- 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-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 711212) Time Spent: 4h 20m (was: 4h 10m) > Reimplement delta file metric collection > ---------------------------------------- > > Key: HIVE-25842 > URL: https://issues.apache.org/jira/browse/HIVE-25842 > Project: Hive > Issue Type: Improvement > Reporter: László Pintér > Assignee: László Pintér > Priority: Major > Labels: pull-request-available > Time Spent: 4h 20m > Remaining Estimate: 0h > > FUNCTIONALITY: Metrics are collected only when a Tez query runs a table > (select * and select count( * ) don't update the metrics) > Metrics aren't updated after compaction or cleaning after compaction, so > users will probably see "issues" with compaction (like many active or > obsolete or small deltas) that don't exist. > RISK: Metrics are collected during queries – we tried to put a try-catch > around each method in DeltaFilesMetricsReporter but of course this isn't > foolproof. This is a HUGE performance and functionality liability. Tests > caught some issues, but our tests aren't perfect. -- This message was sent by Atlassian Jira (v8.20.1#820001)