You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by as...@apache.org on 2019/06/27 20:39:49 UTC

[incubator-druid] branch master updated: Enable DLS_DEAD_LOCAL_STORE (#7967)

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

asdf2014 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-druid.git


The following commit(s) were added to refs/heads/master by this push:
     new c6baa59  Enable DLS_DEAD_LOCAL_STORE (#7967)
c6baa59 is described below

commit c6baa59f77f733a7a6dae716117ba8f21f938700
Author: Fokko Driesprong <fo...@driesprong.frl>
AuthorDate: Thu Jun 27 22:39:42 2019 +0200

    Enable DLS_DEAD_LOCAL_STORE (#7967)
---
 codestyle/spotbugs-exclude.xml                                        | 1 -
 server/src/main/java/org/apache/druid/client/CachingQueryRunner.java  | 4 ----
 .../org/apache/druid/initialization/Log4jShutterDownerModule.java     | 4 ++--
 3 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/codestyle/spotbugs-exclude.xml b/codestyle/spotbugs-exclude.xml
index fbaec91..60a65c6 100644
--- a/codestyle/spotbugs-exclude.xml
+++ b/codestyle/spotbugs-exclude.xml
@@ -35,7 +35,6 @@
     <Bug pattern="CN_IDIOM_NO_SUPER_CALL"/>
     <Bug pattern="CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE"/>
     <Bug pattern="DC_DOUBLECHECK"/>
-    <Bug pattern="DLS_DEAD_LOCAL_STORE"/>
     <Bug pattern="DM_BOXED_PRIMITIVE_FOR_PARSING"/>
     <Bug pattern="DM_EXIT"/>
     <Bug pattern="DM_NUMBER_CTOR"/>
diff --git a/server/src/main/java/org/apache/druid/client/CachingQueryRunner.java b/server/src/main/java/org/apache/druid/client/CachingQueryRunner.java
index b3f3c25..0334620 100644
--- a/server/src/main/java/org/apache/druid/client/CachingQueryRunner.java
+++ b/server/src/main/java/org/apache/druid/client/CachingQueryRunner.java
@@ -22,7 +22,6 @@ package org.apache.druid.client;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.common.base.Function;
-import com.google.common.util.concurrent.ListenableFuture;
 import org.apache.druid.client.cache.Cache;
 import org.apache.druid.client.cache.CacheConfig;
 import org.apache.druid.client.cache.CachePopulator;
@@ -37,8 +36,6 @@ import org.apache.druid.query.QueryToolChest;
 import org.apache.druid.query.SegmentDescriptor;
 
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.Map;
@@ -133,7 +130,6 @@ public class CachingQueryRunner<T> implements QueryRunner<T>
       }
     }
 
-    final Collection<ListenableFuture<?>> cacheFutures = Collections.synchronizedList(new ArrayList<>());
     if (populateCache) {
       final Function cacheFn = strategy.prepareForSegmentLevelCache();
       return cachePopulator.wrap(base.run(queryPlus, responseContext), value -> cacheFn.apply(value), cache, key);
diff --git a/server/src/main/java/org/apache/druid/initialization/Log4jShutterDownerModule.java b/server/src/main/java/org/apache/druid/initialization/Log4jShutterDownerModule.java
index 103f03f..96ecdba 100644
--- a/server/src/main/java/org/apache/druid/initialization/Log4jShutterDownerModule.java
+++ b/server/src/main/java/org/apache/druid/initialization/Log4jShutterDownerModule.java
@@ -51,9 +51,9 @@ public class Log4jShutterDownerModule implements Module
       }
       // Reflection to try and allow non Log4j2 stuff to run. This acts as a gateway to stop errors in the next few lines
       // In log4j api
-      final Class<?> logManagerClazz = Class.forName("org.apache.logging.log4j.LogManager", false, loader);
+      Class.forName("org.apache.logging.log4j.LogManager", false, loader);
       // In log4j core
-      final Class<?> callbackRegistryClazz = Class.forName("org.apache.logging.log4j.core.util.ShutdownCallbackRegistry", false, loader);
+      Class.forName("org.apache.logging.log4j.core.util.ShutdownCallbackRegistry", false, loader);
 
       final LoggerContextFactory contextFactory = LogManager.getFactory();
       if (!(contextFactory instanceof Log4jContextFactory)) {


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