[
https://issues.apache.org/jira/browse/HIVE-24974?focusedWorklogId=581657&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-581657
]
ASF GitHub Bot logged work on HIVE-24974:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 13/Apr/21 09:43
Start Date: 13/Apr/21 09:43
Worklog Time Spent: 10m
Work Description: klcopp commented on a change in pull request #2148:
URL: https://github.com/apache/hive/pull/2148#discussion_r612295409
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/metrics/DeltaFilesMetricReporter.java
##########
@@ -0,0 +1,211 @@
+/*
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.txn.compactor.metrics;
+
+import com.google.common.cache.Cache;
+import com.google.common.cache.CacheBuilder;
+
+import com.google.common.cache.RemovalNotification;
+import com.google.common.collect.Maps;
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import org.apache.commons.lang3.tuple.Pair;
+import org.apache.hadoop.fs.FileStatus;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hive.common.metrics.common.Metrics;
+import org.apache.hadoop.hive.common.metrics.common.MetricsFactory;
+import org.apache.hadoop.hive.conf.HiveConf;
+import org.apache.hadoop.hive.ql.io.AcidDirectory;
+import org.apache.hadoop.hive.ql.io.AcidUtils;
+
+import org.apache.tez.common.counters.TezCounter;
+import org.apache.tez.common.counters.TezCounters;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.Comparator;
+
+import java.util.Queue;
+import java.util.TreeMap;
+import java.util.concurrent.Executors;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.PriorityBlockingQueue;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Collects and publishes ACID compaction related metrics.
+ */
+public class DeltaFilesMetricReporter {
+
+ private static final Logger LOG = LoggerFactory.getLogger(AcidUtils.class);
+
+ public static final String NUM_OBSOLETE_DELTAS =
"HIVE_ACID_NUM_OBSOLETE_DELTAS";
Review comment:
I think also part of the plan was a 3rd metric : Number of deltas where
the size is less than x % of the base (small deltas)?
--
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 581657)
Time Spent: 0.5h (was: 20m)
> Create new metrics about the number of delta files in the ACID table
> --------------------------------------------------------------------
>
> Key: HIVE-24974
> URL: https://issues.apache.org/jira/browse/HIVE-24974
> Project: Hive
> Issue Type: Sub-task
> Reporter: Denys Kuzmenko
> Assignee: Denys Kuzmenko
> Priority: Major
> Labels: pull-request-available
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> 2 metrics should be collected by each table/partition that exceeds some limit.
> * Number of used deltas
> * Number of obsolete deltas
> Both of them should be collected in AcidUtils.getAcidstate call, and only be
> published if they reached a configurable threshold (to not pollute metrics)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)