You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by jl...@apache.org on 2019/06/03 23:18:04 UTC

[incubator-pinot] branch fix-controller-metric created (now 7a440cb)

This is an automated email from the ASF dual-hosted git repository.

jlli pushed a change to branch fix-controller-metric
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git.


      at 7a440cb  Fix controller metric

This branch includes the following new commits:

     new 7a440cb  Fix controller metric

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[incubator-pinot] 01/01: Fix controller metric

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jlli pushed a commit to branch fix-controller-metric
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git

commit 7a440cb88fe181752406b6b7a6b9eec5aaff8ed4
Author: jackjlli <jl...@linkedin.com>
AuthorDate: Mon Jun 3 11:38:03 2019 -0700

    Fix controller metric
---
 .../main/java/org/apache/pinot/controller/ControllerStarter.java  | 2 +-
 .../apache/pinot/server/request/ScheduledRequestHandlerTest.java  | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/pinot-controller/src/main/java/org/apache/pinot/controller/ControllerStarter.java b/pinot-controller/src/main/java/org/apache/pinot/controller/ControllerStarter.java
index 36f6d20..f57d21f 100644
--- a/pinot-controller/src/main/java/org/apache/pinot/controller/ControllerStarter.java
+++ b/pinot-controller/src/main/java/org/apache/pinot/controller/ControllerStarter.java
@@ -195,6 +195,7 @@ public class ControllerStarter {
     // Set up controller metrics
     MetricsHelper.initializeMetrics(_config.subset(METRICS_REGISTRY_NAME));
     MetricsHelper.registerMetricsRegistry(_metricsRegistry);
+    _controllerMetrics.initializeGlobalMeters();
 
     switch (_controllerMode) {
       case DUAL:
@@ -213,7 +214,6 @@ public class ControllerStarter {
 
     ServiceStatus
         .setServiceStatusCallback(new ServiceStatus.MultipleCallbackServiceStatusCallback(_serviceStatusCallbackList));
-    _controllerMetrics.initializeGlobalMeters();
   }
 
   private void setUpHelixController() {
diff --git a/pinot-server/src/test/java/org/apache/pinot/server/request/ScheduledRequestHandlerTest.java b/pinot-server/src/test/java/org/apache/pinot/server/request/ScheduledRequestHandlerTest.java
index 00db1bd..55ba7ba 100644
--- a/pinot-server/src/test/java/org/apache/pinot/server/request/ScheduledRequestHandlerTest.java
+++ b/pinot-server/src/test/java/org/apache/pinot/server/request/ScheduledRequestHandlerTest.java
@@ -29,6 +29,7 @@ import io.netty.channel.ChannelHandlerContext;
 import java.io.IOException;
 import java.net.InetSocketAddress;
 import java.util.Arrays;
+import java.util.concurrent.Callable;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
@@ -126,8 +127,11 @@ public class ScheduledRequestHandlerTest {
           @Nonnull
           @Override
           public ListenableFuture<byte[]> submit(@Nonnull ServerQueryRequest queryRequest) {
-            ListenableFuture<DataTable> dataTable = resourceManager.getQueryRunners().submit(() -> {
-              throw new RuntimeException("query processing error");
+            ListenableFuture<DataTable> dataTable = resourceManager.getQueryRunners().submit(new Callable<DataTable>() {
+              @Override
+              public DataTable call() throws Exception {
+                throw new RuntimeException("query processing error");
+              }
             });
             ListenableFuture<DataTable> queryResponse = Futures.catching(dataTable, Throwable.class, input -> {
               DataTable result = new DataTableImplV2();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org