From 0ab7c315dd57efb4303d15de14666f1a826c40b1 Mon Sep 17 00:00:00 2001 From: Fangjin Yang Date: Mon, 25 Mar 2013 13:11:02 -0700 Subject: [PATCH] more logging in CEQR to track down NPE --- .../druid/query/ChainedExecutionQueryRunner.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/client/src/main/java/com/metamx/druid/query/ChainedExecutionQueryRunner.java b/client/src/main/java/com/metamx/druid/query/ChainedExecutionQueryRunner.java index 6a30a743892..52fc99a35b1 100644 --- a/client/src/main/java/com/metamx/druid/query/ChainedExecutionQueryRunner.java +++ b/client/src/main/java/com/metamx/druid/query/ChainedExecutionQueryRunner.java @@ -20,6 +20,7 @@ package com.metamx.druid.query; import com.google.common.base.Function; +import com.google.common.base.Throwables; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.collect.Ordering; @@ -27,6 +28,7 @@ import com.metamx.common.guava.BaseSequence; import com.metamx.common.guava.MergeIterable; import com.metamx.common.guava.Sequence; import com.metamx.common.guava.Sequences; +import com.metamx.common.logger.Logger; import com.metamx.druid.Query; import java.util.Arrays; @@ -52,6 +54,8 @@ import java.util.concurrent.Future; */ public class ChainedExecutionQueryRunner implements QueryRunner { + private static final Logger log = new Logger(ChainedExecutionQueryRunner.class); + private final Iterable> queryables; private final ExecutorService exec; private final Ordering ordering; @@ -100,7 +104,13 @@ public class ChainedExecutionQueryRunner implements QueryRunner @Override public List call() throws Exception { - return Sequences.toList(input.run(query), Lists.newArrayList()); + try { + return Sequences.toList(input.run(query), Lists.newArrayList()); + } + catch (Exception e) { + log.error(e, "Exception with one of the sequences!"); + throw Throwables.propagate(e); + } } } );