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

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

                Author: ASF GitHub Bot
            Created on: 17/May/19 18:37
            Start Date: 17/May/19 18:37
    Worklog Time Spent: 10m 
      Work Description: pvary commented on pull request #634: HIVE-21732: 
Configurable injection of latency for LLAP task execution
URL: https://github.com/apache/hive/pull/634#discussion_r285243242
 
 

 ##########
 File path: 
llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/LlapLoadGeneratorService.java
 ##########
 @@ -0,0 +1,96 @@
+/*
+ * 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.llap.daemon.impl;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.conf.HiveConf;
+import org.apache.hadoop.service.AbstractService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Random;
+
+/**
+ * Extra load generator service for LLAP.
+ */
+public class LlapLoadGeneratorService extends AbstractService {
+  private static final Logger LOG = 
LoggerFactory.getLogger(LlapLoadGeneratorService.class);
+  private static final long INTERVAL = 10;
+  private float threshold;
+  private String[] hostNames;
+  private int processors;
+  private Thread[] threads;
+
+  public LlapLoadGeneratorService() {
+    super("LlapLoadGeneratorService");
+  }
+
+  @Override
+  protected void serviceInit(Configuration conf) throws Exception {
+    super.serviceInit(conf);
+    threshold = HiveConf.getFloatVar(conf, 
HiveConf.ConfVars.HIVE_TEST_LOAD_UTILIZATION);
+    hostNames = HiveConf.getTrimmedStringsVar(conf, 
HiveConf.ConfVars.HIVE_TEST_LOAD_HOSTNAME);
+    LOG.info("LlapLoadGeneratorService init with {} {}", threshold, hostNames);
+  }
+
+  protected void serviceStart() throws UnknownHostException {
 
 Review comment:
   @Override added
   
   Exception - it is very unlikely that we get an exception here: "if the local 
host name could not be resolved into an address.". We specifically wanted to 
configure load for the cluster and we are unable to identify one of the nodes. 
I think it might be reasonable to fail to start the Daemon in this case? If I 
am running the tests I would like to face this issue ASAP, and not after the my 
10 hour testsuite is finished and checking the results :)
   
   Still there can be good reasons to try to start it anyway. What do you 
recommend? Shall we log a warn message only and continue? What do we usually do 
in case of LlapDaemons?
 
----------------------------------------------------------------
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: 244187)
    Time Spent: 1h 50m  (was: 1h 40m)

> Configurable injection of load for LLAP task execution
> ------------------------------------------------------
>
>                 Key: HIVE-21732
>                 URL: https://issues.apache.org/jira/browse/HIVE-21732
>             Project: Hive
>          Issue Type: Test
>            Reporter: Peter Vary
>            Assignee: Peter Vary
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-21732.2.patch, HIVE-21732.3.patch, 
> HIVE-21732.4.patch, HIVE-21732.5.patch, HIVE-21732.patch
>
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> For evaluating testing, it would be good to have a configurable way to inject 
> latency for LLAP tasks.
> The configuration should be able to control how much latency is injected into 
> each daemon.



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

Reply via email to