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

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

                Author: ASF GitHub Bot
            Created on: 24/Jun/19 16:17
            Start Date: 24/Jun/19 16:17
    Worklog Time Spent: 10m 
      Work Description: odraese commented on pull request #683: HIVE-21846: 
Create a thread in TezAM which periodically fetches LlapDaemon metrics
URL: https://github.com/apache/hive/pull/683#discussion_r296798202
 
 

 ##########
 File path: 
llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/metrics/LlapMetricsCollector.java
 ##########
 @@ -0,0 +1,194 @@
+/*
+ * Licensed 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.llap.tezplugins.metrics;
+
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import com.google.protobuf.ServiceException;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.conf.HiveConf;
+import org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos;
+import org.apache.hadoop.hive.llap.impl.LlapManagementProtocolClientImpl;
+import org.apache.hadoop.hive.llap.registry.LlapServiceInstance;
+import org.apache.hadoop.hive.registry.ServiceInstanceStateChangeListener;
+import org.apache.hadoop.io.retry.RetryPolicies;
+import org.apache.hadoop.io.retry.RetryPolicy;
+import org.apache.hadoop.net.NetUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.net.SocketFactory;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Collect metrics from the llap daemons in every given milliseconds.
+ */
+public class LlapMetricsCollector implements 
ServiceInstanceStateChangeListener<LlapServiceInstance> {
+
+  private static final Logger LOG = 
LoggerFactory.getLogger(LlapMetricsCollector.class);
+  private static final String THREAD_NAME = 
"LlapTaskSchedulerMetricsCollectorThread";
+  private static final long INITIAL_DELAY_MSEC = 60000L;
+
+  private final Configuration conf;
 
 Review comment:
   This conf is currently used nowhere.
   I would suggest to either make the collector a Configurable (and have a 
getConf()) or to remove the variable.
 
----------------------------------------------------------------
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: 265789)
    Time Spent: 50m  (was: 40m)

> Create a thread in TezAM which periodically fetches LlapDaemon metrics
> ----------------------------------------------------------------------
>
>                 Key: HIVE-21846
>                 URL: https://issues.apache.org/jira/browse/HIVE-21846
>             Project: Hive
>          Issue Type: Sub-task
>          Components: llap, Tez
>            Reporter: Peter Vary
>            Assignee: Antal Sinkovits
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-21846.01.patch
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> LlapTaskSchedulerService should start a thread which periodically fetches the 
> LlapDaemon metrics and stores them in the NodeInfo object.
> This should be just the first implementation - later we should find a way 
> where we do not need NxM requests between N TezAM and M LlapDaemon



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to