odraese commented on a change in pull request #695: HIVE-21909: Publish the 
LLAP Daemon capacity through ZooKeeper and ho…
URL: https://github.com/apache/hive/pull/695#discussion_r299735367
 
 

 ##########
 File path: 
llap-server/src/test/org/apache/hadoop/hive/llap/daemon/impl/TestLlapDaemon.java
 ##########
 @@ -0,0 +1,111 @@
+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.hive.llap.LlapDaemonInfo;
+import org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos;
+import org.apache.hadoop.hive.llap.metrics.LlapMetricsSystem;
+import org.apache.hadoop.hive.llap.metrics.MetricsUtils;
+import org.apache.hadoop.hive.llap.registry.impl.LlapRegistryService;
+import org.apache.hadoop.metrics2.MetricsSystem;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Captor;
+import org.mockito.Mock;
+import org.mockito.Spy;
+import org.mockito.internal.util.reflection.Fields;
+import org.mockito.internal.util.reflection.InstanceField;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.StreamSupport;
+
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+import static org.mockito.MockitoAnnotations.initMocks;
+
+public class TestLlapDaemon {
+
+  private static final String[] METRICS_SOURCES = new String[]{
+    "JvmMetrics",
+    "LlapDaemonExecutorMetrics-" + MetricsUtils.getHostName(),
+    "LlapDaemonJvmMetrics-" + MetricsUtils.getHostName(),
+    MetricsUtils.METRICS_PROCESS_NAME
+  };
+
+  @Spy
 
 Review comment:
   Why is this a Spy or more important even a mock. You could just use the 
standard HiveConf instance and store the two config values for zookeeper 
there...

----------------------------------------------------------------
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]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to