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

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

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

 ##########
 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:
   reading docs i see 
   ```java
     * @throws Exception if needed -these will be caught,
      * wrapped, and trigger a service stop
      */
     protected void serviceStart() throws Exception {
   ```
   so it is okay i guess.
 
----------------------------------------------------------------
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: 244377)
    Time Spent: 3h 10m  (was: 3h)

> 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: 3h 10m
>  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