From c8381b17aded72237033905a2e8986762335eb1c Mon Sep 17 00:00:00 2001 From: Timothy Farkas Date: Thu, 17 Aug 2017 14:29:38 -0700 Subject: [PATCH] - DRILL-5507 Made verbose info logging message debug level and printed it less frequently --- .../apache/drill/exec/store/schedule/BlockMapBuilder.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/schedule/BlockMapBuilder.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/schedule/BlockMapBuilder.java index 829bcd83ba8..d898566acef 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/schedule/BlockMapBuilder.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/schedule/BlockMapBuilder.java @@ -24,6 +24,7 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.Set; import java.util.concurrent.TimeUnit; import org.apache.drill.exec.metrics.DrillMetrics; @@ -45,6 +46,7 @@ import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Range; +import com.google.common.collect.Sets; public class BlockMapBuilder { static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(BlockMapBuilder.class); @@ -228,6 +230,7 @@ public EndpointByteMap getEndpointByteMap(FileWork work) throws IOException { // Find submap of ranges that intersect with the rowGroup ImmutableRangeMap subRangeMap = blockMap.subRangeMap(rowGroupRange); + final Set noDrillbitHosts = logger.isDebugEnabled() ? Sets.newHashSet() : null; // Iterate through each block in this submap and get the host for the block location for (Map.Entry,BlockLocation> block : subRangeMap.asMapOfRanges().entrySet()) { @@ -246,8 +249,8 @@ public EndpointByteMap getEndpointByteMap(FileWork work) throws IOException { DrillbitEndpoint endpoint = getDrillBitEndpoint(host); if (endpoint != null) { endpointByteMap.add(endpoint, bytes); - } else { - logger.info("Failure finding Drillbit running on host {}. Skipping affinity to that host.", host); + } else if (noDrillbitHosts != null && noDrillbitHosts.add(host)) { + logger.debug("Failure finding Drillbit running on host {}. Skipping affinity to that host.", host); } } }