From 9c2c399198a3faf5f6392740b23086cebfe7037c Mon Sep 17 00:00:00 2001 From: joewitt Date: Tue, 16 Dec 2014 16:41:41 -0500 Subject: [PATCH] NIFI-175 extremely trivial removal of extraneous pom entries and quieted needless logging --- nar-bundles/standard-bundle/standard-processors/pom.xml | 2 +- .../cache/client/DistributedMapCacheClientService.java | 8 ++++++-- .../cache/client/DistributedSetCacheClientService.java | 7 +++++-- .../distributed-cache-server/pom.xml | 1 + 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/nar-bundles/standard-bundle/standard-processors/pom.xml b/nar-bundles/standard-bundle/standard-processors/pom.xml index 244f5246f5..6e08598aad 100644 --- a/nar-bundles/standard-bundle/standard-processors/pom.xml +++ b/nar-bundles/standard-bundle/standard-processors/pom.xml @@ -135,7 +135,6 @@ net.sf.saxon Saxon-HE - org.apache.nifi nifi-mock @@ -152,6 +151,7 @@ org.apache.nifi distributed-cache-client-service + test joda-time diff --git a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClientService.java b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClientService.java index ee96660a2d..4a67864319 100644 --- a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClientService.java +++ b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClientService.java @@ -248,13 +248,16 @@ public class DistributedMapCacheClientService extends AbstractControllerService } catch (final IOException e) { } } - logger.info("Closed {}", new Object[] { getIdentifier() }); + if (logger.isDebugEnabled() && getIdentifier() != null) { + logger.debug("Closed {}", new Object[]{getIdentifier()}); + } } @Override protected void finalize() throws Throwable { - if (!closed) + if (!closed) { close(); + } logger.debug("Finalize called"); } @@ -295,6 +298,7 @@ public class DistributedMapCacheClientService extends AbstractControllerService } private static interface CommsAction { + T execute(CommsSession commsSession) throws IOException; } diff --git a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedSetCacheClientService.java b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedSetCacheClientService.java index 1d7c94c2e5..c5882494e7 100644 --- a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedSetCacheClientService.java +++ b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedSetCacheClientService.java @@ -161,13 +161,16 @@ public class DistributedSetCacheClientService extends AbstractControllerService } catch (final IOException e) { } } - logger.info("Closed {}", new Object[] { getIdentifier() }); + if (logger.isDebugEnabled() && getIdentifier() != null) { + logger.debug("Closed {}", new Object[]{getIdentifier()}); + } } @Override protected void finalize() throws Throwable { - if (!closed) + if (!closed) { close(); + } logger.debug("Finalize called"); } diff --git a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/pom.xml b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/pom.xml index b57d2844a1..ca96d82281 100644 --- a/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/pom.xml +++ b/nar-bundles/standard-services/distributed-cache-services-bundle/distributed-cache-server/pom.xml @@ -73,6 +73,7 @@ org.apache.nifi ssl-context-service + test \ No newline at end of file