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:24:40 UTC

[incubator-pinot] branch fix-controller-metric updated (7a440cb -> b0fcfd8)

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.


 discard 7a440cb  Fix controller metric
     new b0fcfd8  Fix controller metric

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (7a440cb)
            \
             N -- N -- N   refs/heads/fix-controller-metric (b0fcfd8)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

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.


Summary of changes:
 .../org/apache/pinot/server/request/ScheduledRequestHandlerTest.java    | 2 ++
 1 file changed, 2 insertions(+)


---------------------------------------------------------------------
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 b0fcfd8348d9060080fb8ed8a824b93db24e35fb
Author: jackjlli <jl...@linkedin.com>
AuthorDate: Mon Jun 3 11:38:03 2019 -0700

    Fix controller metric
---
 .../java/org/apache/pinot/controller/ControllerStarter.java    |  2 +-
 .../pinot/server/request/ScheduledRequestHandlerTest.java      | 10 ++++++++--
 2 files changed, 9 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..f41f677 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,13 @@ public class ScheduledRequestHandlerTest {
           @Nonnull
           @Override
           public ListenableFuture<byte[]> submit(@Nonnull ServerQueryRequest queryRequest) {
-            ListenableFuture<DataTable> dataTable = resourceManager.getQueryRunners().submit(() -> {
-              throw new RuntimeException("query processing error");
+            // The default version of Java 1.8 cannot recognize whether the submit method comes from ListeningExecutorService or Runnable.
+            // Specifying it for less ambiguity.
+            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