diff --git a/client/pom.xml b/client/pom.xml
index ec8fb0def29..1bc3e8fabdd 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -28,7 +28,7 @@
com.metamx
druid
- 0.3.34-SNAPSHOT
+ 0.3.35-SNAPSHOT
diff --git a/client/src/main/java/com/metamx/druid/Query.java b/client/src/main/java/com/metamx/druid/Query.java
index 818400fc262..02b81bc6586 100644
--- a/client/src/main/java/com/metamx/druid/Query.java
+++ b/client/src/main/java/com/metamx/druid/Query.java
@@ -31,7 +31,6 @@ import com.metamx.druid.query.segment.QuerySegmentWalker;
import com.metamx.druid.query.timeboundary.TimeBoundaryQuery;
import com.metamx.druid.query.timeseries.TimeseriesQuery;
-
import org.joda.time.Duration;
import org.joda.time.Interval;
@@ -43,14 +42,16 @@ import java.util.Map;
@JsonSubTypes.Type(name = Query.TIMESERIES, value = TimeseriesQuery.class),
@JsonSubTypes.Type(name = Query.SEARCH, value = SearchQuery.class),
@JsonSubTypes.Type(name = Query.TIME_BOUNDARY, value = TimeBoundaryQuery.class),
- @JsonSubTypes.Type(name = "groupBy", value= GroupByQuery.class),
- @JsonSubTypes.Type(name = "segmentMetadata", value= SegmentMetadataQuery.class)
+ @JsonSubTypes.Type(name = Query.GROUP_BY, value = GroupByQuery.class),
+ @JsonSubTypes.Type(name = Query.SEGMENT_METADATA, value = SegmentMetadataQuery.class)
})
public interface Query
{
public static final String TIMESERIES = "timeseries";
public static final String SEARCH = "search";
public static final String TIME_BOUNDARY = "timeBoundary";
+ public static final String GROUP_BY = "groupBy";
+ public static final String SEGMENT_METADATA = "segmentMetadata";
public String getDataSource();
diff --git a/client/src/main/java/com/metamx/druid/QueryableNode.java b/client/src/main/java/com/metamx/druid/QueryableNode.java
index a9a97ec64af..8aa3c3775b0 100644
--- a/client/src/main/java/com/metamx/druid/QueryableNode.java
+++ b/client/src/main/java/com/metamx/druid/QueryableNode.java
@@ -50,9 +50,7 @@ import com.metamx.metrics.MonitorSchedulerConfig;
import com.metamx.metrics.SysMonitor;
import com.metamx.phonebook.PhoneBook;
import org.I0Itec.zkclient.ZkClient;
-
-
-
+import org.joda.time.Duration;
import org.mortbay.jetty.Server;
import org.skife.config.ConfigurationObjectFactory;
@@ -332,9 +330,15 @@ public abstract class QueryableNode extends Registering
private void initializeEmitter()
{
if (emitter == null) {
- final HttpClient httpClient = HttpClientInit.createClient(
- HttpClientConfig.builder().withNumConnections(1).build(), lifecycle
- );
+ final HttpClientConfig.Builder configBuilder = HttpClientConfig.builder()
+ .withNumConnections(1);
+
+ final String emitterTimeoutDuration = props.getProperty("druid.emitter.timeOut");
+ if (emitterTimeoutDuration != null) {
+ configBuilder.withReadTimeout(new Duration(emitterTimeoutDuration));
+ }
+
+ final HttpClient httpClient = HttpClientInit.createClient(configBuilder.build(), lifecycle);
setEmitter(
new ServiceEmitter(
@@ -358,7 +362,7 @@ public abstract class QueryableNode extends Registering
@LifecycleStart
public synchronized void start() throws Exception
{
- if (! initialized) {
+ if (!initialized) {
init();
}
diff --git a/client/src/main/java/com/metamx/druid/RegisteringNode.java b/client/src/main/java/com/metamx/druid/RegisteringNode.java
index 1332bbd2a4b..0d09de2f0a3 100644
--- a/client/src/main/java/com/metamx/druid/RegisteringNode.java
+++ b/client/src/main/java/com/metamx/druid/RegisteringNode.java
@@ -22,7 +22,6 @@ package com.metamx.druid;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.metamx.druid.index.v1.serde.Registererer;
-
import java.util.Arrays;
import java.util.List;
diff --git a/client/src/main/java/com/metamx/druid/SearchBinaryFn.java b/client/src/main/java/com/metamx/druid/SearchBinaryFn.java
index bf87f20bbb3..b9ebe74b705 100644
--- a/client/src/main/java/com/metamx/druid/SearchBinaryFn.java
+++ b/client/src/main/java/com/metamx/druid/SearchBinaryFn.java
@@ -26,7 +26,6 @@ import com.metamx.druid.query.search.SearchHit;
import com.metamx.druid.query.search.SearchSortSpec;
import com.metamx.druid.result.Result;
import com.metamx.druid.result.SearchResultValue;
-import org.joda.time.DateTime;
import java.util.TreeSet;
diff --git a/client/src/main/java/com/metamx/druid/client/BrokerServerView.java b/client/src/main/java/com/metamx/druid/client/BrokerServerView.java
index 98900e9de41..945ac7424b8 100644
--- a/client/src/main/java/com/metamx/druid/client/BrokerServerView.java
+++ b/client/src/main/java/com/metamx/druid/client/BrokerServerView.java
@@ -30,7 +30,6 @@ import com.metamx.druid.query.QueryRunner;
import com.metamx.druid.query.QueryToolChestWarehouse;
import com.metamx.http.client.HttpClient;
-
import javax.annotation.Nullable;
import java.util.Iterator;
import java.util.Map;
diff --git a/client/src/main/java/com/metamx/druid/client/CachingClusteredClient.java b/client/src/main/java/com/metamx/druid/client/CachingClusteredClient.java
index 6d896d8bf0f..8a2cd983ea8 100644
--- a/client/src/main/java/com/metamx/druid/client/CachingClusteredClient.java
+++ b/client/src/main/java/com/metamx/druid/client/CachingClusteredClient.java
@@ -56,7 +56,6 @@ import com.metamx.druid.query.segment.SegmentDescriptor;
import com.metamx.druid.result.BySegmentResultValueClass;
import com.metamx.druid.result.Result;
-
import org.joda.time.DateTime;
import org.joda.time.Interval;
@@ -215,7 +214,6 @@ public class CachingClusteredClient implements QueryRunner
descriptors.add(segment.rhs);
}
-
return new LazySequence(
new Supplier>()
{
diff --git a/client/src/main/java/com/metamx/druid/client/DataSegment.java b/client/src/main/java/com/metamx/druid/client/DataSegment.java
index e8b7e55a495..fec47128cf7 100644
--- a/client/src/main/java/com/metamx/druid/client/DataSegment.java
+++ b/client/src/main/java/com/metamx/druid/client/DataSegment.java
@@ -28,7 +28,6 @@ import com.google.common.base.Predicate;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
import com.metamx.common.Granularity;
import com.metamx.druid.jackson.CommaListJoinDeserializer;
import com.metamx.druid.jackson.CommaListJoinSerializer;
@@ -36,9 +35,6 @@ import com.metamx.druid.query.segment.SegmentDescriptor;
import com.metamx.druid.shard.NoneShardSpec;
import com.metamx.druid.shard.ShardSpec;
-
-
-
import org.joda.time.DateTime;
import org.joda.time.Interval;
diff --git a/client/src/main/java/com/metamx/druid/client/DirectDruidClient.java b/client/src/main/java/com/metamx/druid/client/DirectDruidClient.java
index 7c3e23c1395..755c79d7cc3 100644
--- a/client/src/main/java/com/metamx/druid/client/DirectDruidClient.java
+++ b/client/src/main/java/com/metamx/druid/client/DirectDruidClient.java
@@ -48,11 +48,6 @@ import com.metamx.http.client.io.AppendableByteArrayInputStream;
import com.metamx.http.client.response.ClientResponse;
import com.metamx.http.client.response.InputStreamResponseHandler;
-
-
-
-
-
import org.jboss.netty.handler.codec.http.HttpChunk;
import org.jboss.netty.handler.codec.http.HttpHeaders;
import org.jboss.netty.handler.codec.http.HttpResponse;
diff --git a/client/src/main/java/com/metamx/druid/client/DruidDataSource.java b/client/src/main/java/com/metamx/druid/client/DruidDataSource.java
index e112bbf6234..ebe566052f8 100644
--- a/client/src/main/java/com/metamx/druid/client/DruidDataSource.java
+++ b/client/src/main/java/com/metamx/druid/client/DruidDataSource.java
@@ -22,7 +22,6 @@ package com.metamx.druid.client;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.Maps;
-
import java.util.Collections;
import java.util.Map;
import java.util.Set;
diff --git a/client/src/main/java/com/metamx/druid/client/DruidServer.java b/client/src/main/java/com/metamx/druid/client/DruidServer.java
index ff565e04fce..934028d5a78 100644
--- a/client/src/main/java/com/metamx/druid/client/DruidServer.java
+++ b/client/src/main/java/com/metamx/druid/client/DruidServer.java
@@ -24,7 +24,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableMap;
import com.metamx.common.logger.Logger;
-import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
diff --git a/client/src/main/java/com/metamx/druid/client/InventoryManager.java b/client/src/main/java/com/metamx/druid/client/InventoryManager.java
index 2b19bbe80f5..63dc3a8e083 100644
--- a/client/src/main/java/com/metamx/druid/client/InventoryManager.java
+++ b/client/src/main/java/com/metamx/druid/client/InventoryManager.java
@@ -28,7 +28,6 @@ import com.metamx.phonebook.PhoneBook;
import com.metamx.phonebook.PhoneBookPeon;
import java.util.Arrays;
-import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
diff --git a/client/src/main/java/com/metamx/druid/client/ZKPhoneBook.java b/client/src/main/java/com/metamx/druid/client/ZKPhoneBook.java
index 1b8fa9df876..fe1833662d4 100644
--- a/client/src/main/java/com/metamx/druid/client/ZKPhoneBook.java
+++ b/client/src/main/java/com/metamx/druid/client/ZKPhoneBook.java
@@ -35,7 +35,6 @@ import org.I0Itec.zkclient.ZkClient;
import org.I0Itec.zkclient.exception.ZkNoNodeException;
import org.I0Itec.zkclient.exception.ZkNodeExistsException;
-
import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
diff --git a/client/src/main/java/com/metamx/druid/client/cache/MemcachedCache.java b/client/src/main/java/com/metamx/druid/client/cache/MemcachedCache.java
index 436c606d496..9dca20d9fb8 100644
--- a/client/src/main/java/com/metamx/druid/client/cache/MemcachedCache.java
+++ b/client/src/main/java/com/metamx/druid/client/cache/MemcachedCache.java
@@ -25,8 +25,6 @@ import com.google.common.base.Throwables;
import com.google.common.collect.Maps;
import com.google.common.primitives.Ints;
import com.metamx.common.logger.Logger;
-import com.metamx.emitter.service.ServiceEmitter;
-import com.metamx.emitter.service.ServiceEventBuilder;
import net.spy.memcached.AddrUtil;
import net.spy.memcached.ConnectionFactoryBuilder;
import net.spy.memcached.DefaultHashAlgorithm;
diff --git a/client/src/main/java/com/metamx/druid/client/indexing/ClientAppendQuery.java b/client/src/main/java/com/metamx/druid/client/indexing/ClientAppendQuery.java
index 5f744918a0a..6e9a2eb4163 100644
--- a/client/src/main/java/com/metamx/druid/client/indexing/ClientAppendQuery.java
+++ b/client/src/main/java/com/metamx/druid/client/indexing/ClientAppendQuery.java
@@ -23,8 +23,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.metamx.druid.client.DataSegment;
-
-
import java.util.List;
/**
diff --git a/client/src/main/java/com/metamx/druid/client/indexing/ClientMergeQuery.java b/client/src/main/java/com/metamx/druid/client/indexing/ClientMergeQuery.java
index e000826ff9a..e363618a107 100644
--- a/client/src/main/java/com/metamx/druid/client/indexing/ClientMergeQuery.java
+++ b/client/src/main/java/com/metamx/druid/client/indexing/ClientMergeQuery.java
@@ -24,8 +24,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.metamx.druid.aggregation.AggregatorFactory;
import com.metamx.druid.client.DataSegment;
-
-
import java.util.List;
/**
diff --git a/client/src/main/java/com/metamx/druid/client/indexing/IndexingServiceClient.java b/client/src/main/java/com/metamx/druid/client/indexing/IndexingServiceClient.java
index 34277797cba..d383df69f33 100644
--- a/client/src/main/java/com/metamx/druid/client/indexing/IndexingServiceClient.java
+++ b/client/src/main/java/com/metamx/druid/client/indexing/IndexingServiceClient.java
@@ -21,7 +21,6 @@ package com.metamx.druid.client.indexing;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.Throwables;
-import com.google.common.collect.ImmutableMap;
import com.metamx.common.IAE;
import com.metamx.common.ISE;
import com.metamx.druid.client.DataSegment;
@@ -31,7 +30,6 @@ import com.netflix.curator.x.discovery.ServiceInstance;
import com.netflix.curator.x.discovery.ServiceProvider;
import org.joda.time.Interval;
-
import java.io.InputStream;
import java.net.URL;
import java.util.Iterator;
@@ -102,7 +100,6 @@ public class IndexingServiceClient
}
}
-
private String baseUrl()
{
try {
diff --git a/client/src/main/java/com/metamx/druid/http/BrokerNode.java b/client/src/main/java/com/metamx/druid/http/BrokerNode.java
index 92b55f97fce..592e2bdea9c 100644
--- a/client/src/main/java/com/metamx/druid/http/BrokerNode.java
+++ b/client/src/main/java/com/metamx/druid/http/BrokerNode.java
@@ -56,7 +56,6 @@ import com.metamx.metrics.Monitor;
import com.netflix.curator.framework.CuratorFramework;
import com.netflix.curator.x.discovery.ServiceDiscovery;
-
import org.mortbay.jetty.servlet.Context;
import org.mortbay.jetty.servlet.ServletHolder;
import org.skife.config.ConfigurationObjectFactory;
@@ -199,7 +198,6 @@ public class BrokerNode extends QueryableNode
final CachingClusteredClient baseClient = new CachingClusteredClient(warehouse, view, cache, getSmileMapper());
lifecycle.addManagedInstance(baseClient);
-
final ClientQuerySegmentWalker texasRanger = new ClientQuerySegmentWalker(warehouse, getEmitter(), baseClient);
List theModules = Lists.newArrayList();
diff --git a/client/src/main/java/com/metamx/druid/http/ClientServletModule.java b/client/src/main/java/com/metamx/druid/http/ClientServletModule.java
index c5b89f37004..48b328e44a0 100644
--- a/client/src/main/java/com/metamx/druid/http/ClientServletModule.java
+++ b/client/src/main/java/com/metamx/druid/http/ClientServletModule.java
@@ -27,8 +27,6 @@ import com.metamx.druid.query.segment.QuerySegmentWalker;
import com.sun.jersey.guice.JerseyServletModule;
import com.sun.jersey.guice.spi.container.servlet.GuiceContainer;
-
-
import javax.inject.Singleton;
/**
diff --git a/client/src/main/java/com/metamx/druid/http/FileRequestLogger.java b/client/src/main/java/com/metamx/druid/http/FileRequestLogger.java
index 110e72f1c6f..32b245e6c60 100644
--- a/client/src/main/java/com/metamx/druid/http/FileRequestLogger.java
+++ b/client/src/main/java/com/metamx/druid/http/FileRequestLogger.java
@@ -48,7 +48,6 @@ public class FileRequestLogger implements RequestLogger
private volatile DateTime currentDay;
private volatile FileWriter fileWriter;
-
public FileRequestLogger(ObjectMapper objectMapper, ScheduledExecutorService exec, File baseDir)
{
this.exec = exec;
diff --git a/client/src/main/java/com/metamx/druid/http/QueryServlet.java b/client/src/main/java/com/metamx/druid/http/QueryServlet.java
index bed59a8b525..8b871a49bcc 100644
--- a/client/src/main/java/com/metamx/druid/http/QueryServlet.java
+++ b/client/src/main/java/com/metamx/druid/http/QueryServlet.java
@@ -34,7 +34,6 @@ import com.metamx.emitter.service.AlertEvent;
import com.metamx.emitter.service.ServiceEmitter;
import com.metamx.emitter.service.ServiceMetricEvent;
-
import org.joda.time.DateTime;
import org.mortbay.jetty.Request;
diff --git a/client/src/main/java/com/metamx/druid/initialization/Initialization.java b/client/src/main/java/com/metamx/druid/initialization/Initialization.java
index d173f5a95f7..1b4dcbd3a27 100644
--- a/client/src/main/java/com/metamx/druid/initialization/Initialization.java
+++ b/client/src/main/java/com/metamx/druid/initialization/Initialization.java
@@ -117,7 +117,6 @@ public class Initialization
);
}
-
/**
* Load properties.
* Properties are layered, high to low precedence: cmdLine -D, runtime.properties file, stored in zookeeper.
diff --git a/client/src/main/java/com/metamx/druid/query/CacheStrategy.java b/client/src/main/java/com/metamx/druid/query/CacheStrategy.java
index b17e95b86e7..1e73ada3f3b 100644
--- a/client/src/main/java/com/metamx/druid/query/CacheStrategy.java
+++ b/client/src/main/java/com/metamx/druid/query/CacheStrategy.java
@@ -24,7 +24,6 @@ import com.google.common.base.Function;
import com.metamx.common.guava.Sequence;
import com.metamx.druid.Query;
-
/**
*/
public interface CacheStrategy>
diff --git a/client/src/main/java/com/metamx/druid/query/Queries.java b/client/src/main/java/com/metamx/druid/query/Queries.java
index ae5f958b563..0ebc18e64fd 100644
--- a/client/src/main/java/com/metamx/druid/query/Queries.java
+++ b/client/src/main/java/com/metamx/druid/query/Queries.java
@@ -20,7 +20,6 @@
package com.metamx.druid.query;
import com.google.common.base.Function;
-import com.google.common.base.Joiner;
import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
diff --git a/client/src/main/java/com/metamx/druid/query/dimension/DefaultDimensionSpec.java b/client/src/main/java/com/metamx/druid/query/dimension/DefaultDimensionSpec.java
index a3c36476253..b27b361eda0 100644
--- a/client/src/main/java/com/metamx/druid/query/dimension/DefaultDimensionSpec.java
+++ b/client/src/main/java/com/metamx/druid/query/dimension/DefaultDimensionSpec.java
@@ -23,8 +23,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.metamx.druid.query.extraction.DimExtractionFn;
-
-
import java.nio.ByteBuffer;
/**
diff --git a/client/src/main/java/com/metamx/druid/query/dimension/DimensionSpec.java b/client/src/main/java/com/metamx/druid/query/dimension/DimensionSpec.java
index bcf5fabf62b..0773ef6ca06 100644
--- a/client/src/main/java/com/metamx/druid/query/dimension/DimensionSpec.java
+++ b/client/src/main/java/com/metamx/druid/query/dimension/DimensionSpec.java
@@ -23,8 +23,6 @@ import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.metamx.druid.query.extraction.DimExtractionFn;
-
-
/**
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", defaultImpl = LegacyDimensionSpec.class)
diff --git a/client/src/main/java/com/metamx/druid/query/dimension/ExtractionDimensionSpec.java b/client/src/main/java/com/metamx/druid/query/dimension/ExtractionDimensionSpec.java
index 6feb011dcd7..c746b7b3108 100644
--- a/client/src/main/java/com/metamx/druid/query/dimension/ExtractionDimensionSpec.java
+++ b/client/src/main/java/com/metamx/druid/query/dimension/ExtractionDimensionSpec.java
@@ -23,8 +23,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.metamx.druid.query.extraction.DimExtractionFn;
-
-
import java.nio.ByteBuffer;
/**
diff --git a/client/src/main/java/com/metamx/druid/query/dimension/LegacyDimensionSpec.java b/client/src/main/java/com/metamx/druid/query/dimension/LegacyDimensionSpec.java
index b753b04c46b..352142c1166 100644
--- a/client/src/main/java/com/metamx/druid/query/dimension/LegacyDimensionSpec.java
+++ b/client/src/main/java/com/metamx/druid/query/dimension/LegacyDimensionSpec.java
@@ -22,7 +22,6 @@ package com.metamx.druid.query.dimension;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.metamx.common.IAE;
-
import java.util.Map;
/**
diff --git a/client/src/main/java/com/metamx/druid/query/extraction/DimExtractionFn.java b/client/src/main/java/com/metamx/druid/query/extraction/DimExtractionFn.java
index 8fe869cb4af..45b84313542 100644
--- a/client/src/main/java/com/metamx/druid/query/extraction/DimExtractionFn.java
+++ b/client/src/main/java/com/metamx/druid/query/extraction/DimExtractionFn.java
@@ -19,7 +19,6 @@
package com.metamx.druid.query.extraction;
-
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
diff --git a/client/src/main/java/com/metamx/druid/query/extraction/PartialDimExtractionFn.java b/client/src/main/java/com/metamx/druid/query/extraction/PartialDimExtractionFn.java
index f30c4578706..86b1d1ddbd2 100644
--- a/client/src/main/java/com/metamx/druid/query/extraction/PartialDimExtractionFn.java
+++ b/client/src/main/java/com/metamx/druid/query/extraction/PartialDimExtractionFn.java
@@ -19,9 +19,6 @@
package com.metamx.druid.query.extraction;
-
-
-
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/client/src/main/java/com/metamx/druid/query/extraction/RegexDimExtractionFn.java b/client/src/main/java/com/metamx/druid/query/extraction/RegexDimExtractionFn.java
index c722b0c52b7..f5135a2d1c5 100644
--- a/client/src/main/java/com/metamx/druid/query/extraction/RegexDimExtractionFn.java
+++ b/client/src/main/java/com/metamx/druid/query/extraction/RegexDimExtractionFn.java
@@ -19,9 +19,6 @@
package com.metamx.druid.query.extraction;
-
-
-
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -75,4 +72,4 @@ public class RegexDimExtractionFn implements DimExtractionFn
{
return String.format("regex(%s)", expr);
}
-}
\ No newline at end of file
+}
diff --git a/client/src/main/java/com/metamx/druid/query/extraction/SearchQuerySpecDimExtractionFn.java b/client/src/main/java/com/metamx/druid/query/extraction/SearchQuerySpecDimExtractionFn.java
index 7dbc2f3c65d..3b1a323ac1c 100644
--- a/client/src/main/java/com/metamx/druid/query/extraction/SearchQuerySpecDimExtractionFn.java
+++ b/client/src/main/java/com/metamx/druid/query/extraction/SearchQuerySpecDimExtractionFn.java
@@ -23,8 +23,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.metamx.druid.query.search.SearchQuerySpec;
-
-
import java.nio.ByteBuffer;
/**
diff --git a/client/src/main/java/com/metamx/druid/query/extraction/TimeDimExtractionFn.java b/client/src/main/java/com/metamx/druid/query/extraction/TimeDimExtractionFn.java
index c02797cf088..71ff8bed15f 100644
--- a/client/src/main/java/com/metamx/druid/query/extraction/TimeDimExtractionFn.java
+++ b/client/src/main/java/com/metamx/druid/query/extraction/TimeDimExtractionFn.java
@@ -23,8 +23,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ibm.icu.text.SimpleDateFormat;
-
-
import java.nio.ByteBuffer;
import java.text.ParseException;
import java.util.Date;
diff --git a/client/src/main/java/com/metamx/druid/query/filter/AndDimFilter.java b/client/src/main/java/com/metamx/druid/query/filter/AndDimFilter.java
index 6b557fdba27..6a1bb9109aa 100644
--- a/client/src/main/java/com/metamx/druid/query/filter/AndDimFilter.java
+++ b/client/src/main/java/com/metamx/druid/query/filter/AndDimFilter.java
@@ -22,9 +22,9 @@ package com.metamx.druid.query.filter;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Joiner;
+import com.google.common.base.Preconditions;
-
-
+import java.util.Collections;
import java.util.List;
/**
@@ -40,6 +40,8 @@ public class AndDimFilter implements DimFilter
@JsonProperty("fields") List fields
)
{
+ fields.removeAll(Collections.singletonList(null));
+ Preconditions.checkArgument(fields.size() > 0, "AND operator requires at least one field");
this.fields = fields;
}
diff --git a/client/src/main/java/com/metamx/druid/query/filter/DimFilter.java b/client/src/main/java/com/metamx/druid/query/filter/DimFilter.java
index 5099f95b3d2..1f1464791b3 100644
--- a/client/src/main/java/com/metamx/druid/query/filter/DimFilter.java
+++ b/client/src/main/java/com/metamx/druid/query/filter/DimFilter.java
@@ -19,7 +19,6 @@
package com.metamx.druid.query.filter;
-
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
diff --git a/client/src/main/java/com/metamx/druid/query/filter/DimFilters.java b/client/src/main/java/com/metamx/druid/query/filter/DimFilters.java
index 8a245dab7d0..0b74f443c3e 100644
--- a/client/src/main/java/com/metamx/druid/query/filter/DimFilters.java
+++ b/client/src/main/java/com/metamx/druid/query/filter/DimFilters.java
@@ -20,10 +20,8 @@
package com.metamx.druid.query.filter;
import com.google.common.base.Function;
-import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
-import javax.annotation.Nullable;
import java.util.Arrays;
import java.util.List;
diff --git a/client/src/main/java/com/metamx/druid/query/filter/ExtractionDimFilter.java b/client/src/main/java/com/metamx/druid/query/filter/ExtractionDimFilter.java
index 21785f06b0c..b6a43c5af04 100644
--- a/client/src/main/java/com/metamx/druid/query/filter/ExtractionDimFilter.java
+++ b/client/src/main/java/com/metamx/druid/query/filter/ExtractionDimFilter.java
@@ -21,10 +21,9 @@ package com.metamx.druid.query.filter;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
+import com.google.common.base.Preconditions;
import com.metamx.druid.query.extraction.DimExtractionFn;
-
-
import java.nio.ByteBuffer;
/**
@@ -42,6 +41,10 @@ public class ExtractionDimFilter implements DimFilter
@JsonProperty("dimExtractionFn") DimExtractionFn dimExtractionFn
)
{
+ Preconditions.checkArgument(dimension != null, "dimension must not be null");
+ Preconditions.checkArgument(value != null, "value must not be null");
+ Preconditions.checkArgument(dimExtractionFn != null, "extraction function must not be null");
+
this.dimension = dimension;
this.value = value;
this.dimExtractionFn = dimExtractionFn;
diff --git a/client/src/main/java/com/metamx/druid/query/filter/JavaScriptDimFilter.java b/client/src/main/java/com/metamx/druid/query/filter/JavaScriptDimFilter.java
index 847d13c9bd4..00db76b4f05 100644
--- a/client/src/main/java/com/metamx/druid/query/filter/JavaScriptDimFilter.java
+++ b/client/src/main/java/com/metamx/druid/query/filter/JavaScriptDimFilter.java
@@ -3,6 +3,7 @@ package com.metamx.druid.query.filter;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Charsets;
+import com.google.common.base.Preconditions;
import java.nio.ByteBuffer;
@@ -17,6 +18,8 @@ public class JavaScriptDimFilter implements DimFilter
@JsonProperty("function") String function
)
{
+ Preconditions.checkArgument(dimension != null, "dimension must not be null");
+ Preconditions.checkArgument(function != null, "function must not be null");
this.dimension = dimension;
this.function = function;
}
diff --git a/client/src/main/java/com/metamx/druid/query/filter/NotDimFilter.java b/client/src/main/java/com/metamx/druid/query/filter/NotDimFilter.java
index 0753d9f64de..9f690f1322d 100644
--- a/client/src/main/java/com/metamx/druid/query/filter/NotDimFilter.java
+++ b/client/src/main/java/com/metamx/druid/query/filter/NotDimFilter.java
@@ -19,11 +19,9 @@
package com.metamx.druid.query.filter;
-
-
-
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
+import com.google.common.base.Preconditions;
import java.nio.ByteBuffer;
@@ -38,6 +36,7 @@ public class NotDimFilter implements DimFilter
@JsonProperty("field") DimFilter field
)
{
+ Preconditions.checkArgument(field != null, "NOT operator requires at least one field");
this.field = field;
}
diff --git a/client/src/main/java/com/metamx/druid/query/filter/OrDimFilter.java b/client/src/main/java/com/metamx/druid/query/filter/OrDimFilter.java
index 9105cfe0412..4fdde0f46bb 100644
--- a/client/src/main/java/com/metamx/druid/query/filter/OrDimFilter.java
+++ b/client/src/main/java/com/metamx/druid/query/filter/OrDimFilter.java
@@ -22,9 +22,9 @@ package com.metamx.druid.query.filter;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Joiner;
+import com.google.common.base.Preconditions;
-
-
+import java.util.Collections;
import java.util.List;
/**
@@ -40,6 +40,8 @@ public class OrDimFilter implements DimFilter
@JsonProperty("fields") List fields
)
{
+ fields.removeAll(Collections.singletonList(null));
+ Preconditions.checkArgument(fields.size() > 0, "OR operator requires at least one field");
this.fields = fields;
}
diff --git a/client/src/main/java/com/metamx/druid/query/filter/RegexDimFilter.java b/client/src/main/java/com/metamx/druid/query/filter/RegexDimFilter.java
index 6ee15d4b0c9..edbd1b7fc5d 100644
--- a/client/src/main/java/com/metamx/druid/query/filter/RegexDimFilter.java
+++ b/client/src/main/java/com/metamx/druid/query/filter/RegexDimFilter.java
@@ -22,8 +22,7 @@ package com.metamx.druid.query.filter;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Charsets;
-
-
+import com.google.common.base.Preconditions;
import java.nio.ByteBuffer;
@@ -40,6 +39,8 @@ public class RegexDimFilter implements DimFilter
@JsonProperty("pattern") String pattern
)
{
+ Preconditions.checkArgument(dimension != null, "dimension must not be null");
+ Preconditions.checkArgument(pattern != null, "pattern must not be null");
this.dimension = dimension;
this.pattern = pattern;
}
diff --git a/client/src/main/java/com/metamx/druid/query/filter/SearchQueryDimFilter.java b/client/src/main/java/com/metamx/druid/query/filter/SearchQueryDimFilter.java
index 7b1b6b0fd15..edb7ce791e0 100644
--- a/client/src/main/java/com/metamx/druid/query/filter/SearchQueryDimFilter.java
+++ b/client/src/main/java/com/metamx/druid/query/filter/SearchQueryDimFilter.java
@@ -21,9 +21,9 @@ package com.metamx.druid.query.filter;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Charsets;
+import com.google.common.base.Preconditions;
import com.metamx.druid.query.search.SearchQuerySpec;
-
import java.nio.ByteBuffer;
/**
@@ -38,6 +38,9 @@ public class SearchQueryDimFilter implements DimFilter
@JsonProperty("query") SearchQuerySpec query
)
{
+ Preconditions.checkArgument(dimension != null, "dimension must not be null");
+ Preconditions.checkArgument(query != null, "query must not be null");
+
this.dimension = dimension;
this.query = query;
}
diff --git a/client/src/main/java/com/metamx/druid/query/filter/SelectorDimFilter.java b/client/src/main/java/com/metamx/druid/query/filter/SelectorDimFilter.java
index 11deaeb28e2..039d9893411 100644
--- a/client/src/main/java/com/metamx/druid/query/filter/SelectorDimFilter.java
+++ b/client/src/main/java/com/metamx/druid/query/filter/SelectorDimFilter.java
@@ -19,11 +19,9 @@
package com.metamx.druid.query.filter;
-
-
-
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
+import com.google.common.base.Preconditions;
import java.nio.ByteBuffer;
@@ -40,6 +38,8 @@ public class SelectorDimFilter implements DimFilter
@JsonProperty("value") String value
)
{
+ Preconditions.checkArgument(dimension != null, "dimension must not be null");
+ Preconditions.checkArgument(value != null, "value must not be null");
this.dimension = dimension;
this.value = value;
}
diff --git a/client/src/main/java/com/metamx/druid/query/group/GroupByQuery.java b/client/src/main/java/com/metamx/druid/query/group/GroupByQuery.java
index 4c1ac740dca..df8ccedaa7a 100644
--- a/client/src/main/java/com/metamx/druid/query/group/GroupByQuery.java
+++ b/client/src/main/java/com/metamx/druid/query/group/GroupByQuery.java
@@ -30,14 +30,13 @@ import com.metamx.druid.QueryGranularity;
import com.metamx.druid.aggregation.AggregatorFactory;
import com.metamx.druid.aggregation.post.PostAggregator;
import com.metamx.druid.input.Row;
+import com.metamx.druid.query.Queries;
import com.metamx.druid.query.dimension.DefaultDimensionSpec;
import com.metamx.druid.query.dimension.DimensionSpec;
import com.metamx.druid.query.filter.DimFilter;
import com.metamx.druid.query.segment.LegacySegmentSpec;
import com.metamx.druid.query.segment.QuerySegmentSpec;
-
-
import java.util.List;
import java.util.Map;
@@ -77,6 +76,7 @@ public class GroupByQuery extends BaseQuery
Preconditions.checkNotNull(this.granularity, "Must specify a granularity");
Preconditions.checkNotNull(this.aggregatorSpecs, "Must specify at least one aggregator");
+ Queries.verifyAggregations(this.aggregatorSpecs, this.postAggregatorSpecs);
}
@JsonProperty("filter")
@@ -118,11 +118,11 @@ public class GroupByQuery extends BaseQuery
@Override
public String getType()
{
- return "groupBy";
+ return Query.GROUP_BY;
}
@Override
- public Query withOverriddenContext(Map contextOverride)
+ public GroupByQuery withOverriddenContext(Map contextOverride)
{
return new GroupByQuery(
getDataSource(),
@@ -137,7 +137,7 @@ public class GroupByQuery extends BaseQuery
}
@Override
- public Query withQuerySegmentSpec(QuerySegmentSpec spec)
+ public GroupByQuery withQuerySegmentSpec(QuerySegmentSpec spec)
{
return new GroupByQuery(
getDataSource(),
diff --git a/client/src/main/java/com/metamx/druid/query/group/GroupByQueryQueryToolChest.java b/client/src/main/java/com/metamx/druid/query/group/GroupByQueryQueryToolChest.java
index a2a68ecc1cf..f6e63b36acb 100644
--- a/client/src/main/java/com/metamx/druid/query/group/GroupByQueryQueryToolChest.java
+++ b/client/src/main/java/com/metamx/druid/query/group/GroupByQueryQueryToolChest.java
@@ -23,6 +23,7 @@ import com.fasterxml.jackson.core.type.TypeReference;
import com.google.common.base.Function;
import com.google.common.base.Functions;
import com.google.common.base.Joiner;
+import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
import com.metamx.common.ISE;
import com.metamx.common.guava.Accumulator;
@@ -49,6 +50,7 @@ import org.joda.time.Minutes;
import javax.annotation.Nullable;
import java.util.List;
+import java.util.Map;
import java.util.Properties;
/**
@@ -57,6 +59,8 @@ public class GroupByQueryQueryToolChest extends QueryToolChest TYPE_REFERENCE = new TypeReference(){};
+ private static final String GROUP_BY_MERGE_KEY = "groupByMerge";
+ private static final Map NO_MERGE_CONTEXT = ImmutableMap.of(GROUP_BY_MERGE_KEY, "false");
private static final int maxRows;
@@ -75,77 +79,85 @@ public class GroupByQueryQueryToolChest extends QueryToolChest run(Query input)
{
- final GroupByQuery query = (GroupByQuery) input;
-
- final QueryGranularity gran = query.getGranularity();
- final long timeStart = query.getIntervals().get(0).getStartMillis();
-
- // use gran.iterable instead of gran.truncate so that
- // AllGranularity returns timeStart instead of Long.MIN_VALUE
- final long granTimeStart = gran.iterable(timeStart, timeStart+1).iterator().next();
-
- final List aggs = Lists.transform(
- query.getAggregatorSpecs(),
- new Function()
- {
- @Override
- public AggregatorFactory apply(@Nullable AggregatorFactory input)
- {
- return input.getCombiningFactory();
- }
- }
- );
- final List dimensions = Lists.transform(
- query.getDimensions(),
- new Function()
- {
- @Override
- public String apply(@Nullable DimensionSpec input)
- {
- return input.getOutputName();
- }
- }
- );
-
- final IncrementalIndex index = runner.run(query).accumulate(
- new IncrementalIndex(
- // use granularity truncated min timestamp
- // since incoming truncated timestamps may precede timeStart
- granTimeStart,
- gran,
- aggs.toArray(new AggregatorFactory[aggs.size()])
- ),
- new Accumulator()
- {
- @Override
- public IncrementalIndex accumulate(IncrementalIndex accumulated, Row in)
- {
- if (accumulated.add(Rows.toInputRow(in, dimensions)) > maxRows) {
- throw new ISE("Computation exceeds maxRows limit[%s]", maxRows);
- }
-
- return accumulated;
- }
- }
- );
-
- // convert millis back to timestamp according to granularity to preserve time zone information
- return Sequences.map(
- Sequences.simple(index.iterableWithPostAggregations(query.getPostAggregatorSpecs())),
- new Function()
- {
- @Override
- public Row apply(Row input)
- {
- final MapBasedRow row = (MapBasedRow) input;
- return new MapBasedRow(gran.toDateTime(row.getTimestampFromEpoch()), row.getEvent());
- }
- }
- );
+ if (Boolean.valueOf(input.getContextValue(GROUP_BY_MERGE_KEY, "true"))) {
+ return mergeGroupByResults(((GroupByQuery) input).withOverriddenContext(NO_MERGE_CONTEXT), runner);
+ }
+ else {
+ return runner.run(input);
+ }
}
};
}
+ private Sequence mergeGroupByResults(GroupByQuery query, QueryRunner runner)
+ {
+ final QueryGranularity gran = query.getGranularity();
+ final long timeStart = query.getIntervals().get(0).getStartMillis();
+
+ // use gran.iterable instead of gran.truncate so that
+ // AllGranularity returns timeStart instead of Long.MIN_VALUE
+ final long granTimeStart = gran.iterable(timeStart, timeStart+1).iterator().next();
+
+ final List aggs = Lists.transform(
+ query.getAggregatorSpecs(),
+ new Function()
+ {
+ @Override
+ public AggregatorFactory apply(@Nullable AggregatorFactory input)
+ {
+ return input.getCombiningFactory();
+ }
+ }
+ );
+ final List dimensions = Lists.transform(
+ query.getDimensions(),
+ new Function()
+ {
+ @Override
+ public String apply(@Nullable DimensionSpec input)
+ {
+ return input.getOutputName();
+ }
+ }
+ );
+
+ final IncrementalIndex index = runner.run(query).accumulate(
+ new IncrementalIndex(
+ // use granularity truncated min timestamp
+ // since incoming truncated timestamps may precede timeStart
+ granTimeStart,
+ gran,
+ aggs.toArray(new AggregatorFactory[aggs.size()])
+ ),
+ new Accumulator()
+ {
+ @Override
+ public IncrementalIndex accumulate(IncrementalIndex accumulated, Row in)
+ {
+ if (accumulated.add(Rows.toCaseInsensitiveInputRow(in, dimensions)) > maxRows) {
+ throw new ISE("Computation exceeds maxRows limit[%s]", maxRows);
+ }
+
+ return accumulated;
+ }
+ }
+ );
+
+ // convert millis back to timestamp according to granularity to preserve time zone information
+ return Sequences.map(
+ Sequences.simple(index.iterableWithPostAggregations(query.getPostAggregatorSpecs())),
+ new Function()
+ {
+ @Override
+ public Row apply(Row input)
+ {
+ final MapBasedRow row = (MapBasedRow) input;
+ return new MapBasedRow(gran.toDateTime(row.getTimestampFromEpoch()), row.getEvent());
+ }
+ }
+ );
+ }
+
@Override
public Sequence mergeSequences(Sequence> seqOfSequences)
{
diff --git a/client/src/main/java/com/metamx/druid/query/metadata/ColumnAnalysis.java b/client/src/main/java/com/metamx/druid/query/metadata/ColumnAnalysis.java
index 9eb8a46bcdb..01a54a1fbc2 100644
--- a/client/src/main/java/com/metamx/druid/query/metadata/ColumnAnalysis.java
+++ b/client/src/main/java/com/metamx/druid/query/metadata/ColumnAnalysis.java
@@ -21,11 +21,8 @@ package com.metamx.druid.query.metadata;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
-import com.google.common.base.Preconditions;
import com.metamx.druid.index.column.ValueType;
-
-
/**
*/
public class ColumnAnalysis
diff --git a/client/src/main/java/com/metamx/druid/query/metadata/ColumnIncluderator.java b/client/src/main/java/com/metamx/druid/query/metadata/ColumnIncluderator.java
index c6cfb081835..230c21a2498 100644
--- a/client/src/main/java/com/metamx/druid/query/metadata/ColumnIncluderator.java
+++ b/client/src/main/java/com/metamx/druid/query/metadata/ColumnIncluderator.java
@@ -19,7 +19,6 @@
package com.metamx.druid.query.metadata;
-
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
diff --git a/client/src/main/java/com/metamx/druid/query/metadata/ListColumnIncluderator.java b/client/src/main/java/com/metamx/druid/query/metadata/ListColumnIncluderator.java
index a7de6b1920e..d6f4b99d74b 100644
--- a/client/src/main/java/com/metamx/druid/query/metadata/ListColumnIncluderator.java
+++ b/client/src/main/java/com/metamx/druid/query/metadata/ListColumnIncluderator.java
@@ -22,14 +22,9 @@ package com.metamx.druid.query.metadata;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Charsets;
-import com.google.common.base.Throwables;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
-
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.Collections;
import java.util.List;
diff --git a/client/src/main/java/com/metamx/druid/query/metadata/SegmentAnalysis.java b/client/src/main/java/com/metamx/druid/query/metadata/SegmentAnalysis.java
index 22657e45301..359e1020273 100644
--- a/client/src/main/java/com/metamx/druid/query/metadata/SegmentAnalysis.java
+++ b/client/src/main/java/com/metamx/druid/query/metadata/SegmentAnalysis.java
@@ -19,8 +19,6 @@
package com.metamx.druid.query.metadata;
-
-
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.joda.time.Interval;
diff --git a/client/src/main/java/com/metamx/druid/query/metadata/SegmentMetadataQuery.java b/client/src/main/java/com/metamx/druid/query/metadata/SegmentMetadataQuery.java
index 707a0a285b2..4be24fdaf95 100644
--- a/client/src/main/java/com/metamx/druid/query/metadata/SegmentMetadataQuery.java
+++ b/client/src/main/java/com/metamx/druid/query/metadata/SegmentMetadataQuery.java
@@ -19,12 +19,12 @@
package com.metamx.druid.query.metadata;
+import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.metamx.druid.BaseQuery;
import com.metamx.druid.Query;
import com.metamx.druid.query.segment.QuerySegmentSpec;
-
import java.util.Map;
public class SegmentMetadataQuery extends BaseQuery
@@ -33,6 +33,7 @@ public class SegmentMetadataQuery extends BaseQuery
private final ColumnIncluderator toInclude;
private final boolean merge;
+ @JsonCreator
public SegmentMetadataQuery(
@JsonProperty("dataSource") String dataSource,
@JsonProperty("intervals") QuerySegmentSpec querySegmentSpec,
@@ -68,7 +69,7 @@ public class SegmentMetadataQuery extends BaseQuery
@Override
public String getType()
{
- return "segmentMetadata";
+ return Query.SEGMENT_METADATA;
}
@Override
diff --git a/client/src/main/java/com/metamx/druid/query/metadata/SegmentMetadataQueryQueryToolChest.java b/client/src/main/java/com/metamx/druid/query/metadata/SegmentMetadataQueryQueryToolChest.java
index 6ede9c7f247..2210a0f5a7b 100644
--- a/client/src/main/java/com/metamx/druid/query/metadata/SegmentMetadataQueryQueryToolChest.java
+++ b/client/src/main/java/com/metamx/druid/query/metadata/SegmentMetadataQueryQueryToolChest.java
@@ -50,7 +50,6 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
-
public class SegmentMetadataQueryQueryToolChest extends QueryToolChest
{
private static final TypeReference TYPE_REFERENCE = new TypeReference(){};
diff --git a/client/src/main/java/com/metamx/druid/query/search/FragmentSearchQuerySpec.java b/client/src/main/java/com/metamx/druid/query/search/FragmentSearchQuerySpec.java
index ea6cdbe72f2..c4a7b707712 100644
--- a/client/src/main/java/com/metamx/druid/query/search/FragmentSearchQuerySpec.java
+++ b/client/src/main/java/com/metamx/druid/query/search/FragmentSearchQuerySpec.java
@@ -24,8 +24,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Function;
import com.google.common.collect.Lists;
-
-
import java.nio.ByteBuffer;
import java.util.List;
diff --git a/client/src/main/java/com/metamx/druid/query/search/InsensitiveContainsSearchQuerySpec.java b/client/src/main/java/com/metamx/druid/query/search/InsensitiveContainsSearchQuerySpec.java
index f2ffbc9d1c4..80c609cae76 100644
--- a/client/src/main/java/com/metamx/druid/query/search/InsensitiveContainsSearchQuerySpec.java
+++ b/client/src/main/java/com/metamx/druid/query/search/InsensitiveContainsSearchQuerySpec.java
@@ -19,9 +19,6 @@
package com.metamx.druid.query.search;
-
-
-
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/client/src/main/java/com/metamx/druid/query/search/LexicographicSearchSortSpec.java b/client/src/main/java/com/metamx/druid/query/search/LexicographicSearchSortSpec.java
index 83f81bfc349..99ac489cadd 100644
--- a/client/src/main/java/com/metamx/druid/query/search/LexicographicSearchSortSpec.java
+++ b/client/src/main/java/com/metamx/druid/query/search/LexicographicSearchSortSpec.java
@@ -19,12 +19,9 @@
package com.metamx.druid.query.search;
-
-
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Comparator;
-import java.util.Map;
/**
*/
diff --git a/client/src/main/java/com/metamx/druid/query/search/SearchHit.java b/client/src/main/java/com/metamx/druid/query/search/SearchHit.java
index ba896912197..1b2acad6f16 100644
--- a/client/src/main/java/com/metamx/druid/query/search/SearchHit.java
+++ b/client/src/main/java/com/metamx/druid/query/search/SearchHit.java
@@ -19,9 +19,6 @@
package com.metamx.druid.query.search;
-
-
-
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/client/src/main/java/com/metamx/druid/query/search/SearchQuery.java b/client/src/main/java/com/metamx/druid/query/search/SearchQuery.java
index 124d9c5fa62..9a0d57cb82d 100644
--- a/client/src/main/java/com/metamx/druid/query/search/SearchQuery.java
+++ b/client/src/main/java/com/metamx/druid/query/search/SearchQuery.java
@@ -32,8 +32,6 @@ import com.metamx.druid.query.segment.QuerySegmentSpec;
import com.metamx.druid.result.Result;
import com.metamx.druid.result.SearchResultValue;
-
-
import javax.annotation.Nullable;
import java.util.List;
import java.util.Map;
diff --git a/client/src/main/java/com/metamx/druid/query/search/SearchQuerySpec.java b/client/src/main/java/com/metamx/druid/query/search/SearchQuerySpec.java
index dbd0e91c48d..68eb86dfb73 100644
--- a/client/src/main/java/com/metamx/druid/query/search/SearchQuerySpec.java
+++ b/client/src/main/java/com/metamx/druid/query/search/SearchQuerySpec.java
@@ -21,11 +21,6 @@ package com.metamx.druid.query.search;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import com.google.common.base.Predicate;
-
-
-
-import java.util.List;
/**
*/
diff --git a/client/src/main/java/com/metamx/druid/query/search/SearchSortSpec.java b/client/src/main/java/com/metamx/druid/query/search/SearchSortSpec.java
index f98cf41f999..7510cb582e1 100644
--- a/client/src/main/java/com/metamx/druid/query/search/SearchSortSpec.java
+++ b/client/src/main/java/com/metamx/druid/query/search/SearchSortSpec.java
@@ -19,9 +19,6 @@
package com.metamx.druid.query.search;
-
-
-
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
diff --git a/client/src/main/java/com/metamx/druid/query/search/StrlenSearchSortSpec.java b/client/src/main/java/com/metamx/druid/query/search/StrlenSearchSortSpec.java
index bef5de85726..e269c241f2d 100644
--- a/client/src/main/java/com/metamx/druid/query/search/StrlenSearchSortSpec.java
+++ b/client/src/main/java/com/metamx/druid/query/search/StrlenSearchSortSpec.java
@@ -20,7 +20,6 @@
package com.metamx.druid.query.search;
import java.util.Comparator;
-import java.util.Map;
/**
*/
@@ -50,4 +49,4 @@ public class StrlenSearchSortSpec implements SearchSortSpec
{
return "stringLengthSort";
}
-}
\ No newline at end of file
+}
diff --git a/client/src/main/java/com/metamx/druid/query/segment/MultipleIntervalSegmentSpec.java b/client/src/main/java/com/metamx/druid/query/segment/MultipleIntervalSegmentSpec.java
index 5432d468ed4..51b77c7efc6 100644
--- a/client/src/main/java/com/metamx/druid/query/segment/MultipleIntervalSegmentSpec.java
+++ b/client/src/main/java/com/metamx/druid/query/segment/MultipleIntervalSegmentSpec.java
@@ -25,7 +25,6 @@ import com.metamx.druid.Query;
import com.metamx.druid.query.QueryRunner;
import com.metamx.druid.utils.JodaUtils;
-
import org.joda.time.Interval;
import java.util.Collections;
diff --git a/client/src/main/java/com/metamx/druid/query/segment/MultipleSpecificSegmentSpec.java b/client/src/main/java/com/metamx/druid/query/segment/MultipleSpecificSegmentSpec.java
index fb259c5e5d5..281f3222676 100644
--- a/client/src/main/java/com/metamx/druid/query/segment/MultipleSpecificSegmentSpec.java
+++ b/client/src/main/java/com/metamx/druid/query/segment/MultipleSpecificSegmentSpec.java
@@ -27,7 +27,6 @@ import com.metamx.druid.Query;
import com.metamx.druid.query.QueryRunner;
import com.metamx.druid.utils.JodaUtils;
-
import org.joda.time.Interval;
import java.util.List;
diff --git a/client/src/main/java/com/metamx/druid/query/segment/QuerySegmentSpec.java b/client/src/main/java/com/metamx/druid/query/segment/QuerySegmentSpec.java
index 98fc8e7b327..0498deb16f1 100644
--- a/client/src/main/java/com/metamx/druid/query/segment/QuerySegmentSpec.java
+++ b/client/src/main/java/com/metamx/druid/query/segment/QuerySegmentSpec.java
@@ -24,7 +24,6 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.metamx.druid.Query;
import com.metamx.druid.query.QueryRunner;
-
import org.joda.time.Interval;
import java.util.List;
diff --git a/client/src/main/java/com/metamx/druid/query/segment/SegmentDescriptor.java b/client/src/main/java/com/metamx/druid/query/segment/SegmentDescriptor.java
index 90d433c1e5d..1e2ac83484a 100644
--- a/client/src/main/java/com/metamx/druid/query/segment/SegmentDescriptor.java
+++ b/client/src/main/java/com/metamx/druid/query/segment/SegmentDescriptor.java
@@ -19,8 +19,6 @@
package com.metamx.druid.query.segment;
-
-
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.joda.time.Interval;
diff --git a/client/src/main/java/com/metamx/druid/query/timeboundary/TimeBoundaryQuery.java b/client/src/main/java/com/metamx/druid/query/timeboundary/TimeBoundaryQuery.java
index 07fd071d6db..de846108e40 100644
--- a/client/src/main/java/com/metamx/druid/query/timeboundary/TimeBoundaryQuery.java
+++ b/client/src/main/java/com/metamx/druid/query/timeboundary/TimeBoundaryQuery.java
@@ -31,7 +31,6 @@ import com.metamx.druid.query.segment.QuerySegmentSpec;
import com.metamx.druid.result.Result;
import com.metamx.druid.result.TimeBoundaryResultValue;
-
import org.joda.time.DateTime;
import org.joda.time.Interval;
diff --git a/client/src/main/java/com/metamx/druid/query/timeseries/TimeseriesQuery.java b/client/src/main/java/com/metamx/druid/query/timeseries/TimeseriesQuery.java
index a67caf19924..10fd403ef83 100644
--- a/client/src/main/java/com/metamx/druid/query/timeseries/TimeseriesQuery.java
+++ b/client/src/main/java/com/metamx/druid/query/timeseries/TimeseriesQuery.java
@@ -22,7 +22,6 @@ package com.metamx.druid.query.timeseries;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeName;
-import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import com.metamx.druid.BaseQuery;
import com.metamx.druid.Query;
@@ -35,10 +34,6 @@ import com.metamx.druid.query.segment.QuerySegmentSpec;
import com.metamx.druid.result.Result;
import com.metamx.druid.result.TimeseriesResultValue;
-
-
-
-
import java.util.List;
import java.util.Map;
@@ -47,8 +42,6 @@ import java.util.Map;
@JsonTypeName("timeseries")
public class TimeseriesQuery extends BaseQuery>
{
- public static final String TIMESERIES = "timeseries";
-
private final DimFilter dimFilter;
private final QueryGranularity granularity;
private final List aggregatorSpecs;
@@ -83,7 +76,7 @@ public class TimeseriesQuery extends BaseQuery>
@Override
public String getType()
{
- return TIMESERIES;
+ return Query.TIMESERIES;
}
@JsonProperty("filter")
@@ -135,7 +128,7 @@ public class TimeseriesQuery extends BaseQuery>
computeOverridenContext(contextOverrides)
);
}
-
+
@Override
public String toString()
{
diff --git a/client/src/main/java/com/metamx/druid/query/timeseries/TimeseriesQueryQueryToolChest.java b/client/src/main/java/com/metamx/druid/query/timeseries/TimeseriesQueryQueryToolChest.java
index bef34d9a2da..c731bf1b166 100644
--- a/client/src/main/java/com/metamx/druid/query/timeseries/TimeseriesQueryQueryToolChest.java
+++ b/client/src/main/java/com/metamx/druid/query/timeseries/TimeseriesQueryQueryToolChest.java
@@ -51,7 +51,6 @@ import org.joda.time.DateTime;
import org.joda.time.Interval;
import org.joda.time.Minutes;
import org.joda.time.Period;
-import org.joda.time.format.ISODateTimeFormat;
import javax.annotation.Nullable;
import java.nio.ByteBuffer;
diff --git a/client/src/main/java/com/metamx/druid/result/BySegmentResultValueClass.java b/client/src/main/java/com/metamx/druid/result/BySegmentResultValueClass.java
index dfaacb572cc..9bc3ae81e2c 100644
--- a/client/src/main/java/com/metamx/druid/result/BySegmentResultValueClass.java
+++ b/client/src/main/java/com/metamx/druid/result/BySegmentResultValueClass.java
@@ -19,7 +19,6 @@
package com.metamx.druid.result;
-
import com.fasterxml.jackson.annotation.JsonProperty;
import org.joda.time.Interval;
diff --git a/client/src/main/java/com/metamx/druid/result/BySegmentSearchResultValue.java b/client/src/main/java/com/metamx/druid/result/BySegmentSearchResultValue.java
index e5a069f17a1..64d2d6a7ec8 100644
--- a/client/src/main/java/com/metamx/druid/result/BySegmentSearchResultValue.java
+++ b/client/src/main/java/com/metamx/druid/result/BySegmentSearchResultValue.java
@@ -23,8 +23,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import com.metamx.druid.query.search.SearchHit;
-
-
import java.util.List;
/**
diff --git a/client/src/main/java/com/metamx/druid/result/MetricValueExtractor.java b/client/src/main/java/com/metamx/druid/result/MetricValueExtractor.java
index c99ac0f3ed3..f330a12400d 100644
--- a/client/src/main/java/com/metamx/druid/result/MetricValueExtractor.java
+++ b/client/src/main/java/com/metamx/druid/result/MetricValueExtractor.java
@@ -19,9 +19,6 @@
package com.metamx.druid.result;
-
-
-
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
diff --git a/client/src/main/java/com/metamx/druid/result/Result.java b/client/src/main/java/com/metamx/druid/result/Result.java
index f9c30fc8319..e807ce1ddfa 100644
--- a/client/src/main/java/com/metamx/druid/result/Result.java
+++ b/client/src/main/java/com/metamx/druid/result/Result.java
@@ -19,9 +19,6 @@
package com.metamx.druid.result;
-
-
-
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.joda.time.DateTime;
@@ -99,4 +96,4 @@ public class Result implements Comparable>
", value=" + value +
'}';
}
-}
\ No newline at end of file
+}
diff --git a/client/src/main/java/com/metamx/druid/result/SearchResultValue.java b/client/src/main/java/com/metamx/druid/result/SearchResultValue.java
index c9dd74fc4ec..1403d111945 100644
--- a/client/src/main/java/com/metamx/druid/result/SearchResultValue.java
+++ b/client/src/main/java/com/metamx/druid/result/SearchResultValue.java
@@ -23,8 +23,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.metamx.druid.query.search.SearchHit;
-
-
import java.util.Iterator;
import java.util.List;
diff --git a/client/src/main/java/com/metamx/druid/result/TimeBoundaryResultValue.java b/client/src/main/java/com/metamx/druid/result/TimeBoundaryResultValue.java
index 1b1b4c45547..455119dcd28 100644
--- a/client/src/main/java/com/metamx/druid/result/TimeBoundaryResultValue.java
+++ b/client/src/main/java/com/metamx/druid/result/TimeBoundaryResultValue.java
@@ -24,7 +24,6 @@ import com.fasterxml.jackson.annotation.JsonValue;
import com.metamx.common.IAE;
import com.metamx.druid.query.timeboundary.TimeBoundaryQuery;
-
import org.joda.time.DateTime;
import java.util.Map;
@@ -67,7 +66,6 @@ public class TimeBoundaryResultValue
}
}
-
@Override
public boolean equals(Object o)
{
@@ -111,4 +109,4 @@ public class TimeBoundaryResultValue
throw new IAE("Cannot get time from type[%s]", val.getClass());
}
}
-}
\ No newline at end of file
+}
diff --git a/client/src/main/java/com/metamx/druid/result/TimeseriesResultValue.java b/client/src/main/java/com/metamx/druid/result/TimeseriesResultValue.java
index 55892023def..add4bfe6b62 100644
--- a/client/src/main/java/com/metamx/druid/result/TimeseriesResultValue.java
+++ b/client/src/main/java/com/metamx/druid/result/TimeseriesResultValue.java
@@ -19,8 +19,6 @@
package com.metamx.druid.result;
-
-
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Map;
diff --git a/client/src/main/java/com/metamx/druid/shard/LinearShardSpec.java b/client/src/main/java/com/metamx/druid/shard/LinearShardSpec.java
index ae83287f290..4d77a19086d 100644
--- a/client/src/main/java/com/metamx/druid/shard/LinearShardSpec.java
+++ b/client/src/main/java/com/metamx/druid/shard/LinearShardSpec.java
@@ -5,7 +5,6 @@ import com.metamx.druid.input.InputRow;
import com.metamx.druid.partition.LinearPartitionChunk;
import com.metamx.druid.partition.PartitionChunk;
-
import java.util.Map;
public class LinearShardSpec implements ShardSpec {
@@ -25,7 +24,6 @@ public class LinearShardSpec implements ShardSpec {
return partitionNum;
}
-
@Override
public PartitionChunk createChunk(T obj) {
return new LinearPartitionChunk(partitionNum, obj);
@@ -40,4 +38,4 @@ public class LinearShardSpec implements ShardSpec {
public boolean isInChunk(InputRow inputRow) {
return true;
}
-}
\ No newline at end of file
+}
diff --git a/client/src/main/java/com/metamx/druid/shard/NoneShardSpec.java b/client/src/main/java/com/metamx/druid/shard/NoneShardSpec.java
index 9e40f9f703e..940f2f5c600 100644
--- a/client/src/main/java/com/metamx/druid/shard/NoneShardSpec.java
+++ b/client/src/main/java/com/metamx/druid/shard/NoneShardSpec.java
@@ -23,7 +23,6 @@ import com.metamx.druid.input.InputRow;
import com.metamx.druid.partition.PartitionChunk;
import com.metamx.druid.partition.SingleElementPartitionChunk;
-
import java.util.Map;
/**
diff --git a/client/src/main/java/com/metamx/druid/shard/ShardSpec.java b/client/src/main/java/com/metamx/druid/shard/ShardSpec.java
index 2db8f15ed5f..e2191c90e3f 100644
--- a/client/src/main/java/com/metamx/druid/shard/ShardSpec.java
+++ b/client/src/main/java/com/metamx/druid/shard/ShardSpec.java
@@ -24,8 +24,6 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.metamx.druid.input.InputRow;
import com.metamx.druid.partition.PartitionChunk;
-
-
import java.util.Map;
/**
diff --git a/client/src/main/java/com/metamx/druid/shard/SingleDimensionShardSpec.java b/client/src/main/java/com/metamx/druid/shard/SingleDimensionShardSpec.java
index 0843ec7c61d..98ff7f2eae1 100644
--- a/client/src/main/java/com/metamx/druid/shard/SingleDimensionShardSpec.java
+++ b/client/src/main/java/com/metamx/druid/shard/SingleDimensionShardSpec.java
@@ -24,8 +24,6 @@ import com.metamx.druid.input.InputRow;
import com.metamx.druid.partition.PartitionChunk;
import com.metamx.druid.partition.StringPartitionChunk;
-
-
import java.util.List;
import java.util.Map;
diff --git a/client/src/main/java/com/metamx/druid/zk/PropertiesZkSerializer.java b/client/src/main/java/com/metamx/druid/zk/PropertiesZkSerializer.java
index 036a8dc5055..47f47dd63b7 100644
--- a/client/src/main/java/com/metamx/druid/zk/PropertiesZkSerializer.java
+++ b/client/src/main/java/com/metamx/druid/zk/PropertiesZkSerializer.java
@@ -24,7 +24,6 @@ import org.I0Itec.zkclient.exception.ZkMarshallingError;
import org.I0Itec.zkclient.serialize.ZkSerializer;
import java.io.*;
-import java.nio.charset.Charset;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Properties;
diff --git a/client/src/test/java/com/metamx/druid/client/DataSegmentTest.java b/client/src/test/java/com/metamx/druid/client/DataSegmentTest.java
index 082f66e8aac..63f3326a92e 100644
--- a/client/src/test/java/com/metamx/druid/client/DataSegmentTest.java
+++ b/client/src/test/java/com/metamx/druid/client/DataSegmentTest.java
@@ -30,7 +30,6 @@ import com.metamx.druid.jackson.DefaultObjectMapper;
import com.metamx.druid.shard.NoneShardSpec;
import com.metamx.druid.shard.SingleDimensionShardSpec;
-
import org.joda.time.DateTime;
import org.joda.time.Interval;
import org.junit.Assert;
diff --git a/client/src/test/java/com/metamx/druid/client/cache/MemcachedCacheBenchmark.java b/client/src/test/java/com/metamx/druid/client/cache/MemcachedCacheBenchmark.java
index 3a746c9484b..c63e98e8988 100644
--- a/client/src/test/java/com/metamx/druid/client/cache/MemcachedCacheBenchmark.java
+++ b/client/src/test/java/com/metamx/druid/client/cache/MemcachedCacheBenchmark.java
@@ -61,7 +61,6 @@ public class MemcachedCacheBenchmark extends SimpleBenchmark
3600 // 1 hour
);
-
randBytes = new byte[objectSize * 1024];
new Random(0).nextBytes(randBytes);
}
diff --git a/client/src/test/java/com/metamx/druid/shard/SingleDimensionShardSpecTest.java b/client/src/test/java/com/metamx/druid/shard/SingleDimensionShardSpecTest.java
index d92f927767f..217b18d9be7 100644
--- a/client/src/test/java/com/metamx/druid/shard/SingleDimensionShardSpecTest.java
+++ b/client/src/test/java/com/metamx/druid/shard/SingleDimensionShardSpecTest.java
@@ -96,7 +96,6 @@ public class SingleDimensionShardSpecTest
)
.build();
-
for (Map.Entry>>> entry : tests.entrySet()) {
SingleDimensionShardSpec spec = entry.getKey();
for (Pair> pair : entry.getValue()) {
diff --git a/common/pom.xml b/common/pom.xml
index 60afd4d7d2c..2cc65794727 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -28,7 +28,7 @@
com.metamx
druid
- 0.3.34-SNAPSHOT
+ 0.3.35-SNAPSHOT
diff --git a/common/src/main/java/com/metamx/druid/DurationGranularity.java b/common/src/main/java/com/metamx/druid/DurationGranularity.java
index b2d5e55be42..5849f834103 100644
--- a/common/src/main/java/com/metamx/druid/DurationGranularity.java
+++ b/common/src/main/java/com/metamx/druid/DurationGranularity.java
@@ -23,7 +23,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.primitives.Longs;
-
import org.joda.time.DateTime;
import java.nio.ByteBuffer;
diff --git a/common/src/main/java/com/metamx/druid/PeriodGranularity.java b/common/src/main/java/com/metamx/druid/PeriodGranularity.java
index 3c6ca5fd23e..5c8e594013a 100644
--- a/common/src/main/java/com/metamx/druid/PeriodGranularity.java
+++ b/common/src/main/java/com/metamx/druid/PeriodGranularity.java
@@ -19,8 +19,6 @@
package com.metamx.druid;
-
-
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.joda.time.Chronology;
@@ -267,7 +265,6 @@ public class PeriodGranularity extends BaseQueryGranularity
return t;
}
-
private static boolean isCompoundPeriod(Period period)
{
int[] values = period.getValues();
@@ -322,7 +319,6 @@ public class PeriodGranularity extends BaseQueryGranularity
}
}
-
@Override
public byte[] cacheKey()
{
diff --git a/common/src/main/java/com/metamx/druid/QueryGranularity.java b/common/src/main/java/com/metamx/druid/QueryGranularity.java
index 5b94c5e1ae2..ee745d3dadb 100644
--- a/common/src/main/java/com/metamx/druid/QueryGranularity.java
+++ b/common/src/main/java/com/metamx/druid/QueryGranularity.java
@@ -24,8 +24,6 @@ import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.metamx.common.IAE;
-
-
import org.joda.time.DateTime;
import org.joda.time.ReadableDuration;
diff --git a/common/src/main/java/com/metamx/druid/aggregation/AggregatorFactory.java b/common/src/main/java/com/metamx/druid/aggregation/AggregatorFactory.java
index c12793972f2..a924187333f 100644
--- a/common/src/main/java/com/metamx/druid/aggregation/AggregatorFactory.java
+++ b/common/src/main/java/com/metamx/druid/aggregation/AggregatorFactory.java
@@ -23,8 +23,6 @@ import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.metamx.druid.processing.MetricSelectorFactory;
-
-
import java.util.Comparator;
import java.util.List;
diff --git a/common/src/main/java/com/metamx/druid/aggregation/CountAggregatorFactory.java b/common/src/main/java/com/metamx/druid/aggregation/CountAggregatorFactory.java
index a901c3f54e2..507bb7fa79f 100644
--- a/common/src/main/java/com/metamx/druid/aggregation/CountAggregatorFactory.java
+++ b/common/src/main/java/com/metamx/druid/aggregation/CountAggregatorFactory.java
@@ -25,8 +25,6 @@ import com.google.common.collect.ImmutableList;
import com.google.common.primitives.Longs;
import com.metamx.druid.processing.MetricSelectorFactory;
-
-
import java.util.Comparator;
import java.util.List;
diff --git a/common/src/main/java/com/metamx/druid/aggregation/DoubleSumAggregatorFactory.java b/common/src/main/java/com/metamx/druid/aggregation/DoubleSumAggregatorFactory.java
index 92a972d0658..1c3e2a85ada 100644
--- a/common/src/main/java/com/metamx/druid/aggregation/DoubleSumAggregatorFactory.java
+++ b/common/src/main/java/com/metamx/druid/aggregation/DoubleSumAggregatorFactory.java
@@ -24,8 +24,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.primitives.Doubles;
import com.metamx.druid.processing.MetricSelectorFactory;
-
-
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Comparator;
diff --git a/common/src/main/java/com/metamx/druid/aggregation/Histogram.java b/common/src/main/java/com/metamx/druid/aggregation/Histogram.java
index a3ec32d4a15..5c2c0f5f069 100644
--- a/common/src/main/java/com/metamx/druid/aggregation/Histogram.java
+++ b/common/src/main/java/com/metamx/druid/aggregation/Histogram.java
@@ -25,7 +25,6 @@ import com.google.common.primitives.Floats;
import com.google.common.primitives.Ints;
import com.google.common.primitives.Longs;
-
import java.nio.ByteBuffer;
import java.util.Arrays;
diff --git a/common/src/main/java/com/metamx/druid/aggregation/HistogramAggregator.java b/common/src/main/java/com/metamx/druid/aggregation/HistogramAggregator.java
index 2355f458d29..23ac98f48a9 100644
--- a/common/src/main/java/com/metamx/druid/aggregation/HistogramAggregator.java
+++ b/common/src/main/java/com/metamx/druid/aggregation/HistogramAggregator.java
@@ -44,7 +44,6 @@ public class HistogramAggregator implements Aggregator
private Histogram histogram;
-
public HistogramAggregator(String name, FloatMetricSelector selector, float[] breaks) {
this.name = name;
this.selector = selector;
diff --git a/common/src/main/java/com/metamx/druid/aggregation/HistogramAggregatorFactory.java b/common/src/main/java/com/metamx/druid/aggregation/HistogramAggregatorFactory.java
index af6d23c32ac..6a5eaa5d238 100644
--- a/common/src/main/java/com/metamx/druid/aggregation/HistogramAggregatorFactory.java
+++ b/common/src/main/java/com/metamx/druid/aggregation/HistogramAggregatorFactory.java
@@ -27,8 +27,6 @@ import com.google.common.primitives.Longs;
import com.metamx.druid.processing.MetricSelectorFactory;
import org.apache.commons.codec.binary.Base64;
-
-
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Comparator;
diff --git a/common/src/main/java/com/metamx/druid/aggregation/HistogramBufferAggregator.java b/common/src/main/java/com/metamx/druid/aggregation/HistogramBufferAggregator.java
index 07c7c37dee0..01196bd6298 100644
--- a/common/src/main/java/com/metamx/druid/aggregation/HistogramBufferAggregator.java
+++ b/common/src/main/java/com/metamx/druid/aggregation/HistogramBufferAggregator.java
@@ -19,7 +19,6 @@
package com.metamx.druid.aggregation;
-
import com.google.common.primitives.Floats;
import com.google.common.primitives.Longs;
import com.metamx.druid.processing.FloatMetricSelector;
diff --git a/common/src/main/java/com/metamx/druid/aggregation/HistogramVisual.java b/common/src/main/java/com/metamx/druid/aggregation/HistogramVisual.java
index 01c01719854..8c696638aa9 100644
--- a/common/src/main/java/com/metamx/druid/aggregation/HistogramVisual.java
+++ b/common/src/main/java/com/metamx/druid/aggregation/HistogramVisual.java
@@ -23,8 +23,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Preconditions;
-
-
import java.util.Arrays;
public class HistogramVisual
diff --git a/common/src/main/java/com/metamx/druid/aggregation/JavaScriptAggregator.java b/common/src/main/java/com/metamx/druid/aggregation/JavaScriptAggregator.java
index d24277660bf..dbb1a85bbb5 100644
--- a/common/src/main/java/com/metamx/druid/aggregation/JavaScriptAggregator.java
+++ b/common/src/main/java/com/metamx/druid/aggregation/JavaScriptAggregator.java
@@ -21,7 +21,6 @@ package com.metamx.druid.aggregation;
import com.google.common.collect.Lists;
import com.metamx.druid.processing.FloatMetricSelector;
-import org.mozilla.javascript.Context;
import java.util.List;
diff --git a/common/src/main/java/com/metamx/druid/aggregation/JavaScriptAggregatorFactory.java b/common/src/main/java/com/metamx/druid/aggregation/JavaScriptAggregatorFactory.java
index 58f1e8d1e3d..119c88b46b2 100644
--- a/common/src/main/java/com/metamx/druid/aggregation/JavaScriptAggregatorFactory.java
+++ b/common/src/main/java/com/metamx/druid/aggregation/JavaScriptAggregatorFactory.java
@@ -28,7 +28,6 @@ import com.metamx.common.IAE;
import com.metamx.druid.processing.FloatMetricSelector;
import com.metamx.druid.processing.MetricSelectorFactory;
-
import org.mozilla.javascript.Context;
import org.mozilla.javascript.ContextAction;
import org.mozilla.javascript.ContextFactory;
@@ -228,7 +227,6 @@ public class JavaScriptAggregatorFactory implements AggregatorFactory
final Function fnCombine = getScriptFunction("combine", scope);
Context.exit();
-
return new JavaScriptAggregator.ScriptAggregator()
{
@Override
diff --git a/common/src/main/java/com/metamx/druid/aggregation/LongSumAggregatorFactory.java b/common/src/main/java/com/metamx/druid/aggregation/LongSumAggregatorFactory.java
index 61247e40add..fb29296a319 100644
--- a/common/src/main/java/com/metamx/druid/aggregation/LongSumAggregatorFactory.java
+++ b/common/src/main/java/com/metamx/druid/aggregation/LongSumAggregatorFactory.java
@@ -24,8 +24,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.primitives.Longs;
import com.metamx.druid.processing.MetricSelectorFactory;
-
-
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Comparator;
diff --git a/common/src/main/java/com/metamx/druid/aggregation/MaxAggregatorFactory.java b/common/src/main/java/com/metamx/druid/aggregation/MaxAggregatorFactory.java
index 76a57f23066..110ce8e6b35 100644
--- a/common/src/main/java/com/metamx/druid/aggregation/MaxAggregatorFactory.java
+++ b/common/src/main/java/com/metamx/druid/aggregation/MaxAggregatorFactory.java
@@ -24,8 +24,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.primitives.Doubles;
import com.metamx.druid.processing.MetricSelectorFactory;
-
-
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Comparator;
diff --git a/common/src/main/java/com/metamx/druid/aggregation/MinAggregatorFactory.java b/common/src/main/java/com/metamx/druid/aggregation/MinAggregatorFactory.java
index 2720fa2a9f1..8012b9c2d70 100644
--- a/common/src/main/java/com/metamx/druid/aggregation/MinAggregatorFactory.java
+++ b/common/src/main/java/com/metamx/druid/aggregation/MinAggregatorFactory.java
@@ -24,8 +24,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.primitives.Doubles;
import com.metamx.druid.processing.MetricSelectorFactory;
-
-
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Comparator;
diff --git a/common/src/main/java/com/metamx/druid/aggregation/post/ArithmeticPostAggregator.java b/common/src/main/java/com/metamx/druid/aggregation/post/ArithmeticPostAggregator.java
index 1166413a3e7..4d768b6420b 100644
--- a/common/src/main/java/com/metamx/druid/aggregation/post/ArithmeticPostAggregator.java
+++ b/common/src/main/java/com/metamx/druid/aggregation/post/ArithmeticPostAggregator.java
@@ -25,8 +25,6 @@ import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.metamx.common.IAE;
-
-
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
diff --git a/common/src/main/java/com/metamx/druid/aggregation/post/ConstantPostAggregator.java b/common/src/main/java/com/metamx/druid/aggregation/post/ConstantPostAggregator.java
index f36761f962f..21c1e70a50b 100644
--- a/common/src/main/java/com/metamx/druid/aggregation/post/ConstantPostAggregator.java
+++ b/common/src/main/java/com/metamx/druid/aggregation/post/ConstantPostAggregator.java
@@ -23,8 +23,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.Sets;
-
-
import java.util.Comparator;
import java.util.Map;
import java.util.Set;
diff --git a/common/src/main/java/com/metamx/druid/aggregation/post/FieldAccessPostAggregator.java b/common/src/main/java/com/metamx/druid/aggregation/post/FieldAccessPostAggregator.java
index eb3a531e2d1..a06bf0cf891 100644
--- a/common/src/main/java/com/metamx/druid/aggregation/post/FieldAccessPostAggregator.java
+++ b/common/src/main/java/com/metamx/druid/aggregation/post/FieldAccessPostAggregator.java
@@ -22,9 +22,6 @@ package com.metamx.druid.aggregation.post;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.Sets;
-import com.metamx.common.ISE;
-
-
import java.util.Comparator;
import java.util.Map;
diff --git a/common/src/main/java/com/metamx/druid/aggregation/post/PostAggregator.java b/common/src/main/java/com/metamx/druid/aggregation/post/PostAggregator.java
index 66427785fbc..df78ad3bf7b 100644
--- a/common/src/main/java/com/metamx/druid/aggregation/post/PostAggregator.java
+++ b/common/src/main/java/com/metamx/druid/aggregation/post/PostAggregator.java
@@ -19,9 +19,6 @@
package com.metamx.druid.aggregation.post;
-
-
-
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
diff --git a/common/src/main/java/com/metamx/druid/db/DbConnectorConfig.java b/common/src/main/java/com/metamx/druid/db/DbConnectorConfig.java
index 808be63267c..b1a9a1b3e2e 100644
--- a/common/src/main/java/com/metamx/druid/db/DbConnectorConfig.java
+++ b/common/src/main/java/com/metamx/druid/db/DbConnectorConfig.java
@@ -19,7 +19,6 @@
package com.metamx.druid.db;
-
import com.fasterxml.jackson.annotation.JsonProperty;
import org.skife.config.Config;
diff --git a/common/src/main/java/com/metamx/druid/input/MapBasedRow.java b/common/src/main/java/com/metamx/druid/input/MapBasedRow.java
index 5449ff2f865..8612eb843b2 100644
--- a/common/src/main/java/com/metamx/druid/input/MapBasedRow.java
+++ b/common/src/main/java/com/metamx/druid/input/MapBasedRow.java
@@ -27,7 +27,6 @@ import com.google.common.collect.Lists;
import com.metamx.common.IAE;
import com.metamx.common.exception.FormattedException;
-
import org.joda.time.DateTime;
import javax.annotation.Nullable;
diff --git a/common/src/main/java/com/metamx/druid/input/Row.java b/common/src/main/java/com/metamx/druid/input/Row.java
index 353d3e52f06..613c614cb45 100644
--- a/common/src/main/java/com/metamx/druid/input/Row.java
+++ b/common/src/main/java/com/metamx/druid/input/Row.java
@@ -19,9 +19,6 @@
package com.metamx.druid.input;
-
-
-
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
diff --git a/common/src/main/java/com/metamx/druid/input/Rows.java b/common/src/main/java/com/metamx/druid/input/Rows.java
index 3e70b4c26d5..7ad4762981a 100644
--- a/common/src/main/java/com/metamx/druid/input/Rows.java
+++ b/common/src/main/java/com/metamx/druid/input/Rows.java
@@ -19,45 +19,29 @@
package com.metamx.druid.input;
+import com.google.common.collect.Maps;
+import com.metamx.common.ISE;
+
import java.util.List;
+import java.util.TreeMap;
/**
*/
public class Rows
{
- public static InputRow toInputRow(final Row row, final List dimensions)
+ public static InputRow toCaseInsensitiveInputRow(final Row row, final List dimensions)
{
- return new InputRow()
- {
- @Override
- public List getDimensions()
- {
- return dimensions;
- }
+ if (row instanceof MapBasedRow) {
+ MapBasedRow mapBasedRow = (MapBasedRow) row;
- @Override
- public long getTimestampFromEpoch()
- {
- return row.getTimestampFromEpoch();
- }
-
- @Override
- public List getDimension(String dimension)
- {
- return row.getDimension(dimension);
- }
-
- @Override
- public float getFloatMetric(String metric)
- {
- return row.getFloatMetric(metric);
- }
-
- @Override
- public String toString()
- {
- return row.toString();
- }
- };
+ TreeMap caseInsensitiveMap = Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER);
+ caseInsensitiveMap.putAll(mapBasedRow.getEvent());
+ return new MapBasedInputRow(
+ mapBasedRow.getTimestampFromEpoch(),
+ dimensions,
+ caseInsensitiveMap
+ );
+ }
+ throw new ISE("Can only convert MapBasedRow objects because we are ghetto like that.");
}
}
diff --git a/common/src/main/java/com/metamx/druid/jackson/CommaListJoinDeserializer.java b/common/src/main/java/com/metamx/druid/jackson/CommaListJoinDeserializer.java
index dd18713d797..c9cde097767 100644
--- a/common/src/main/java/com/metamx/druid/jackson/CommaListJoinDeserializer.java
+++ b/common/src/main/java/com/metamx/druid/jackson/CommaListJoinDeserializer.java
@@ -19,11 +19,6 @@
package com.metamx.druid.jackson;
-
-
-
-
-
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
diff --git a/common/src/main/java/com/metamx/druid/jackson/CommaListJoinSerializer.java b/common/src/main/java/com/metamx/druid/jackson/CommaListJoinSerializer.java
index a837c88bbe7..ab66839524e 100644
--- a/common/src/main/java/com/metamx/druid/jackson/CommaListJoinSerializer.java
+++ b/common/src/main/java/com/metamx/druid/jackson/CommaListJoinSerializer.java
@@ -25,10 +25,6 @@ import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdScalarSerializer;
import com.google.common.base.Joiner;
-
-
-
-
import java.io.IOException;
import java.util.List;
diff --git a/common/src/main/java/com/metamx/druid/jackson/DefaultObjectMapper.java b/common/src/main/java/com/metamx/druid/jackson/DefaultObjectMapper.java
index 12079a77959..c8e7ab0ab40 100644
--- a/common/src/main/java/com/metamx/druid/jackson/DefaultObjectMapper.java
+++ b/common/src/main/java/com/metamx/druid/jackson/DefaultObjectMapper.java
@@ -24,41 +24,23 @@ import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.Version;
-import com.fasterxml.jackson.databind.DeserializationConfig;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.MapperFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.SerializationConfig;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.fasterxml.jackson.datatype.guava.GuavaModule;
-import com.fasterxml.jackson.datatype.joda.JodaModule;
import com.google.common.base.Throwables;
import com.metamx.common.Granularity;
import com.metamx.common.guava.Accumulator;
import com.metamx.common.guava.Sequence;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
import org.joda.time.DateTimeZone;
-import org.skife.jdbi.v2.sqlobject.customizers.Mapper;
import java.io.IOException;
import java.nio.ByteOrder;
diff --git a/common/src/main/java/com/metamx/druid/jackson/JodaStuff.java b/common/src/main/java/com/metamx/druid/jackson/JodaStuff.java
index f06bee8c76d..13a5243be1e 100644
--- a/common/src/main/java/com/metamx/druid/jackson/JodaStuff.java
+++ b/common/src/main/java/com/metamx/druid/jackson/JodaStuff.java
@@ -19,7 +19,6 @@
package com.metamx.druid.jackson;
-
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.JsonToken;
diff --git a/common/src/main/java/com/metamx/druid/log/LogLevelAdjuster.java b/common/src/main/java/com/metamx/druid/log/LogLevelAdjuster.java
index e77f9f75441..87a932f4fb3 100644
--- a/common/src/main/java/com/metamx/druid/log/LogLevelAdjuster.java
+++ b/common/src/main/java/com/metamx/druid/log/LogLevelAdjuster.java
@@ -22,14 +22,9 @@ package com.metamx.druid.log;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
-import javax.management.InstanceAlreadyExistsException;
-import javax.management.MBeanRegistrationException;
-import javax.management.MalformedObjectNameException;
-import javax.management.NotCompliantMBeanException;
import javax.management.ObjectName;
import java.lang.management.ManagementFactory;
-
/**
*/
public class LogLevelAdjuster implements LogLevelAdjusterMBean
diff --git a/common/src/main/java/com/metamx/druid/partition/LinearPartitionChunk.java b/common/src/main/java/com/metamx/druid/partition/LinearPartitionChunk.java
index 530029239f2..2f9cee1fe8a 100644
--- a/common/src/main/java/com/metamx/druid/partition/LinearPartitionChunk.java
+++ b/common/src/main/java/com/metamx/druid/partition/LinearPartitionChunk.java
@@ -10,7 +10,6 @@ public class LinearPartitionChunk implements PartitionChunk
return new LinearPartitionChunk(chunkNumber, obj);
}
-
public LinearPartitionChunk(
int chunkNumber,
T object
@@ -81,4 +80,4 @@ public class LinearPartitionChunk implements PartitionChunk
{
return chunkNumber;
}
-}
\ No newline at end of file
+}
diff --git a/common/src/main/java/com/metamx/druid/partition/StringPartitionChunk.java b/common/src/main/java/com/metamx/druid/partition/StringPartitionChunk.java
index 2b27b4d3451..39d0e71ae76 100644
--- a/common/src/main/java/com/metamx/druid/partition/StringPartitionChunk.java
+++ b/common/src/main/java/com/metamx/druid/partition/StringPartitionChunk.java
@@ -39,7 +39,6 @@ public class StringPartitionChunk implements PartitionChunk
return new StringPartitionChunk(start, end, chunkNumber, obj);
}
-
public StringPartitionChunk(
String start,
String end,
diff --git a/common/src/main/java/com/metamx/druid/utils/CompressionUtils.java b/common/src/main/java/com/metamx/druid/utils/CompressionUtils.java
index bb44f05e495..60d7ab48da1 100644
--- a/common/src/main/java/com/metamx/druid/utils/CompressionUtils.java
+++ b/common/src/main/java/com/metamx/druid/utils/CompressionUtils.java
@@ -25,12 +25,10 @@ import com.google.common.io.Files;
import com.metamx.common.ISE;
import com.metamx.common.StreamUtils;
import com.metamx.common.logger.Logger;
-import sun.misc.IOUtils;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
diff --git a/common/src/test/java/com/metamx/druid/QueryGranularityTest.java b/common/src/test/java/com/metamx/druid/QueryGranularityTest.java
index ec95cb6b586..84c1aed555e 100644
--- a/common/src/test/java/com/metamx/druid/QueryGranularityTest.java
+++ b/common/src/test/java/com/metamx/druid/QueryGranularityTest.java
@@ -119,7 +119,6 @@ public class QueryGranularityTest
);
}
-
@Test
public void testIterableHourSimple() throws Exception
{
@@ -311,8 +310,6 @@ public class QueryGranularityTest
);
}
-
-
@Test
public void testPeriodTruncateMinutes() throws Exception
{
diff --git a/common/src/test/java/com/metamx/druid/aggregation/JavaScriptAggregatorTest.java b/common/src/test/java/com/metamx/druid/aggregation/JavaScriptAggregatorTest.java
index 96c2606c2c2..bbe97070752 100644
--- a/common/src/test/java/com/metamx/druid/aggregation/JavaScriptAggregatorTest.java
+++ b/common/src/test/java/com/metamx/druid/aggregation/JavaScriptAggregatorTest.java
@@ -19,7 +19,6 @@
package com.metamx.druid.aggregation;
-
import com.google.common.collect.Lists;
import com.google.common.primitives.Doubles;
import com.metamx.druid.processing.FloatMetricSelector;
@@ -151,7 +150,6 @@ public class JavaScriptAggregatorTest
}
*/
-
JavaScriptAggregator aggRhino = new JavaScriptAggregator(
"billy",
Lists.asList(selector, new FloatMetricSelector[]{}),
@@ -173,7 +171,6 @@ public class JavaScriptAggregatorTest
++i;
}
-
t = System.currentTimeMillis();
i = 0;
while(i < 500000000) {
diff --git a/common/src/test/java/com/metamx/druid/aggregation/TestFloatMetricSelector.java b/common/src/test/java/com/metamx/druid/aggregation/TestFloatMetricSelector.java
index 3a547f59a36..616b3c5ecca 100644
--- a/common/src/test/java/com/metamx/druid/aggregation/TestFloatMetricSelector.java
+++ b/common/src/test/java/com/metamx/druid/aggregation/TestFloatMetricSelector.java
@@ -19,7 +19,6 @@
package com.metamx.druid.aggregation;
-
import com.metamx.druid.processing.FloatMetricSelector;
/**
diff --git a/common/src/test/java/com/metamx/druid/guava/CombiningSequenceTest.java b/common/src/test/java/com/metamx/druid/guava/CombiningSequenceTest.java
index 388b7def6a8..2fafcedc890 100644
--- a/common/src/test/java/com/metamx/druid/guava/CombiningSequenceTest.java
+++ b/common/src/test/java/com/metamx/druid/guava/CombiningSequenceTest.java
@@ -62,7 +62,6 @@ public class CombiningSequenceTest
Pair.of(5, 1)
);
-
testCombining(pairs, expected);
}
@@ -94,7 +93,6 @@ public class CombiningSequenceTest
Pair.of(5, 11)
);
-
testCombining(pairs, expected);
}
diff --git a/druid-services/pom.xml b/druid-services/pom.xml
index ffbe2740ea2..50370e272b9 100644
--- a/druid-services/pom.xml
+++ b/druid-services/pom.xml
@@ -24,11 +24,11 @@
druid-services
druid-services
druid-services
- 0.3.34-SNAPSHOT
+ 0.3.35-SNAPSHOT
com.metamx
druid
- 0.3.34-SNAPSHOT
+ 0.3.35-SNAPSHOT
diff --git a/examples/pom.xml b/examples/pom.xml
index 0c6f71c8303..8fdb9a7e8f1 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -28,7 +28,7 @@
com.metamx
druid
- 0.3.34-SNAPSHOT
+ 0.3.35-SNAPSHOT
diff --git a/examples/rand/pom.xml b/examples/rand/pom.xml
index 9591650fbe9..e061c93a7a1 100644
--- a/examples/rand/pom.xml
+++ b/examples/rand/pom.xml
@@ -9,7 +9,7 @@
com.metamx
druid-examples
- 0.3.34-SNAPSHOT
+ 0.3.35-SNAPSHOT
diff --git a/examples/rand/src/main/java/druid/examples/RandomFirehoseFactory.java b/examples/rand/src/main/java/druid/examples/RandomFirehoseFactory.java
index 520b0188171..3f99a472979 100644
--- a/examples/rand/src/main/java/druid/examples/RandomFirehoseFactory.java
+++ b/examples/rand/src/main/java/druid/examples/RandomFirehoseFactory.java
@@ -5,24 +5,18 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.google.common.collect.Maps;
import com.metamx.common.logger.Logger;
-import com.metamx.druid.guava.Runnables;
import com.metamx.druid.input.InputRow;
import com.metamx.druid.input.MapBasedInputRow;
import com.metamx.druid.realtime.Firehose;
import com.metamx.druid.realtime.FirehoseFactory;
-
-
-
import java.io.IOException;
-import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;
import java.util.Random;
import static java.lang.Thread.sleep;
-
/**
* Random value sequence Firehost Factory named "rand".
* Builds a Firehose that emits a stream of random numbers (outColumn, a positive double)
diff --git a/examples/twitter/pom.xml b/examples/twitter/pom.xml
index 92e0ba1bd21..f3f23975696 100644
--- a/examples/twitter/pom.xml
+++ b/examples/twitter/pom.xml
@@ -9,7 +9,7 @@
com.metamx
druid-examples
- 0.3.34-SNAPSHOT
+ 0.3.35-SNAPSHOT
diff --git a/examples/twitter/src/main/java/druid/examples/twitter/TwitterSpritzerFirehoseFactory.java b/examples/twitter/src/main/java/druid/examples/twitter/TwitterSpritzerFirehoseFactory.java
index 779ba107dab..3dbe41902fa 100644
--- a/examples/twitter/src/main/java/druid/examples/twitter/TwitterSpritzerFirehoseFactory.java
+++ b/examples/twitter/src/main/java/druid/examples/twitter/TwitterSpritzerFirehoseFactory.java
@@ -10,8 +10,6 @@ import com.metamx.druid.input.MapBasedInputRow;
import com.metamx.druid.realtime.Firehose;
import com.metamx.druid.realtime.FirehoseFactory;
-
-
import twitter4j.ConnectionLifeCycleListener;
import twitter4j.HashtagEntity;
import twitter4j.Status;
@@ -33,7 +31,6 @@ import java.util.concurrent.TimeUnit;
import static java.lang.Thread.sleep;
-
/**
* Twitter "spritzer" Firehost Factory named "twitzer".
* Builds a Firehose that emits a stream of
diff --git a/index-common/pom.xml b/index-common/pom.xml
index 9d5f8d9a188..1cf0f861558 100644
--- a/index-common/pom.xml
+++ b/index-common/pom.xml
@@ -28,7 +28,7 @@
com.metamx
druid
- 0.3.34-SNAPSHOT
+ 0.3.35-SNAPSHOT
diff --git a/index-common/src/main/java/com/metamx/druid/index/column/ColumnCapabilitiesImpl.java b/index-common/src/main/java/com/metamx/druid/index/column/ColumnCapabilitiesImpl.java
index 69cb7ed628a..c2c28c4d4d6 100644
--- a/index-common/src/main/java/com/metamx/druid/index/column/ColumnCapabilitiesImpl.java
+++ b/index-common/src/main/java/com/metamx/druid/index/column/ColumnCapabilitiesImpl.java
@@ -19,7 +19,6 @@
package com.metamx.druid.index.column;
-
import com.fasterxml.jackson.annotation.JsonProperty;
/**
diff --git a/index-common/src/main/java/com/metamx/druid/index/column/ColumnDescriptor.java b/index-common/src/main/java/com/metamx/druid/index/column/ColumnDescriptor.java
index 587c2455652..2f8281250bd 100644
--- a/index-common/src/main/java/com/metamx/druid/index/column/ColumnDescriptor.java
+++ b/index-common/src/main/java/com/metamx/druid/index/column/ColumnDescriptor.java
@@ -26,8 +26,6 @@ import com.google.common.collect.Lists;
import com.metamx.common.IAE;
import com.metamx.druid.index.serde.ColumnPartSerde;
-
-
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.WritableByteChannel;
diff --git a/index-common/src/main/java/com/metamx/druid/index/serde/BitmapIndexColumnPartSupplier.java b/index-common/src/main/java/com/metamx/druid/index/serde/BitmapIndexColumnPartSupplier.java
index 2381639a0a8..dba6b7fcf91 100644
--- a/index-common/src/main/java/com/metamx/druid/index/serde/BitmapIndexColumnPartSupplier.java
+++ b/index-common/src/main/java/com/metamx/druid/index/serde/BitmapIndexColumnPartSupplier.java
@@ -22,7 +22,6 @@ package com.metamx.druid.index.serde;
import com.google.common.base.Supplier;
import com.metamx.druid.index.column.BitmapIndex;
import com.metamx.druid.kv.GenericIndexed;
-import com.metamx.druid.kv.Indexed;
import it.uniroma3.mat.extendedset.intset.ImmutableConciseSet;
/**
diff --git a/index-common/src/main/java/com/metamx/druid/index/serde/ColumnPartSerde.java b/index-common/src/main/java/com/metamx/druid/index/serde/ColumnPartSerde.java
index d9e53011429..5cf1f54786b 100644
--- a/index-common/src/main/java/com/metamx/druid/index/serde/ColumnPartSerde.java
+++ b/index-common/src/main/java/com/metamx/druid/index/serde/ColumnPartSerde.java
@@ -23,8 +23,6 @@ import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.metamx.druid.index.column.ColumnBuilder;
-
-
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.WritableByteChannel;
diff --git a/index-common/src/main/java/com/metamx/druid/index/serde/ComplexColumnPartSerde.java b/index-common/src/main/java/com/metamx/druid/index/serde/ComplexColumnPartSerde.java
index 0dc17bdb0dd..264294950bc 100644
--- a/index-common/src/main/java/com/metamx/druid/index/serde/ComplexColumnPartSerde.java
+++ b/index-common/src/main/java/com/metamx/druid/index/serde/ComplexColumnPartSerde.java
@@ -26,8 +26,6 @@ import com.metamx.druid.index.v1.serde.ComplexMetricSerde;
import com.metamx.druid.index.v1.serde.ComplexMetrics;
import com.metamx.druid.kv.GenericIndexed;
-
-
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.WritableByteChannel;
diff --git a/index-common/src/main/java/com/metamx/druid/index/serde/DictionaryEncodedColumnPartSerde.java b/index-common/src/main/java/com/metamx/druid/index/serde/DictionaryEncodedColumnPartSerde.java
index 5b542803c6c..5f7a38014d6 100644
--- a/index-common/src/main/java/com/metamx/druid/index/serde/DictionaryEncodedColumnPartSerde.java
+++ b/index-common/src/main/java/com/metamx/druid/index/serde/DictionaryEncodedColumnPartSerde.java
@@ -30,8 +30,6 @@ import com.metamx.druid.kv.VSizeIndexed;
import com.metamx.druid.kv.VSizeIndexedInts;
import it.uniroma3.mat.extendedset.intset.ImmutableConciseSet;
-
-
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.WritableByteChannel;
diff --git a/index-common/src/main/java/com/metamx/druid/index/serde/FloatGenericColumnPartSerde.java b/index-common/src/main/java/com/metamx/druid/index/serde/FloatGenericColumnPartSerde.java
index 2d0d5a0dc09..85646b0299f 100644
--- a/index-common/src/main/java/com/metamx/druid/index/serde/FloatGenericColumnPartSerde.java
+++ b/index-common/src/main/java/com/metamx/druid/index/serde/FloatGenericColumnPartSerde.java
@@ -25,8 +25,6 @@ import com.metamx.druid.index.column.ColumnBuilder;
import com.metamx.druid.index.column.ValueType;
import com.metamx.druid.index.v1.CompressedFloatsIndexedSupplier;
-
-
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
diff --git a/index-common/src/main/java/com/metamx/druid/index/serde/LongGenericColumnPartSerde.java b/index-common/src/main/java/com/metamx/druid/index/serde/LongGenericColumnPartSerde.java
index 8304062b05b..122297cac81 100644
--- a/index-common/src/main/java/com/metamx/druid/index/serde/LongGenericColumnPartSerde.java
+++ b/index-common/src/main/java/com/metamx/druid/index/serde/LongGenericColumnPartSerde.java
@@ -25,8 +25,6 @@ import com.metamx.druid.index.column.ColumnBuilder;
import com.metamx.druid.index.column.ValueType;
import com.metamx.druid.index.v1.CompressedLongsIndexedSupplier;
-
-
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
diff --git a/index-common/src/main/java/com/metamx/druid/index/serde/LongGenericColumnSupplier.java b/index-common/src/main/java/com/metamx/druid/index/serde/LongGenericColumnSupplier.java
index babdf7949f6..0f080d74564 100644
--- a/index-common/src/main/java/com/metamx/druid/index/serde/LongGenericColumnSupplier.java
+++ b/index-common/src/main/java/com/metamx/druid/index/serde/LongGenericColumnSupplier.java
@@ -24,8 +24,6 @@ import com.metamx.druid.index.column.GenericColumn;
import com.metamx.druid.index.column.IndexedLongsGenericColumn;
import com.metamx.druid.index.v1.CompressedLongsIndexedSupplier;
-import java.nio.ByteOrder;
-
/**
*/
public class LongGenericColumnSupplier implements Supplier
diff --git a/index-common/src/main/java/com/metamx/druid/index/v1/CompressedLongBufferObjectStrategy.java b/index-common/src/main/java/com/metamx/druid/index/v1/CompressedLongBufferObjectStrategy.java
index 27dd331a52f..0fed227d5a3 100644
--- a/index-common/src/main/java/com/metamx/druid/index/v1/CompressedLongBufferObjectStrategy.java
+++ b/index-common/src/main/java/com/metamx/druid/index/v1/CompressedLongBufferObjectStrategy.java
@@ -68,5 +68,4 @@ public class CompressedLongBufferObjectStrategy extends CompressedObjectStrategy
);
}
-
}
diff --git a/index-common/src/main/java/com/metamx/druid/index/v1/CompressedLongsSupplierSerializer.java b/index-common/src/main/java/com/metamx/druid/index/v1/CompressedLongsSupplierSerializer.java
index 57d326da04b..ef4260c8005 100644
--- a/index-common/src/main/java/com/metamx/druid/index/v1/CompressedLongsSupplierSerializer.java
+++ b/index-common/src/main/java/com/metamx/druid/index/v1/CompressedLongsSupplierSerializer.java
@@ -51,7 +51,6 @@ public class CompressedLongsSupplierSerializer
return retVal;
}
-
private final int sizePer;
private final FlattenedArrayWriter> flattener;
diff --git a/index-common/src/main/java/com/metamx/druid/index/v1/IncrementalIndexAdapter.java b/index-common/src/main/java/com/metamx/druid/index/v1/IncrementalIndexAdapter.java
index 3da50e3eaea..0baa92b16a1 100644
--- a/index-common/src/main/java/com/metamx/druid/index/v1/IncrementalIndexAdapter.java
+++ b/index-common/src/main/java/com/metamx/druid/index/v1/IncrementalIndexAdapter.java
@@ -36,7 +36,6 @@ import org.joda.time.Interval;
import javax.annotation.Nullable;
import java.util.Iterator;
-import java.util.List;
import java.util.Map;
/**
@@ -286,4 +285,4 @@ public class IncrementalIndexAdapter implements IndexableAdapter
{
return index.getMetricType(metric);
}
-}
\ No newline at end of file
+}
diff --git a/index-common/src/main/java/com/metamx/druid/index/v1/IndexIO.java b/index-common/src/main/java/com/metamx/druid/index/v1/IndexIO.java
index aa10fa8b2ec..df3836d7945 100644
--- a/index-common/src/main/java/com/metamx/druid/index/v1/IndexIO.java
+++ b/index-common/src/main/java/com/metamx/druid/index/v1/IndexIO.java
@@ -108,7 +108,6 @@ public class IndexIO
// This should really be provided by DI, should be changed once we switch around to using a DI framework
private static final ObjectMapper mapper = new DefaultObjectMapper();
-
private static volatile IndexIOHandler handler = null;
public static final int CURRENT_VERSION_ID = V9_VERSION;
diff --git a/index-common/src/main/java/com/metamx/druid/index/v1/IndexMerger.java b/index-common/src/main/java/com/metamx/druid/index/v1/IndexMerger.java
index dc03b8866dd..3c6ea59fc5c 100644
--- a/index-common/src/main/java/com/metamx/druid/index/v1/IndexMerger.java
+++ b/index-common/src/main/java/com/metamx/druid/index/v1/IndexMerger.java
@@ -69,14 +69,12 @@ import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
import java.nio.IntBuffer;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
-import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
diff --git a/index-common/src/main/java/com/metamx/druid/index/v1/MMappedIndex.java b/index-common/src/main/java/com/metamx/druid/index/v1/MMappedIndex.java
index f23e2b7d061..b354778078f 100644
--- a/index-common/src/main/java/com/metamx/druid/index/v1/MMappedIndex.java
+++ b/index-common/src/main/java/com/metamx/druid/index/v1/MMappedIndex.java
@@ -27,7 +27,6 @@ import com.metamx.common.logger.Logger;
import com.metamx.druid.kv.ConciseCompressedIndexedInts;
import com.metamx.druid.kv.GenericIndexed;
import com.metamx.druid.kv.Indexed;
-import com.metamx.druid.kv.IndexedInts;
import com.metamx.druid.kv.IndexedList;
import com.metamx.druid.kv.IndexedLongs;
import com.metamx.druid.kv.VSizeIndexed;
diff --git a/index-common/src/main/java/com/metamx/druid/index/v1/MetricColumnSerializer.java b/index-common/src/main/java/com/metamx/druid/index/v1/MetricColumnSerializer.java
index 253ed3cf5a4..2452f820b25 100644
--- a/index-common/src/main/java/com/metamx/druid/index/v1/MetricColumnSerializer.java
+++ b/index-common/src/main/java/com/metamx/druid/index/v1/MetricColumnSerializer.java
@@ -19,8 +19,6 @@
package com.metamx.druid.index.v1;
-import com.metamx.druid.aggregation.Aggregator;
-
import java.io.IOException;
/**
diff --git a/index-common/src/main/java/com/metamx/druid/index/v1/serde/ComplexMetricSerde.java b/index-common/src/main/java/com/metamx/druid/index/v1/serde/ComplexMetricSerde.java
index e54fb1cceca..eb39ece5a70 100644
--- a/index-common/src/main/java/com/metamx/druid/index/v1/serde/ComplexMetricSerde.java
+++ b/index-common/src/main/java/com/metamx/druid/index/v1/serde/ComplexMetricSerde.java
@@ -58,7 +58,6 @@ public abstract class ComplexMetricSerde
@Deprecated
public abstract ObjectStrategy getObjectStrategy();
-
/**
* Returns a function that can convert the Object provided by the ComplexColumn created through deserializeColumn
* into a number of expected input bytes to produce that object.
diff --git a/index-common/src/main/java/com/metamx/druid/index/v1/serde/Registererer.java b/index-common/src/main/java/com/metamx/druid/index/v1/serde/Registererer.java
index 066d6bf47ed..8a18b7033cb 100644
--- a/index-common/src/main/java/com/metamx/druid/index/v1/serde/Registererer.java
+++ b/index-common/src/main/java/com/metamx/druid/index/v1/serde/Registererer.java
@@ -19,7 +19,6 @@
package com.metamx.druid.index.v1.serde;
-
import com.fasterxml.jackson.databind.ObjectMapper;
/**
diff --git a/index-common/src/main/java/com/metamx/druid/indexer/data/CSVDataSpec.java b/index-common/src/main/java/com/metamx/druid/indexer/data/CSVDataSpec.java
index cf2a2d56d0d..7f4d5357057 100644
--- a/index-common/src/main/java/com/metamx/druid/indexer/data/CSVDataSpec.java
+++ b/index-common/src/main/java/com/metamx/druid/indexer/data/CSVDataSpec.java
@@ -25,8 +25,6 @@ import com.google.common.base.Preconditions;
import com.metamx.common.parsers.CSVParser;
import com.metamx.common.parsers.Parser;
-
-
import java.util.List;
/**
diff --git a/index-common/src/main/java/com/metamx/druid/indexer/data/DataSpec.java b/index-common/src/main/java/com/metamx/druid/indexer/data/DataSpec.java
index 149a1946c42..814850a5c52 100644
--- a/index-common/src/main/java/com/metamx/druid/indexer/data/DataSpec.java
+++ b/index-common/src/main/java/com/metamx/druid/indexer/data/DataSpec.java
@@ -23,8 +23,6 @@ import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.metamx.common.parsers.Parser;
-
-
import java.util.List;
/**
diff --git a/index-common/src/main/java/com/metamx/druid/indexer/data/DelimitedDataSpec.java b/index-common/src/main/java/com/metamx/druid/indexer/data/DelimitedDataSpec.java
index 177f0a2c358..90a28e1c8fd 100644
--- a/index-common/src/main/java/com/metamx/druid/indexer/data/DelimitedDataSpec.java
+++ b/index-common/src/main/java/com/metamx/druid/indexer/data/DelimitedDataSpec.java
@@ -25,8 +25,6 @@ import com.google.common.base.Preconditions;
import com.metamx.common.parsers.DelimitedParser;
import com.metamx.common.parsers.Parser;
-
-
import java.util.List;
/**
diff --git a/index-common/src/main/java/com/metamx/druid/indexer/data/JSONDataSpec.java b/index-common/src/main/java/com/metamx/druid/indexer/data/JSONDataSpec.java
index 74255c2b261..67119d2532c 100644
--- a/index-common/src/main/java/com/metamx/druid/indexer/data/JSONDataSpec.java
+++ b/index-common/src/main/java/com/metamx/druid/indexer/data/JSONDataSpec.java
@@ -23,7 +23,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.metamx.common.parsers.JSONParser;
import com.metamx.common.parsers.Parser;
-
import java.util.List;
/**
diff --git a/index-common/src/main/java/com/metamx/druid/indexer/data/StringInputRowParser.java b/index-common/src/main/java/com/metamx/druid/indexer/data/StringInputRowParser.java
index e04bd3d1d7c..373ce90c290 100644
--- a/index-common/src/main/java/com/metamx/druid/indexer/data/StringInputRowParser.java
+++ b/index-common/src/main/java/com/metamx/druid/indexer/data/StringInputRowParser.java
@@ -30,7 +30,6 @@ import com.metamx.common.parsers.ToLowerCaseParser;
import com.metamx.druid.input.InputRow;
import com.metamx.druid.input.MapBasedInputRow;
-
import org.joda.time.DateTime;
import java.util.List;
diff --git a/index-common/src/main/java/com/metamx/druid/indexer/data/TimestampSpec.java b/index-common/src/main/java/com/metamx/druid/indexer/data/TimestampSpec.java
index 0f52bae8bd2..ab216a2b415 100644
--- a/index-common/src/main/java/com/metamx/druid/indexer/data/TimestampSpec.java
+++ b/index-common/src/main/java/com/metamx/druid/indexer/data/TimestampSpec.java
@@ -24,7 +24,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Function;
import com.metamx.common.parsers.ParserUtils;
-
import org.joda.time.DateTime;
import java.util.Map;
diff --git a/index-common/src/main/java/com/metamx/druid/indexer/data/ToLowercaseDataSpec.java b/index-common/src/main/java/com/metamx/druid/indexer/data/ToLowercaseDataSpec.java
index 2882d1a813a..95b3e6d2b80 100644
--- a/index-common/src/main/java/com/metamx/druid/indexer/data/ToLowercaseDataSpec.java
+++ b/index-common/src/main/java/com/metamx/druid/indexer/data/ToLowercaseDataSpec.java
@@ -23,7 +23,6 @@ import com.fasterxml.jackson.annotation.JsonValue;
import com.metamx.common.parsers.Parser;
import com.metamx.common.parsers.ToLowerCaseParser;
-
import java.util.List;
/**
diff --git a/index-common/src/main/java/com/metamx/druid/kv/ConciseCompressedIndexedInts.java b/index-common/src/main/java/com/metamx/druid/kv/ConciseCompressedIndexedInts.java
index c35d53328f2..2fdaeda30c0 100644
--- a/index-common/src/main/java/com/metamx/druid/kv/ConciseCompressedIndexedInts.java
+++ b/index-common/src/main/java/com/metamx/druid/kv/ConciseCompressedIndexedInts.java
@@ -19,7 +19,6 @@
package com.metamx.druid.kv;
-
import com.google.common.collect.Ordering;
import it.uniroma3.mat.extendedset.intset.ImmutableConciseSet;
import it.uniroma3.mat.extendedset.intset.IntSet;
diff --git a/index-common/src/main/java/com/metamx/druid/kv/EmptyIndexedInts.java b/index-common/src/main/java/com/metamx/druid/kv/EmptyIndexedInts.java
index aaf4d8bffef..cd83f0b481d 100644
--- a/index-common/src/main/java/com/metamx/druid/kv/EmptyIndexedInts.java
+++ b/index-common/src/main/java/com/metamx/druid/kv/EmptyIndexedInts.java
@@ -21,7 +21,6 @@ package com.metamx.druid.kv;
import com.google.common.collect.ImmutableList;
-import java.util.Collections;
import java.util.Iterator;
/**
diff --git a/index-common/src/main/java/com/metamx/druid/kv/IndexedIntsIterator.java b/index-common/src/main/java/com/metamx/druid/kv/IndexedIntsIterator.java
index dacd5d81139..02d5c47f663 100644
--- a/index-common/src/main/java/com/metamx/druid/kv/IndexedIntsIterator.java
+++ b/index-common/src/main/java/com/metamx/druid/kv/IndexedIntsIterator.java
@@ -39,7 +39,6 @@ public class IndexedIntsIterator implements Iterator
size = baseInts.size();
}
-
@Override
public boolean hasNext()
{
diff --git a/index-common/src/main/java/com/metamx/druid/kv/VSizeIndexedInts.java b/index-common/src/main/java/com/metamx/druid/kv/VSizeIndexedInts.java
index 2b880f96f97..616065d163c 100644
--- a/index-common/src/main/java/com/metamx/druid/kv/VSizeIndexedInts.java
+++ b/index-common/src/main/java/com/metamx/druid/kv/VSizeIndexedInts.java
@@ -152,7 +152,6 @@ public class VSizeIndexedInts implements IndexedInts, Comparable iterator()
{
diff --git a/indexer/pom.xml b/indexer/pom.xml
index 20251db4af6..29d56905235 100644
--- a/indexer/pom.xml
+++ b/indexer/pom.xml
@@ -28,7 +28,7 @@
com.metamx
druid
- 0.3.34-SNAPSHOT
+ 0.3.35-SNAPSHOT
diff --git a/indexer/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexer.java b/indexer/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexer.java
index f9749b79861..92f0560f1f7 100644
--- a/indexer/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexer.java
+++ b/indexer/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexer.java
@@ -22,8 +22,6 @@ package com.metamx.druid.indexer;
import com.google.common.collect.ImmutableList;
import com.metamx.common.Pair;
import com.metamx.common.lifecycle.Lifecycle;
-import com.metamx.druid.jackson.DefaultObjectMapper;
-
import java.util.List;
diff --git a/indexer/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerAzkWrapper.java b/indexer/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerAzkWrapper.java
index 5318d5cb600..244c1d80901 100644
--- a/indexer/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerAzkWrapper.java
+++ b/indexer/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerAzkWrapper.java
@@ -21,15 +21,12 @@ package com.metamx.druid.indexer;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
-import com.metamx.common.Granularity;
import com.metamx.common.MapUtils;
import com.metamx.common.logger.Logger;
-import com.metamx.druid.indexer.path.GranularityPathSpec;
import com.metamx.druid.jackson.DefaultObjectMapper;
import org.joda.time.DateTime;
import org.joda.time.Interval;
-import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Properties;
diff --git a/indexer/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerConfig.java b/indexer/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerConfig.java
index 5dc45d19484..1dfad9de181 100644
--- a/indexer/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerConfig.java
+++ b/indexer/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerConfig.java
@@ -60,10 +60,6 @@ import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.mapreduce.Job;
-
-
-
-
import org.joda.time.DateTime;
import org.joda.time.Interval;
import org.joda.time.format.ISODateTimeFormat;
@@ -612,7 +608,6 @@ public class HadoopDruidIndexerConfig
return shardSpecs.get(bucket.time).get(bucket.partitionNum);
}
-
/******************************************
Path helper logic
******************************************/
diff --git a/indexer/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerJob.java b/indexer/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerJob.java
index aff1265782a..8dad62cd2c6 100644
--- a/indexer/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerJob.java
+++ b/indexer/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerJob.java
@@ -19,7 +19,6 @@
package com.metamx.druid.indexer;
-import com.google.common.base.Preconditions;
import com.google.common.base.Throwables;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
diff --git a/indexer/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerNode.java b/indexer/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerNode.java
index 62441560573..96d8ad7aad8 100644
--- a/indexer/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerNode.java
+++ b/indexer/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerNode.java
@@ -25,7 +25,6 @@ import com.google.common.collect.Lists;
import com.metamx.common.lifecycle.LifecycleStart;
import com.metamx.common.lifecycle.LifecycleStop;
-import org.joda.time.DateTime;
import org.joda.time.Interval;
import java.io.File;
diff --git a/indexer/src/main/java/com/metamx/druid/indexer/HadoopyShardSpec.java b/indexer/src/main/java/com/metamx/druid/indexer/HadoopyShardSpec.java
index c0d692c7c5f..1a67e9c3495 100644
--- a/indexer/src/main/java/com/metamx/druid/indexer/HadoopyShardSpec.java
+++ b/indexer/src/main/java/com/metamx/druid/indexer/HadoopyShardSpec.java
@@ -23,8 +23,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.metamx.druid.shard.ShardSpec;
-
-
/**
* ShardSpec + a shard ID that is unique across this run. The shard ID is used for grouping and partitioning.
* There is one HadoopyShardSpec per Bucket, and our shardNum matches the Bucket shardNum.
diff --git a/indexer/src/main/java/com/metamx/druid/indexer/SortableBytes.java b/indexer/src/main/java/com/metamx/druid/indexer/SortableBytes.java
index 394f9dacffb..94f3f07b7d2 100644
--- a/indexer/src/main/java/com/metamx/druid/indexer/SortableBytes.java
+++ b/indexer/src/main/java/com/metamx/druid/indexer/SortableBytes.java
@@ -110,7 +110,6 @@ public class SortableBytes
job.setPartitionerClass(SortableBytesPartitioner.class);
}
-
public static class SortableBytesGroupingComparator extends WritableComparator
{
diff --git a/indexer/src/main/java/com/metamx/druid/indexer/Utils.java b/indexer/src/main/java/com/metamx/druid/indexer/Utils.java
index 97b046076e3..10c989f10a0 100644
--- a/indexer/src/main/java/com/metamx/druid/indexer/Utils.java
+++ b/indexer/src/main/java/com/metamx/druid/indexer/Utils.java
@@ -33,8 +33,6 @@ import org.apache.hadoop.mapreduce.JobContext;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.util.ReflectionUtils;
-
-
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
diff --git a/indexer/src/main/java/com/metamx/druid/indexer/granularity/ArbitraryGranularitySpec.java b/indexer/src/main/java/com/metamx/druid/indexer/granularity/ArbitraryGranularitySpec.java
index e79af1e1df5..8484e898c60 100644
--- a/indexer/src/main/java/com/metamx/druid/indexer/granularity/ArbitraryGranularitySpec.java
+++ b/indexer/src/main/java/com/metamx/druid/indexer/granularity/ArbitraryGranularitySpec.java
@@ -27,7 +27,6 @@ import com.google.common.collect.PeekingIterator;
import com.google.common.collect.Sets;
import com.metamx.common.guava.Comparators;
-
import org.joda.time.DateTime;
import org.joda.time.Interval;
diff --git a/indexer/src/main/java/com/metamx/druid/indexer/granularity/GranularitySpec.java b/indexer/src/main/java/com/metamx/druid/indexer/granularity/GranularitySpec.java
index ee73f4fdb25..8566a158000 100644
--- a/indexer/src/main/java/com/metamx/druid/indexer/granularity/GranularitySpec.java
+++ b/indexer/src/main/java/com/metamx/druid/indexer/granularity/GranularitySpec.java
@@ -23,7 +23,6 @@ import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.google.common.base.Optional;
-
import org.joda.time.DateTime;
import org.joda.time.Interval;
diff --git a/indexer/src/main/java/com/metamx/druid/indexer/granularity/UniformGranularitySpec.java b/indexer/src/main/java/com/metamx/druid/indexer/granularity/UniformGranularitySpec.java
index 22696a69c5d..aee68644154 100644
--- a/indexer/src/main/java/com/metamx/druid/indexer/granularity/UniformGranularitySpec.java
+++ b/indexer/src/main/java/com/metamx/druid/indexer/granularity/UniformGranularitySpec.java
@@ -25,17 +25,13 @@ import com.google.common.base.Optional;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
import com.metamx.common.Granularity;
-import com.metamx.common.guava.Comparators;
-
import org.joda.time.DateTime;
import org.joda.time.Interval;
import java.util.List;
import java.util.SortedSet;
-import java.util.TreeSet;
public class UniformGranularitySpec implements GranularitySpec
{
diff --git a/indexer/src/main/java/com/metamx/druid/indexer/partitions/PartitionsSpec.java b/indexer/src/main/java/com/metamx/druid/indexer/partitions/PartitionsSpec.java
index 7988fb49c5b..e30bad393f6 100644
--- a/indexer/src/main/java/com/metamx/druid/indexer/partitions/PartitionsSpec.java
+++ b/indexer/src/main/java/com/metamx/druid/indexer/partitions/PartitionsSpec.java
@@ -1,8 +1,5 @@
package com.metamx.druid.indexer.partitions;
-
-
-
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/indexer/src/main/java/com/metamx/druid/indexer/path/GranularUnprocessedPathSpec.java b/indexer/src/main/java/com/metamx/druid/indexer/path/GranularUnprocessedPathSpec.java
index 3bcfb30c31d..1c044432da3 100644
--- a/indexer/src/main/java/com/metamx/druid/indexer/path/GranularUnprocessedPathSpec.java
+++ b/indexer/src/main/java/com/metamx/druid/indexer/path/GranularUnprocessedPathSpec.java
@@ -25,7 +25,6 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.metamx.common.Granularity;
import com.metamx.common.guava.Comparators;
-import com.metamx.druid.common.s3.S3Utils;
import com.metamx.druid.indexer.HadoopDruidIndexerConfig;
import com.metamx.druid.indexer.granularity.UniformGranularitySpec;
import com.metamx.druid.indexer.hadoop.FSSpideringIterator;
@@ -34,12 +33,10 @@ import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.mapreduce.Job;
-import org.jets3t.service.model.S3Object;
import org.joda.time.DateTime;
import org.joda.time.Interval;
import java.io.IOException;
-import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
diff --git a/indexer/src/main/java/com/metamx/druid/indexer/path/PathSpec.java b/indexer/src/main/java/com/metamx/druid/indexer/path/PathSpec.java
index 4a0b7278ad7..52e497265ec 100644
--- a/indexer/src/main/java/com/metamx/druid/indexer/path/PathSpec.java
+++ b/indexer/src/main/java/com/metamx/druid/indexer/path/PathSpec.java
@@ -24,8 +24,6 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.metamx.druid.indexer.HadoopDruidIndexerConfig;
import org.apache.hadoop.mapreduce.Job;
-
-
import java.io.IOException;
/**
diff --git a/indexer/src/main/java/com/metamx/druid/indexer/path/StaticPathSpec.java b/indexer/src/main/java/com/metamx/druid/indexer/path/StaticPathSpec.java
index 9a244c2f74a..4a096d96b7f 100644
--- a/indexer/src/main/java/com/metamx/druid/indexer/path/StaticPathSpec.java
+++ b/indexer/src/main/java/com/metamx/druid/indexer/path/StaticPathSpec.java
@@ -25,7 +25,6 @@ import com.metamx.druid.indexer.HadoopDruidIndexerConfig;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
-
import java.io.IOException;
/**
diff --git a/indexer/src/main/java/com/metamx/druid/indexer/rollup/DataRollupSpec.java b/indexer/src/main/java/com/metamx/druid/indexer/rollup/DataRollupSpec.java
index a223589db08..e3c82bfbc03 100644
--- a/indexer/src/main/java/com/metamx/druid/indexer/rollup/DataRollupSpec.java
+++ b/indexer/src/main/java/com/metamx/druid/indexer/rollup/DataRollupSpec.java
@@ -20,11 +20,9 @@
package com.metamx.druid.indexer.rollup;
import com.fasterxml.jackson.annotation.JsonProperty;
-import com.metamx.common.Granularity;
import com.metamx.druid.QueryGranularity;
import com.metamx.druid.aggregation.AggregatorFactory;
-
import java.util.List;
/**
diff --git a/indexer/src/main/java/com/metamx/druid/indexer/updater/DbUpdaterJobSpec.java b/indexer/src/main/java/com/metamx/druid/indexer/updater/DbUpdaterJobSpec.java
index 7a8892e9160..539c6860573 100644
--- a/indexer/src/main/java/com/metamx/druid/indexer/updater/DbUpdaterJobSpec.java
+++ b/indexer/src/main/java/com/metamx/druid/indexer/updater/DbUpdaterJobSpec.java
@@ -22,7 +22,6 @@ package com.metamx.druid.indexer.updater;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.metamx.druid.db.DbConnectorConfig;
-
/**
*/
public class DbUpdaterJobSpec extends DbConnectorConfig implements UpdaterJobSpec
diff --git a/indexer/src/main/java/com/metamx/druid/indexer/updater/UpdaterJobSpec.java b/indexer/src/main/java/com/metamx/druid/indexer/updater/UpdaterJobSpec.java
index 2957c1b3bf7..f4294869152 100644
--- a/indexer/src/main/java/com/metamx/druid/indexer/updater/UpdaterJobSpec.java
+++ b/indexer/src/main/java/com/metamx/druid/indexer/updater/UpdaterJobSpec.java
@@ -19,7 +19,6 @@
package com.metamx.druid.indexer.updater;
-
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
diff --git a/indexer/src/main/java/com/metamx/druid/indexer/updater/ZkUpdaterJobSpec.java b/indexer/src/main/java/com/metamx/druid/indexer/updater/ZkUpdaterJobSpec.java
index 1199e1ddf44..b79fab21747 100644
--- a/indexer/src/main/java/com/metamx/druid/indexer/updater/ZkUpdaterJobSpec.java
+++ b/indexer/src/main/java/com/metamx/druid/indexer/updater/ZkUpdaterJobSpec.java
@@ -19,7 +19,6 @@
package com.metamx.druid.indexer.updater;
-
import com.fasterxml.jackson.annotation.JsonProperty;
/**
diff --git a/merger/pom.xml b/merger/pom.xml
index 40be9765c22..5b1b7f3ba1a 100644
--- a/merger/pom.xml
+++ b/merger/pom.xml
@@ -28,7 +28,7 @@
com.metamx
druid
- 0.3.34-SNAPSHOT
+ 0.3.35-SNAPSHOT
diff --git a/merger/src/main/java/com/metamx/druid/merger/common/actions/RemoteTaskActionClient.java b/merger/src/main/java/com/metamx/druid/merger/common/actions/RemoteTaskActionClient.java
index d2c761f2770..76c29fe7b27 100644
--- a/merger/src/main/java/com/metamx/druid/merger/common/actions/RemoteTaskActionClient.java
+++ b/merger/src/main/java/com/metamx/druid/merger/common/actions/RemoteTaskActionClient.java
@@ -18,7 +18,6 @@ import org.joda.time.Duration;
import java.io.IOException;
import java.net.URI;
import java.util.Map;
-import java.util.concurrent.ExecutionException;
public class RemoteTaskActionClient implements TaskActionClient
{
diff --git a/merger/src/main/java/com/metamx/druid/merger/common/actions/TaskActionToolbox.java b/merger/src/main/java/com/metamx/druid/merger/common/actions/TaskActionToolbox.java
index af8f6dcd40c..0ba45777305 100644
--- a/merger/src/main/java/com/metamx/druid/merger/common/actions/TaskActionToolbox.java
+++ b/merger/src/main/java/com/metamx/druid/merger/common/actions/TaskActionToolbox.java
@@ -2,7 +2,6 @@ package com.metamx.druid.merger.common.actions;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
-import com.metamx.common.ISE;
import com.metamx.druid.client.DataSegment;
import com.metamx.druid.merger.common.TaskLock;
import com.metamx.druid.merger.common.task.Task;
diff --git a/merger/src/main/java/com/metamx/druid/merger/common/index/StaticS3FirehoseFactory.java b/merger/src/main/java/com/metamx/druid/merger/common/index/StaticS3FirehoseFactory.java
index 1ea40a95d2a..770deec5690 100644
--- a/merger/src/main/java/com/metamx/druid/merger/common/index/StaticS3FirehoseFactory.java
+++ b/merger/src/main/java/com/metamx/druid/merger/common/index/StaticS3FirehoseFactory.java
@@ -36,9 +36,6 @@ import com.metamx.druid.realtime.FirehoseFactory;
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.LineIterator;
-
-
-
import org.jets3t.service.S3Service;
import org.jets3t.service.model.S3Object;
diff --git a/merger/src/main/java/com/metamx/druid/merger/common/index/YeOldePlumberSchool.java b/merger/src/main/java/com/metamx/druid/merger/common/index/YeOldePlumberSchool.java
index c89122f49e3..92d5d06c145 100644
--- a/merger/src/main/java/com/metamx/druid/merger/common/index/YeOldePlumberSchool.java
+++ b/merger/src/main/java/com/metamx/druid/merger/common/index/YeOldePlumberSchool.java
@@ -44,7 +44,6 @@ import com.metamx.druid.realtime.plumber.PlumberSchool;
import com.metamx.druid.realtime.Schema;
import com.metamx.druid.realtime.plumber.Sink;
-
import org.apache.commons.io.FileUtils;
import org.joda.time.Interval;
diff --git a/merger/src/main/java/com/metamx/druid/merger/common/task/MergeTask.java b/merger/src/main/java/com/metamx/druid/merger/common/task/MergeTask.java
index 9867eec0c4c..e0f3dfde649 100644
--- a/merger/src/main/java/com/metamx/druid/merger/common/task/MergeTask.java
+++ b/merger/src/main/java/com/metamx/druid/merger/common/task/MergeTask.java
@@ -32,8 +32,6 @@ import com.metamx.druid.index.QueryableIndex;
import com.metamx.druid.index.v1.IndexIO;
import com.metamx.druid.index.v1.IndexMerger;
-
-
import javax.annotation.Nullable;
import java.io.File;
import java.util.List;
diff --git a/merger/src/main/java/com/metamx/druid/merger/common/task/MergeTaskBase.java b/merger/src/main/java/com/metamx/druid/merger/common/task/MergeTaskBase.java
index 57a3d34b13b..33aae0b3dff 100644
--- a/merger/src/main/java/com/metamx/druid/merger/common/task/MergeTaskBase.java
+++ b/merger/src/main/java/com/metamx/druid/merger/common/task/MergeTaskBase.java
@@ -144,7 +144,6 @@ public abstract class MergeTaskBase extends AbstractTask
)
);
-
// download segments to merge
final Map gettedSegments = toolbox.getSegments(segments);
diff --git a/merger/src/main/java/com/metamx/druid/merger/common/task/RealtimeIndexTask.java b/merger/src/main/java/com/metamx/druid/merger/common/task/RealtimeIndexTask.java
index 65bad47c1bc..6dadff49af0 100644
--- a/merger/src/main/java/com/metamx/druid/merger/common/task/RealtimeIndexTask.java
+++ b/merger/src/main/java/com/metamx/druid/merger/common/task/RealtimeIndexTask.java
@@ -1,3 +1,22 @@
+/*
+ * Druid - a distributed column store.
+ * Copyright (C) 2012 Metamarkets Group Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
package com.metamx.druid.merger.common.task;
import com.fasterxml.jackson.annotation.JsonCreator;
diff --git a/merger/src/main/java/com/metamx/druid/merger/coordinator/DbTaskStorage.java b/merger/src/main/java/com/metamx/druid/merger/coordinator/DbTaskStorage.java
index 98d16d671e9..4d2e7416013 100644
--- a/merger/src/main/java/com/metamx/druid/merger/coordinator/DbTaskStorage.java
+++ b/merger/src/main/java/com/metamx/druid/merger/coordinator/DbTaskStorage.java
@@ -28,22 +28,19 @@ import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
-import com.metamx.common.Pair;
-import com.metamx.common.logger.Logger;
import com.metamx.druid.merger.common.TaskStatus;
import com.metamx.druid.merger.common.actions.TaskAction;
import com.metamx.druid.merger.common.TaskLock;
import com.metamx.druid.merger.common.task.Task;
import com.metamx.druid.merger.coordinator.config.IndexerDbConnectorConfig;
-
import com.metamx.emitter.EmittingLogger;
+
import org.joda.time.DateTime;
import org.skife.jdbi.v2.DBI;
import org.skife.jdbi.v2.Handle;
import org.skife.jdbi.v2.exceptions.StatementException;
import org.skife.jdbi.v2.tweak.HandleCallback;
-import javax.annotation.Nullable;
import java.util.List;
import java.util.Map;
diff --git a/merger/src/main/java/com/metamx/druid/merger/coordinator/TaskStorageQueryAdapter.java b/merger/src/main/java/com/metamx/druid/merger/coordinator/TaskStorageQueryAdapter.java
index da8269f140f..983bf47e502 100644
--- a/merger/src/main/java/com/metamx/druid/merger/coordinator/TaskStorageQueryAdapter.java
+++ b/merger/src/main/java/com/metamx/druid/merger/coordinator/TaskStorageQueryAdapter.java
@@ -22,7 +22,6 @@ package com.metamx.druid.merger.coordinator;
import com.google.common.base.Function;
import com.google.common.base.Optional;
import com.google.common.base.Predicate;
-import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
diff --git a/merger/src/main/java/com/metamx/druid/merger/coordinator/ZkWorker.java b/merger/src/main/java/com/metamx/druid/merger/coordinator/ZkWorker.java
index 5ec5651350b..c3f2f1b4d36 100644
--- a/merger/src/main/java/com/metamx/druid/merger/coordinator/ZkWorker.java
+++ b/merger/src/main/java/com/metamx/druid/merger/coordinator/ZkWorker.java
@@ -20,7 +20,6 @@
package com.metamx.druid.merger.coordinator;
import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonUnwrapped;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.Function;
import com.google.common.base.Throwables;
diff --git a/merger/src/main/java/com/metamx/druid/merger/coordinator/http/IndexerCoordinatorNode.java b/merger/src/main/java/com/metamx/druid/merger/coordinator/http/IndexerCoordinatorNode.java
index c5e3de5a7e2..28602887c1b 100644
--- a/merger/src/main/java/com/metamx/druid/merger/coordinator/http/IndexerCoordinatorNode.java
+++ b/merger/src/main/java/com/metamx/druid/merger/coordinator/http/IndexerCoordinatorNode.java
@@ -112,6 +112,7 @@ import com.netflix.curator.framework.recipes.cache.PathChildrenCache;
import org.jets3t.service.S3ServiceException;
import org.jets3t.service.impl.rest.httpclient.RestS3Service;
import org.jets3t.service.security.AWSCredentials;
+import org.joda.time.Duration;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.servlet.Context;
import org.mortbay.jetty.servlet.DefaultServlet;
@@ -492,7 +493,14 @@ public class IndexerCoordinatorNode extends RegisteringNode
{
if (httpClient == null) {
httpClient = HttpClientInit.createClient(
- HttpClientConfig.builder().withNumConnections(1).build(), lifecycle
+ HttpClientConfig.builder().withNumConnections(1).withReadTimeout(
+ new Duration(
+ PropUtils.getProperty(
+ props,
+ "druid.emitter.timeOut"
+ )
+ )
+ ).build(), lifecycle
);
}
}
diff --git a/merger/src/main/java/com/metamx/druid/merger/coordinator/scaling/EC2AutoScalingStrategy.java b/merger/src/main/java/com/metamx/druid/merger/coordinator/scaling/EC2AutoScalingStrategy.java
index 0eaf974c280..fb3e00a2dc5 100644
--- a/merger/src/main/java/com/metamx/druid/merger/coordinator/scaling/EC2AutoScalingStrategy.java
+++ b/merger/src/main/java/com/metamx/druid/merger/coordinator/scaling/EC2AutoScalingStrategy.java
@@ -37,7 +37,6 @@ import com.metamx.druid.merger.coordinator.setup.WorkerSetupData;
import com.metamx.emitter.EmittingLogger;
import org.apache.commons.codec.binary.Base64;
-
import javax.annotation.Nullable;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
diff --git a/merger/src/main/java/com/metamx/druid/merger/coordinator/setup/EC2NodeData.java b/merger/src/main/java/com/metamx/druid/merger/coordinator/setup/EC2NodeData.java
index 6def924eb98..c966705d7a6 100644
--- a/merger/src/main/java/com/metamx/druid/merger/coordinator/setup/EC2NodeData.java
+++ b/merger/src/main/java/com/metamx/druid/merger/coordinator/setup/EC2NodeData.java
@@ -19,9 +19,6 @@
package com.metamx.druid.merger.coordinator.setup;
-
-
-
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/merger/src/main/java/com/metamx/druid/merger/coordinator/setup/GalaxyUserData.java b/merger/src/main/java/com/metamx/druid/merger/coordinator/setup/GalaxyUserData.java
index 262fe3ac66d..4b6012748f6 100644
--- a/merger/src/main/java/com/metamx/druid/merger/coordinator/setup/GalaxyUserData.java
+++ b/merger/src/main/java/com/metamx/druid/merger/coordinator/setup/GalaxyUserData.java
@@ -19,7 +19,6 @@
package com.metamx.druid.merger.coordinator.setup;
-
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/merger/src/main/java/com/metamx/druid/merger/coordinator/setup/WorkerSetupData.java b/merger/src/main/java/com/metamx/druid/merger/coordinator/setup/WorkerSetupData.java
index f647f694998..d4384b0cae9 100644
--- a/merger/src/main/java/com/metamx/druid/merger/coordinator/setup/WorkerSetupData.java
+++ b/merger/src/main/java/com/metamx/druid/merger/coordinator/setup/WorkerSetupData.java
@@ -19,12 +19,9 @@
package com.metamx.druid.merger.coordinator.setup;
-
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-
/**
*/
public class WorkerSetupData
diff --git a/merger/src/main/java/com/metamx/druid/merger/worker/Worker.java b/merger/src/main/java/com/metamx/druid/merger/worker/Worker.java
index e8eaac824b3..ad389caf2f4 100644
--- a/merger/src/main/java/com/metamx/druid/merger/worker/Worker.java
+++ b/merger/src/main/java/com/metamx/druid/merger/worker/Worker.java
@@ -23,8 +23,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.metamx.druid.merger.worker.config.WorkerConfig;
-
-
/**
* A container for worker metadata.
*/
diff --git a/merger/src/main/java/com/metamx/druid/merger/worker/http/WorkerNode.java b/merger/src/main/java/com/metamx/druid/merger/worker/http/WorkerNode.java
index 42a1051c693..12b98b40882 100644
--- a/merger/src/main/java/com/metamx/druid/merger/worker/http/WorkerNode.java
+++ b/merger/src/main/java/com/metamx/druid/merger/worker/http/WorkerNode.java
@@ -70,6 +70,7 @@ import com.netflix.curator.x.discovery.ServiceProvider;
import org.jets3t.service.S3ServiceException;
import org.jets3t.service.impl.rest.httpclient.RestS3Service;
import org.jets3t.service.security.AWSCredentials;
+import org.joda.time.Duration;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.servlet.Context;
import org.mortbay.jetty.servlet.DefaultServlet;
@@ -280,7 +281,9 @@ public class WorkerNode extends RegisteringNode
{
if (httpClient == null) {
httpClient = HttpClientInit.createClient(
- HttpClientConfig.builder().withNumConnections(1).build(), lifecycle
+ HttpClientConfig.builder().withNumConnections(1)
+ .withReadTimeout(new Duration(PropUtils.getProperty(props, "druid.emitter.timeOut")))
+ .build(), lifecycle
);
}
}
@@ -299,7 +302,7 @@ public class WorkerNode extends RegisteringNode
private void initializeS3Service() throws S3ServiceException
{
- if(s3Service == null) {
+ if (s3Service == null) {
s3Service = new RestS3Service(
new AWSCredentials(
PropUtils.getProperty(props, "com.metamx.aws.accessKey"),
diff --git a/merger/src/test/java/com/metamx/druid/merger/common/task/TaskSerdeTest.java b/merger/src/test/java/com/metamx/druid/merger/common/task/TaskSerdeTest.java
index 1bb89b5f899..220ce19a16e 100644
--- a/merger/src/test/java/com/metamx/druid/merger/common/task/TaskSerdeTest.java
+++ b/merger/src/test/java/com/metamx/druid/merger/common/task/TaskSerdeTest.java
@@ -255,7 +255,6 @@ public class TaskSerdeTest
Assert.assertEquals(task.getImplicitLockInterval().get(), task2.getImplicitLockInterval().get());
}
-
@Test
public void testDeleteTaskFromJson() throws Exception
{
diff --git a/pom.xml b/pom.xml
index 3d206ddf77d..30cba38c3a6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
com.metamx
druid
pom
- 0.3.34-SNAPSHOT
+ 0.3.35-SNAPSHOT
druid
druid
@@ -64,7 +64,7 @@
com.metamx
http-client
- 0.7.0
+ 0.7.1
com.metamx
diff --git a/realtime/pom.xml b/realtime/pom.xml
index ffdfc007f04..330439bcb4a 100644
--- a/realtime/pom.xml
+++ b/realtime/pom.xml
@@ -28,7 +28,7 @@
com.metamx
druid
- 0.3.34-SNAPSHOT
+ 0.3.35-SNAPSHOT
diff --git a/realtime/src/main/java/com/metamx/druid/realtime/FireDepartment.java b/realtime/src/main/java/com/metamx/druid/realtime/FireDepartment.java
index b895cb21040..fdc16456127 100644
--- a/realtime/src/main/java/com/metamx/druid/realtime/FireDepartment.java
+++ b/realtime/src/main/java/com/metamx/druid/realtime/FireDepartment.java
@@ -19,9 +19,6 @@
package com.metamx.druid.realtime;
-
-
-
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.metamx.druid.realtime.plumber.Plumber;
diff --git a/realtime/src/main/java/com/metamx/druid/realtime/FirehoseFactory.java b/realtime/src/main/java/com/metamx/druid/realtime/FirehoseFactory.java
index 40d0e662b49..a3481f84ad8 100644
--- a/realtime/src/main/java/com/metamx/druid/realtime/FirehoseFactory.java
+++ b/realtime/src/main/java/com/metamx/druid/realtime/FirehoseFactory.java
@@ -19,9 +19,6 @@
package com.metamx.druid.realtime;
-
-
-
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
diff --git a/realtime/src/main/java/com/metamx/druid/realtime/KafkaFirehoseFactory.java b/realtime/src/main/java/com/metamx/druid/realtime/KafkaFirehoseFactory.java
index 58d136d1b3d..bb60c3e829b 100644
--- a/realtime/src/main/java/com/metamx/druid/realtime/KafkaFirehoseFactory.java
+++ b/realtime/src/main/java/com/metamx/druid/realtime/KafkaFirehoseFactory.java
@@ -33,8 +33,6 @@ import kafka.consumer.KafkaMessageStream;
import kafka.javaapi.consumer.ConsumerConnector;
import kafka.message.Message;
-
-
import java.io.IOException;
import java.nio.CharBuffer;
import java.nio.charset.CoderResult;
@@ -117,7 +115,6 @@ public class KafkaFirehoseFactory implements FirehoseFactory
.onUnmappableCharacter(CodingErrorAction.REPLACE)
.decode(message.payload(), chars, true);
-
if (coderResult.isUnderflow()) {
chars.flip();
try {
diff --git a/realtime/src/main/java/com/metamx/druid/realtime/RealtimeNode.java b/realtime/src/main/java/com/metamx/druid/realtime/RealtimeNode.java
index fa29d33a6e8..e000aeca3da 100644
--- a/realtime/src/main/java/com/metamx/druid/realtime/RealtimeNode.java
+++ b/realtime/src/main/java/com/metamx/druid/realtime/RealtimeNode.java
@@ -53,7 +53,6 @@ import com.metamx.druid.utils.PropUtils;
import com.metamx.emitter.service.ServiceEmitter;
import com.metamx.metrics.Monitor;
-
import org.mortbay.jetty.servlet.Context;
import org.mortbay.jetty.servlet.ServletHolder;
import org.skife.config.ConfigurationObjectFactory;
@@ -359,4 +358,4 @@ public class RealtimeNode extends BaseServerNode
return new RealtimeNode(props, lifecycle, jsonMapper, smileMapper, configFactory);
}
}
-}
\ No newline at end of file
+}
diff --git a/realtime/src/main/java/com/metamx/druid/realtime/Schema.java b/realtime/src/main/java/com/metamx/druid/realtime/Schema.java
index ee3d63a14f8..944908a0868 100644
--- a/realtime/src/main/java/com/metamx/druid/realtime/Schema.java
+++ b/realtime/src/main/java/com/metamx/druid/realtime/Schema.java
@@ -24,12 +24,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Preconditions;
import com.metamx.druid.QueryGranularity;
import com.metamx.druid.aggregation.AggregatorFactory;
-import com.metamx.druid.index.v1.IndexGranularity;
import com.metamx.druid.shard.NoneShardSpec;
import com.metamx.druid.shard.ShardSpec;
-
-
import java.util.Arrays;
/**
diff --git a/realtime/src/main/java/com/metamx/druid/realtime/plumber/PlumberSchool.java b/realtime/src/main/java/com/metamx/druid/realtime/plumber/PlumberSchool.java
index 7963c58a0d8..da81dd619e9 100644
--- a/realtime/src/main/java/com/metamx/druid/realtime/plumber/PlumberSchool.java
+++ b/realtime/src/main/java/com/metamx/druid/realtime/plumber/PlumberSchool.java
@@ -19,7 +19,6 @@
package com.metamx.druid.realtime.plumber;
-
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.metamx.druid.realtime.FireDepartmentMetrics;
diff --git a/realtime/src/main/java/com/metamx/druid/realtime/plumber/RealtimePlumberSchool.java b/realtime/src/main/java/com/metamx/druid/realtime/plumber/RealtimePlumberSchool.java
index 60f50590896..7a3cf5e7265 100644
--- a/realtime/src/main/java/com/metamx/druid/realtime/plumber/RealtimePlumberSchool.java
+++ b/realtime/src/main/java/com/metamx/druid/realtime/plumber/RealtimePlumberSchool.java
@@ -444,9 +444,12 @@ public class RealtimePlumberSchool implements PlumberSchool
final Long sinkKey = entry.getKey();
if (interval.contains(sinkKey)) {
final Sink sink = entry.getValue();
- log.info("Segment matches sink[%s]", sink);
+ log.info("Segment[%s] matches sink[%s] on server[%s]", segment, sink, server);
- if (segment.getVersion().compareTo(sink.getSegment().getVersion()) >= 0) {
+ final String segmentVersion = segment.getVersion();
+ final String sinkVersion = sink.getSegment().getVersion();
+ if (segmentVersion.compareTo(sinkVersion) >= 0) {
+ log.info("Segment version[%s] >= sink version[%s]", segmentVersion, sinkVersion);
try {
segmentAnnouncer.unannounceSegment(sink.getSegment());
FileUtils.deleteDirectory(computePersistDir(schema, sink.getInterval()));
@@ -573,7 +576,6 @@ public class RealtimePlumberSchool implements PlumberSchool
.emit();
}
-
if (mergedFile != null) {
try {
if (mergedFile != null) {
diff --git a/realtime/src/main/java/com/metamx/druid/realtime/plumber/Sink.java b/realtime/src/main/java/com/metamx/druid/realtime/plumber/Sink.java
index d1985082622..039f981e2fe 100644
--- a/realtime/src/main/java/com/metamx/druid/realtime/plumber/Sink.java
+++ b/realtime/src/main/java/com/metamx/druid/realtime/plumber/Sink.java
@@ -30,7 +30,6 @@ import com.metamx.common.logger.Logger;
import com.metamx.druid.aggregation.AggregatorFactory;
import com.metamx.druid.client.DataSegment;
import com.metamx.druid.index.v1.IncrementalIndex;
-import com.metamx.druid.index.v1.IndexIO;
import com.metamx.druid.input.InputRow;
import com.metamx.druid.realtime.FireHydrant;
import com.metamx.druid.realtime.Schema;
@@ -55,7 +54,6 @@ public class Sink implements Iterable
private final String version;
private final CopyOnWriteArrayList hydrants = new CopyOnWriteArrayList();
-
public Sink(
Interval interval,
Schema schema,
diff --git a/server/pom.xml b/server/pom.xml
index b63cded16f2..e06b0413b7c 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -28,7 +28,7 @@
com.metamx
druid
- 0.3.34-SNAPSHOT
+ 0.3.35-SNAPSHOT
diff --git a/server/src/main/java/com/metamx/TsvToJson.java b/server/src/main/java/com/metamx/TsvToJson.java
index 65effd5077e..d0778bf1476 100644
--- a/server/src/main/java/com/metamx/TsvToJson.java
+++ b/server/src/main/java/com/metamx/TsvToJson.java
@@ -23,10 +23,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.Charsets;
import com.google.common.collect.Maps;
import com.metamx.common.IAE;
-import com.metamx.common.ISE;
import org.joda.time.DateTime;
-import org.joda.time.DateTimeZone;
import java.io.BufferedReader;
import java.io.BufferedWriter;
@@ -133,7 +131,6 @@ public class TsvToJson
this.fieldName = fieldName;
}
-
@Override
public String getFieldName()
{
@@ -158,7 +155,6 @@ public class TsvToJson
this.fieldName = fieldName;
}
-
@Override
public String getFieldName()
{
diff --git a/server/src/main/java/com/metamx/druid/SearchResultBuilder.java b/server/src/main/java/com/metamx/druid/SearchResultBuilder.java
index 7a18d18e718..21614d2e036 100644
--- a/server/src/main/java/com/metamx/druid/SearchResultBuilder.java
+++ b/server/src/main/java/com/metamx/druid/SearchResultBuilder.java
@@ -25,7 +25,6 @@ import com.metamx.druid.result.Result;
import com.metamx.druid.result.SearchResultValue;
import org.joda.time.DateTime;
-
/**
*/
public class SearchResultBuilder
diff --git a/server/src/main/java/com/metamx/druid/coordination/DataSegmentChangeRequest.java b/server/src/main/java/com/metamx/druid/coordination/DataSegmentChangeRequest.java
index a6d342d8419..dde31395af9 100644
--- a/server/src/main/java/com/metamx/druid/coordination/DataSegmentChangeRequest.java
+++ b/server/src/main/java/com/metamx/druid/coordination/DataSegmentChangeRequest.java
@@ -23,8 +23,6 @@ import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.metamx.druid.client.DataSegment;
-
-
/**
*/
@JsonTypeInfo(use= JsonTypeInfo.Id.NAME, property="action")
diff --git a/server/src/main/java/com/metamx/druid/coordination/SegmentChangeRequestDrop.java b/server/src/main/java/com/metamx/druid/coordination/SegmentChangeRequestDrop.java
index b231781e394..e9994eb5b25 100644
--- a/server/src/main/java/com/metamx/druid/coordination/SegmentChangeRequestDrop.java
+++ b/server/src/main/java/com/metamx/druid/coordination/SegmentChangeRequestDrop.java
@@ -24,9 +24,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonUnwrapped;
import com.metamx.druid.client.DataSegment;
-
-
-
/**
*/
public class SegmentChangeRequestDrop implements DataSegmentChangeRequest
diff --git a/server/src/main/java/com/metamx/druid/coordination/SegmentChangeRequestLoad.java b/server/src/main/java/com/metamx/druid/coordination/SegmentChangeRequestLoad.java
index ecf35513af9..ff6bd6adb09 100644
--- a/server/src/main/java/com/metamx/druid/coordination/SegmentChangeRequestLoad.java
+++ b/server/src/main/java/com/metamx/druid/coordination/SegmentChangeRequestLoad.java
@@ -24,9 +24,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonUnwrapped;
import com.metamx.druid.client.DataSegment;
-
-
-
/**
*/
public class SegmentChangeRequestLoad implements DataSegmentChangeRequest
diff --git a/server/src/main/java/com/metamx/druid/coordination/ServerManager.java b/server/src/main/java/com/metamx/druid/coordination/ServerManager.java
index d7655af964d..155d9e20793 100644
--- a/server/src/main/java/com/metamx/druid/coordination/ServerManager.java
+++ b/server/src/main/java/com/metamx/druid/coordination/ServerManager.java
@@ -275,7 +275,6 @@ public class ServerManager implements QuerySegmentWalker
final QueryToolChest> toolChest = factory.getToolchest();
-
final VersionedIntervalTimeline timeline = dataSources.get(query.getDataSource());
if (timeline == null) {
diff --git a/server/src/main/java/com/metamx/druid/coordination/ZkCoordinator.java b/server/src/main/java/com/metamx/druid/coordination/ZkCoordinator.java
index 11fa98093f7..751e1a70045 100644
--- a/server/src/main/java/com/metamx/druid/coordination/ZkCoordinator.java
+++ b/server/src/main/java/com/metamx/druid/coordination/ZkCoordinator.java
@@ -218,6 +218,13 @@ public class ZkCoordinator implements DataSegmentChangeHandler
DataSegment segment = jsonMapper.readValue(file, DataSegment.class);
if (serverManager.isSegmentCached(segment)) {
addSegment(segment);
+ } else {
+ log.warn("Unable to find cache file for %s. Deleting lookup entry", segment.getIdentifier());
+
+ File segmentInfoCacheFile = new File(config.getSegmentInfoCacheDirectory(), segment.getIdentifier());
+ if (!segmentInfoCacheFile.delete()) {
+ log.warn("Unable to delete segmentInfoCacheFile[%s]", segmentInfoCacheFile);
+ }
}
}
catch (Exception e) {
@@ -235,7 +242,6 @@ public class ZkCoordinator implements DataSegmentChangeHandler
}
}
-
@Override
public void addSegment(DataSegment segment)
{
diff --git a/server/src/main/java/com/metamx/druid/db/DatabaseRuleManager.java b/server/src/main/java/com/metamx/druid/db/DatabaseRuleManager.java
index da1dbcc51e1..708c61d9e24 100644
--- a/server/src/main/java/com/metamx/druid/db/DatabaseRuleManager.java
+++ b/server/src/main/java/com/metamx/druid/db/DatabaseRuleManager.java
@@ -32,7 +32,6 @@ import com.metamx.common.logger.Logger;
import com.metamx.druid.master.rules.PeriodLoadRule;
import com.metamx.druid.master.rules.Rule;
-
import org.joda.time.DateTime;
import org.joda.time.Duration;
import org.joda.time.Period;
diff --git a/server/src/main/java/com/metamx/druid/db/DatabaseSegmentManager.java b/server/src/main/java/com/metamx/druid/db/DatabaseSegmentManager.java
index 004f5ce926c..477978c6fec 100644
--- a/server/src/main/java/com/metamx/druid/db/DatabaseSegmentManager.java
+++ b/server/src/main/java/com/metamx/druid/db/DatabaseSegmentManager.java
@@ -252,7 +252,6 @@ public class DatabaseSegmentManager
return true;
}
-
public boolean removeDatasource(final String ds)
{
try {
diff --git a/server/src/main/java/com/metamx/druid/db/DatabaseSegmentManagerConfig.java b/server/src/main/java/com/metamx/druid/db/DatabaseSegmentManagerConfig.java
index 56f4ea03579..25e90cd16bd 100644
--- a/server/src/main/java/com/metamx/druid/db/DatabaseSegmentManagerConfig.java
+++ b/server/src/main/java/com/metamx/druid/db/DatabaseSegmentManagerConfig.java
@@ -19,7 +19,6 @@
package com.metamx.druid.db;
-
import org.joda.time.Duration;
import org.skife.config.Config;
import org.skife.config.Default;
diff --git a/server/src/main/java/com/metamx/druid/http/ComputeNode.java b/server/src/main/java/com/metamx/druid/http/ComputeNode.java
index 0b801cd6aad..c5c70464857 100644
--- a/server/src/main/java/com/metamx/druid/http/ComputeNode.java
+++ b/server/src/main/java/com/metamx/druid/http/ComputeNode.java
@@ -39,8 +39,8 @@ import com.metamx.druid.coordination.ZkCoordinatorConfig;
import com.metamx.druid.initialization.Initialization;
import com.metamx.druid.initialization.ServerInit;
import com.metamx.druid.jackson.DefaultObjectMapper;
-import com.metamx.druid.loading.SegmentLoaderConfig;
import com.metamx.druid.loading.SegmentLoader;
+import com.metamx.druid.loading.SegmentLoaderConfig;
import com.metamx.druid.metrics.ServerMonitor;
import com.metamx.druid.query.MetricsEmittingExecutorService;
import com.metamx.druid.query.QueryRunnerFactoryConglomerate;
@@ -48,13 +48,10 @@ import com.metamx.druid.utils.PropUtils;
import com.metamx.emitter.service.ServiceEmitter;
import com.metamx.emitter.service.ServiceMetricEvent;
import com.metamx.metrics.Monitor;
-
-
import org.jets3t.service.S3ServiceException;
import org.jets3t.service.impl.rest.httpclient.RestS3Service;
import org.jets3t.service.security.AWSCredentials;
import org.mortbay.jetty.servlet.Context;
-import org.mortbay.jetty.servlet.DefaultServlet;
import org.mortbay.jetty.servlet.ServletHolder;
import org.skife.config.ConfigurationObjectFactory;
diff --git a/server/src/main/java/com/metamx/druid/http/MasterMain.java b/server/src/main/java/com/metamx/druid/http/MasterMain.java
index 5750cc3560a..19b64b42247 100644
--- a/server/src/main/java/com/metamx/druid/http/MasterMain.java
+++ b/server/src/main/java/com/metamx/druid/http/MasterMain.java
@@ -73,6 +73,7 @@ import com.netflix.curator.x.discovery.ServiceDiscovery;
import com.netflix.curator.x.discovery.ServiceProvider;
import org.I0Itec.zkclient.ZkClient;
+import org.joda.time.Duration;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.servlet.Context;
import org.mortbay.jetty.servlet.DefaultServlet;
@@ -102,7 +103,14 @@ public class MasterMain
final Lifecycle lifecycle = new Lifecycle();
final HttpClient httpClient = HttpClientInit.createClient(
- HttpClientConfig.builder().withNumConnections(1).build(), lifecycle
+ HttpClientConfig.builder().withNumConnections(1).withReadTimeout(
+ new Duration(
+ PropUtils.getProperty(
+ props,
+ "druid.emitter.timeOut"
+ )
+ )
+ ).build(), lifecycle
);
final ServiceEmitter emitter = new ServiceEmitter(
diff --git a/server/src/main/java/com/metamx/druid/http/MasterServletModule.java b/server/src/main/java/com/metamx/druid/http/MasterServletModule.java
index 64d0c98afa3..e5f8f186d72 100644
--- a/server/src/main/java/com/metamx/druid/http/MasterServletModule.java
+++ b/server/src/main/java/com/metamx/druid/http/MasterServletModule.java
@@ -31,8 +31,6 @@ import com.metamx.druid.client.indexing.IndexingServiceClient;
import com.sun.jersey.guice.JerseyServletModule;
import com.sun.jersey.guice.spi.container.servlet.GuiceContainer;
-
-
import javax.inject.Singleton;
/**
diff --git a/server/src/main/java/com/metamx/druid/http/RedirectFilter.java b/server/src/main/java/com/metamx/druid/http/RedirectFilter.java
index 28bdb3f5417..f6f4c30e7cf 100644
--- a/server/src/main/java/com/metamx/druid/http/RedirectFilter.java
+++ b/server/src/main/java/com/metamx/druid/http/RedirectFilter.java
@@ -19,10 +19,7 @@
package com.metamx.druid.http;
-import com.google.common.base.Throwables;
-import com.google.common.io.ByteStreams;
import com.metamx.common.logger.Logger;
-import com.metamx.http.client.HttpClient;
import com.metamx.http.client.response.HttpResponseHandler;
import javax.servlet.Filter;
@@ -33,7 +30,6 @@ import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import javax.ws.rs.HttpMethod;
import java.io.IOException;
import java.net.URL;
diff --git a/server/src/main/java/com/metamx/druid/http/SegmentToDrop.java b/server/src/main/java/com/metamx/druid/http/SegmentToDrop.java
index a609329b0fd..44e9d4a0d33 100644
--- a/server/src/main/java/com/metamx/druid/http/SegmentToDrop.java
+++ b/server/src/main/java/com/metamx/druid/http/SegmentToDrop.java
@@ -19,7 +19,6 @@
package com.metamx.druid.http;
-
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/server/src/main/java/com/metamx/druid/http/SegmentToMove.java b/server/src/main/java/com/metamx/druid/http/SegmentToMove.java
index d54a78b8bba..85a6ab7227f 100644
--- a/server/src/main/java/com/metamx/druid/http/SegmentToMove.java
+++ b/server/src/main/java/com/metamx/druid/http/SegmentToMove.java
@@ -19,7 +19,6 @@
package com.metamx.druid.http;
-
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/server/src/main/java/com/metamx/druid/index/brita/DimensionPredicateFilter.java b/server/src/main/java/com/metamx/druid/index/brita/DimensionPredicateFilter.java
index 69c636ac6a1..d88dd06d3dc 100644
--- a/server/src/main/java/com/metamx/druid/index/brita/DimensionPredicateFilter.java
+++ b/server/src/main/java/com/metamx/druid/index/brita/DimensionPredicateFilter.java
@@ -22,6 +22,7 @@ package com.metamx.druid.index.brita;
import com.google.common.base.Function;
import com.google.common.base.Predicate;
import com.metamx.common.guava.FunctionalIterable;
+import com.metamx.druid.kv.Indexed;
import it.uniroma3.mat.extendedset.intset.ImmutableConciseSet;
import javax.annotation.Nullable;
@@ -45,8 +46,13 @@ class DimensionPredicateFilter implements Filter
@Override
public ImmutableConciseSet goConcise(final BitmapIndexSelector selector)
{
+ Indexed dimValues = selector.getDimensionValues(dimension);
+ if (dimValues == null || dimValues.size() == 0 || predicate == null) {
+ return new ImmutableConciseSet();
+ }
+
return ImmutableConciseSet.union(
- FunctionalIterable.create(selector.getDimensionValues(dimension))
+ FunctionalIterable.create(dimValues)
.filter(predicate)
.transform(
new Function()
diff --git a/server/src/main/java/com/metamx/druid/index/brita/JavaScriptFilter.java b/server/src/main/java/com/metamx/druid/index/brita/JavaScriptFilter.java
index f17de0b8d85..7c465d35a79 100644
--- a/server/src/main/java/com/metamx/druid/index/brita/JavaScriptFilter.java
+++ b/server/src/main/java/com/metamx/druid/index/brita/JavaScriptFilter.java
@@ -10,7 +10,6 @@ import org.mozilla.javascript.ScriptableObject;
import javax.annotation.Nullable;
-
public class JavaScriptFilter implements Filter
{
private final JavaScriptPredicate predicate;
diff --git a/server/src/main/java/com/metamx/druid/index/brita/RegexFilter.java b/server/src/main/java/com/metamx/druid/index/brita/RegexFilter.java
index a638ce576a7..8104253b510 100644
--- a/server/src/main/java/com/metamx/druid/index/brita/RegexFilter.java
+++ b/server/src/main/java/com/metamx/druid/index/brita/RegexFilter.java
@@ -24,7 +24,6 @@ import com.google.common.base.Predicate;
import javax.annotation.Nullable;
import java.util.regex.Pattern;
-
/**
*/
public class RegexFilter extends DimensionPredicateFilter
diff --git a/server/src/main/java/com/metamx/druid/index/brita/SearchQueryFilter.java b/server/src/main/java/com/metamx/druid/index/brita/SearchQueryFilter.java
index 2bf090850b6..a94a518dc61 100644
--- a/server/src/main/java/com/metamx/druid/index/brita/SearchQueryFilter.java
+++ b/server/src/main/java/com/metamx/druid/index/brita/SearchQueryFilter.java
@@ -24,8 +24,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Predicate;
import com.metamx.druid.query.search.SearchQuerySpec;
-
-
import javax.annotation.Nullable;
/**
diff --git a/server/src/main/java/com/metamx/druid/index/brita/SelectorFilter.java b/server/src/main/java/com/metamx/druid/index/brita/SelectorFilter.java
index 5f711c63817..a43c7fa5afc 100644
--- a/server/src/main/java/com/metamx/druid/index/brita/SelectorFilter.java
+++ b/server/src/main/java/com/metamx/druid/index/brita/SelectorFilter.java
@@ -21,7 +21,6 @@ package com.metamx.druid.index.brita;
import it.uniroma3.mat.extendedset.intset.ImmutableConciseSet;
-
/**
*/
public class SelectorFilter implements Filter
diff --git a/server/src/main/java/com/metamx/druid/initialization/ServerInit.java b/server/src/main/java/com/metamx/druid/initialization/ServerInit.java
index cca4f910b77..a9cc0764fee 100644
--- a/server/src/main/java/com/metamx/druid/initialization/ServerInit.java
+++ b/server/src/main/java/com/metamx/druid/initialization/ServerInit.java
@@ -47,6 +47,7 @@ import com.metamx.druid.loading.SegmentLoader;
import com.metamx.druid.query.QueryRunnerFactory;
import com.metamx.druid.query.group.GroupByQuery;
import com.metamx.druid.query.group.GroupByQueryRunnerFactory;
+import com.metamx.druid.query.group.GroupByQueryRunnerFactoryConfig;
import com.metamx.druid.query.metadata.SegmentMetadataQuery;
import com.metamx.druid.query.metadata.SegmentMetadataQueryRunnerFactory;
import com.metamx.druid.query.search.SearchQuery;
@@ -147,7 +148,8 @@ public class ServerInit
new GroupByQueryEngine(
configFactory.build(GroupByQueryEngineConfig.class),
computationBufferPool
- )
+ ),
+ configFactory.build(GroupByQueryRunnerFactoryConfig.class)
)
);
queryRunners.put(SearchQuery.class, new SearchQueryRunnerFactory());
diff --git a/server/src/main/java/com/metamx/druid/loading/S3DataSegmentKiller.java b/server/src/main/java/com/metamx/druid/loading/S3DataSegmentKiller.java
index 47c39c1857e..63b815a7e85 100644
--- a/server/src/main/java/com/metamx/druid/loading/S3DataSegmentKiller.java
+++ b/server/src/main/java/com/metamx/druid/loading/S3DataSegmentKiller.java
@@ -44,7 +44,6 @@ public class S3DataSegmentKiller implements DataSegmentKiller
this.s3Client = s3Client;
}
-
@Override
public void kill(DataSegment segment) throws SegmentLoadingException
{
diff --git a/server/src/main/java/com/metamx/druid/loading/SingleSegmentLoader.java b/server/src/main/java/com/metamx/druid/loading/SingleSegmentLoader.java
index bc7dbc236f2..61e9986f484 100644
--- a/server/src/main/java/com/metamx/druid/loading/SingleSegmentLoader.java
+++ b/server/src/main/java/com/metamx/druid/loading/SingleSegmentLoader.java
@@ -20,7 +20,6 @@
package com.metamx.druid.loading;
import com.google.common.base.Joiner;
-import com.google.common.base.Throwables;
import com.google.inject.Inject;
import com.metamx.common.StreamUtils;
import com.metamx.common.logger.Logger;
diff --git a/server/src/main/java/com/metamx/druid/master/BalancerCostAnalyzer.java b/server/src/main/java/com/metamx/druid/master/BalancerCostAnalyzer.java
index 0d49c3a3bee..9a22daf2c13 100644
--- a/server/src/main/java/com/metamx/druid/master/BalancerCostAnalyzer.java
+++ b/server/src/main/java/com/metamx/druid/master/BalancerCostAnalyzer.java
@@ -19,7 +19,6 @@
package com.metamx.druid.master;
-import com.google.common.collect.Lists;
import com.google.common.collect.MinMaxPriorityQueue;
import com.metamx.common.Pair;
import com.metamx.common.logger.Logger;
@@ -31,7 +30,6 @@ import java.util.Comparator;
import java.util.List;
import java.util.Random;
-
/**
* The BalancerCostAnalyzer will compute the total initial cost of the cluster, with costs defined in
* computeJointSegmentCosts. It will then propose to move (pseudo-)randomly chosen segments from their
@@ -269,5 +267,3 @@ public class BalancerCostAnalyzer
}
}
-
-
diff --git a/server/src/main/java/com/metamx/druid/master/MergerWhitelist.java b/server/src/main/java/com/metamx/druid/master/MergerWhitelist.java
index bd55a0cf057..8bfa7293b00 100644
--- a/server/src/main/java/com/metamx/druid/master/MergerWhitelist.java
+++ b/server/src/main/java/com/metamx/druid/master/MergerWhitelist.java
@@ -23,7 +23,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.google.common.collect.Sets;
-import java.util.List;
import java.util.Set;
/**
diff --git a/server/src/main/java/com/metamx/druid/master/rules/IntervalDropRule.java b/server/src/main/java/com/metamx/druid/master/rules/IntervalDropRule.java
index 1e9bef477b5..1363c88b9da 100644
--- a/server/src/main/java/com/metamx/druid/master/rules/IntervalDropRule.java
+++ b/server/src/main/java/com/metamx/druid/master/rules/IntervalDropRule.java
@@ -23,7 +23,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.metamx.druid.client.DataSegment;
-
import org.joda.time.DateTime;
import org.joda.time.Interval;
diff --git a/server/src/main/java/com/metamx/druid/master/rules/IntervalLoadRule.java b/server/src/main/java/com/metamx/druid/master/rules/IntervalLoadRule.java
index bb50ef352fa..0cfe603e2b1 100644
--- a/server/src/main/java/com/metamx/druid/master/rules/IntervalLoadRule.java
+++ b/server/src/main/java/com/metamx/druid/master/rules/IntervalLoadRule.java
@@ -24,7 +24,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.metamx.common.logger.Logger;
import com.metamx.druid.client.DataSegment;
-
import org.joda.time.DateTime;
import org.joda.time.Interval;
diff --git a/server/src/main/java/com/metamx/druid/master/rules/LoadRule.java b/server/src/main/java/com/metamx/druid/master/rules/LoadRule.java
index eb06f806b7b..affc0b93bdd 100644
--- a/server/src/main/java/com/metamx/druid/master/rules/LoadRule.java
+++ b/server/src/main/java/com/metamx/druid/master/rules/LoadRule.java
@@ -21,7 +21,6 @@ package com.metamx.druid.master.rules;
import com.google.common.collect.Lists;
import com.google.common.collect.MinMaxPriorityQueue;
-import com.metamx.common.Pair;
import com.metamx.druid.client.DataSegment;
import com.metamx.druid.master.BalancerCostAnalyzer;
import com.metamx.druid.master.DruidMaster;
diff --git a/server/src/main/java/com/metamx/druid/master/rules/PeriodDropRule.java b/server/src/main/java/com/metamx/druid/master/rules/PeriodDropRule.java
index 22f1794189d..5fa6affcf9e 100644
--- a/server/src/main/java/com/metamx/druid/master/rules/PeriodDropRule.java
+++ b/server/src/main/java/com/metamx/druid/master/rules/PeriodDropRule.java
@@ -23,7 +23,6 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.metamx.druid.client.DataSegment;
-
import org.joda.time.DateTime;
import org.joda.time.Interval;
import org.joda.time.Period;
diff --git a/server/src/main/java/com/metamx/druid/master/rules/PeriodLoadRule.java b/server/src/main/java/com/metamx/druid/master/rules/PeriodLoadRule.java
index a332c302dd7..632b6acbc67 100644
--- a/server/src/main/java/com/metamx/druid/master/rules/PeriodLoadRule.java
+++ b/server/src/main/java/com/metamx/druid/master/rules/PeriodLoadRule.java
@@ -24,7 +24,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.metamx.common.logger.Logger;
import com.metamx.druid.client.DataSegment;
-
import org.joda.time.DateTime;
import org.joda.time.Interval;
import org.joda.time.Period;
diff --git a/server/src/main/java/com/metamx/druid/master/rules/Rule.java b/server/src/main/java/com/metamx/druid/master/rules/Rule.java
index 3d2ea2f59c1..efc6a91c5ab 100644
--- a/server/src/main/java/com/metamx/druid/master/rules/Rule.java
+++ b/server/src/main/java/com/metamx/druid/master/rules/Rule.java
@@ -26,7 +26,6 @@ import com.metamx.druid.master.DruidMaster;
import com.metamx.druid.master.DruidMasterRuntimeParams;
import com.metamx.druid.master.MasterStats;
-
import org.joda.time.DateTime;
/**
diff --git a/server/src/main/java/com/metamx/druid/query/QueryRunnerFactory.java b/server/src/main/java/com/metamx/druid/query/QueryRunnerFactory.java
index 083ebae543e..8dade405e49 100644
--- a/server/src/main/java/com/metamx/druid/query/QueryRunnerFactory.java
+++ b/server/src/main/java/com/metamx/druid/query/QueryRunnerFactory.java
@@ -20,7 +20,6 @@
package com.metamx.druid.query;
import com.metamx.druid.Query;
-import com.metamx.druid.StorageAdapter;
import com.metamx.druid.index.Segment;
import java.util.concurrent.ExecutorService;
diff --git a/server/src/main/java/com/metamx/druid/query/group/GroupByQueryEngine.java b/server/src/main/java/com/metamx/druid/query/group/GroupByQueryEngine.java
index a944bfef894..3c123bd64b3 100644
--- a/server/src/main/java/com/metamx/druid/query/group/GroupByQueryEngine.java
+++ b/server/src/main/java/com/metamx/druid/query/group/GroupByQueryEngine.java
@@ -49,7 +49,6 @@ import org.joda.time.DateTime;
import org.joda.time.Interval;
import javax.annotation.Nullable;
-import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.Iterator;
import java.util.List;
diff --git a/server/src/main/java/com/metamx/druid/query/group/GroupByQueryRunnerFactory.java b/server/src/main/java/com/metamx/druid/query/group/GroupByQueryRunnerFactory.java
index c1fcc22786a..0ecec11b76c 100644
--- a/server/src/main/java/com/metamx/druid/query/group/GroupByQueryRunnerFactory.java
+++ b/server/src/main/java/com/metamx/druid/query/group/GroupByQueryRunnerFactory.java
@@ -21,7 +21,8 @@ package com.metamx.druid.query.group;
import com.google.common.base.Function;
import com.google.common.base.Throwables;
-import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Ordering;
+import com.google.common.primitives.Longs;
import com.metamx.common.ISE;
import com.metamx.common.guava.ExecutorExecutingSequence;
import com.metamx.common.guava.Sequence;
@@ -30,6 +31,7 @@ import com.metamx.druid.Query;
import com.metamx.druid.StorageAdapter;
import com.metamx.druid.index.Segment;
import com.metamx.druid.input.Row;
+import com.metamx.druid.query.ChainedExecutionQueryRunner;
import com.metamx.druid.query.ConcatQueryRunner;
import com.metamx.druid.query.QueryRunner;
import com.metamx.druid.query.QueryRunnerFactory;
@@ -44,21 +46,18 @@ import java.util.concurrent.Future;
*/
public class GroupByQueryRunnerFactory implements QueryRunnerFactory
{
- private static final GroupByQueryQueryToolChest toolChest = new GroupByQueryQueryToolChest(){
- @Override
- public QueryRunner mergeResults(QueryRunner runner)
- {
- return new ConcatQueryRunner(Sequences.simple(ImmutableList.of(runner)));
- }
- };
+ private static final GroupByQueryQueryToolChest toolChest = new GroupByQueryQueryToolChest();
private final GroupByQueryEngine engine;
+ private final GroupByQueryRunnerFactoryConfig config;
public GroupByQueryRunnerFactory(
- GroupByQueryEngine engine
+ GroupByQueryEngine engine,
+ GroupByQueryRunnerFactoryConfig config
)
{
this.engine = engine;
+ this.config = config;
}
@Override
@@ -70,48 +69,53 @@ public class GroupByQueryRunnerFactory implements QueryRunnerFactory mergeRunners(final ExecutorService queryExecutor, Iterable> queryRunners)
{
- return new ConcatQueryRunner(
- Sequences.map(
- Sequences.simple(queryRunners),
- new Function, QueryRunner>()
- {
- @Override
- public QueryRunner apply(final QueryRunner input)
+ if (config.isSingleThreaded()) {
+ return new ConcatQueryRunner(
+ Sequences.map(
+ Sequences.simple(queryRunners),
+ new Function, QueryRunner>()
{
- return new QueryRunner()
+ @Override
+ public QueryRunner apply(final QueryRunner input)
{
- @Override
- public Sequence run(final Query query)
+ return new QueryRunner()
{
+ @Override
+ public Sequence run(final Query query)
+ {
- Future> future = queryExecutor.submit(
- new Callable>()
- {
- @Override
- public Sequence call() throws Exception
+ Future> future = queryExecutor.submit(
+ new Callable>()
{
- return new ExecutorExecutingSequence(
- input.run(query),
- queryExecutor
- );
+ @Override
+ public Sequence call() throws Exception
+ {
+ return new ExecutorExecutingSequence(
+ input.run(query),
+ queryExecutor
+ );
+ }
}
- }
- );
- try {
- return future.get();
+ );
+ try {
+ return future.get();
+ }
+ catch (InterruptedException e) {
+ throw Throwables.propagate(e);
+ }
+ catch (ExecutionException e) {
+ throw Throwables.propagate(e);
+ }
}
- catch (InterruptedException e) {
- throw Throwables.propagate(e);
- }
- catch (ExecutionException e) {
- throw Throwables.propagate(e);
- }
- }
- };
+ };
+ }
}
- }
- )
- );
+ )
+ );
+ }
+ else {
+ return new ChainedExecutionQueryRunner(queryExecutor, new RowOrdering(), queryRunners);
+ }
}
@Override
@@ -141,4 +145,13 @@ public class GroupByQueryRunnerFactory implements QueryRunnerFactory
+ {
+ @Override
+ public int compare(Row left, Row right)
+ {
+ return Longs.compare(left.getTimestampFromEpoch(), right.getTimestampFromEpoch());
+ }
+ }
}
diff --git a/server/src/main/java/com/metamx/druid/query/group/GroupByQueryRunnerFactoryConfig.java b/server/src/main/java/com/metamx/druid/query/group/GroupByQueryRunnerFactoryConfig.java
new file mode 100644
index 00000000000..52e3227c1ff
--- /dev/null
+++ b/server/src/main/java/com/metamx/druid/query/group/GroupByQueryRunnerFactoryConfig.java
@@ -0,0 +1,14 @@
+package com.metamx.druid.query.group;
+
+import org.skife.config.Config;
+
+/**
+ */
+public abstract class GroupByQueryRunnerFactoryConfig
+{
+ @Config("druid.query.groupBy.singleThreaded")
+ public boolean isSingleThreaded()
+ {
+ return false;
+ }
+}
diff --git a/server/src/main/java/com/metamx/druid/query/metadata/SegmentAnalyzer.java b/server/src/main/java/com/metamx/druid/query/metadata/SegmentAnalyzer.java
index a219dbae9b4..24dc1f2b43b 100644
--- a/server/src/main/java/com/metamx/druid/query/metadata/SegmentAnalyzer.java
+++ b/server/src/main/java/com/metamx/druid/query/metadata/SegmentAnalyzer.java
@@ -23,7 +23,6 @@ import com.google.common.base.Charsets;
import com.google.common.base.Function;
import com.google.common.base.Preconditions;
import com.google.common.collect.Maps;
-import com.google.common.primitives.Floats;
import com.google.common.primitives.Longs;
import com.metamx.common.logger.Logger;
import com.metamx.druid.index.QueryableIndex;
@@ -37,7 +36,6 @@ import com.metamx.druid.index.v1.serde.ComplexMetrics;
import java.util.Map;
-
public class SegmentAnalyzer
{
private static final Logger log = new Logger(SegmentAnalyzer.class);
@@ -157,4 +155,4 @@ public class SegmentAnalyzer
return new ColumnAnalysis(capabilities.getType(), size, null);
}
-}
\ No newline at end of file
+}
diff --git a/server/src/test/java/com/metamx/druid/coordination/SegmentChangeRequestDropTest.java b/server/src/test/java/com/metamx/druid/coordination/SegmentChangeRequestDropTest.java
index 38a63d57f0c..92026a533e6 100644
--- a/server/src/test/java/com/metamx/druid/coordination/SegmentChangeRequestDropTest.java
+++ b/server/src/test/java/com/metamx/druid/coordination/SegmentChangeRequestDropTest.java
@@ -27,7 +27,6 @@ import com.metamx.druid.index.v1.IndexIO;
import com.metamx.druid.jackson.DefaultObjectMapper;
import com.metamx.druid.shard.NoneShardSpec;
-
import org.joda.time.Interval;
import org.junit.Assert;
import org.junit.Test;
diff --git a/server/src/test/java/com/metamx/druid/coordination/SegmentChangeRequestLoadTest.java b/server/src/test/java/com/metamx/druid/coordination/SegmentChangeRequestLoadTest.java
index 41ed201242c..62688974180 100644
--- a/server/src/test/java/com/metamx/druid/coordination/SegmentChangeRequestLoadTest.java
+++ b/server/src/test/java/com/metamx/druid/coordination/SegmentChangeRequestLoadTest.java
@@ -27,7 +27,6 @@ import com.metamx.druid.index.v1.IndexIO;
import com.metamx.druid.jackson.DefaultObjectMapper;
import com.metamx.druid.shard.NoneShardSpec;
-
import org.joda.time.Interval;
import org.junit.Assert;
import org.junit.Test;
diff --git a/server/src/test/java/com/metamx/druid/coordination/ServerManagerTest.java b/server/src/test/java/com/metamx/druid/coordination/ServerManagerTest.java
index be06a6b84c2..c557b839b03 100644
--- a/server/src/test/java/com/metamx/druid/coordination/ServerManagerTest.java
+++ b/server/src/test/java/com/metamx/druid/coordination/ServerManagerTest.java
@@ -206,7 +206,6 @@ public class ServerManagerTest
)
);
-
assertQueryable(
QueryGranularity.HOUR,
"test", new Interval("2011-04-04/2011-04-04T03"),
diff --git a/server/src/test/java/com/metamx/druid/index/v1/IndexMergerTest.java b/server/src/test/java/com/metamx/druid/index/v1/IndexMergerTest.java
index 9cfe9d22379..5e74a37990d 100644
--- a/server/src/test/java/com/metamx/druid/index/v1/IndexMergerTest.java
+++ b/server/src/test/java/com/metamx/druid/index/v1/IndexMergerTest.java
@@ -81,7 +81,6 @@ public class IndexMergerTest
)
);
-
final File tempDir1 = Files.createTempDir();
final File tempDir2 = Files.createTempDir();
final File mergedDir = Files.createTempDir();
diff --git a/server/src/test/java/com/metamx/druid/index/v1/processing/IntersectingOffsetTest.java b/server/src/test/java/com/metamx/druid/index/v1/processing/IntersectingOffsetTest.java
index fb6a7826d1d..3d5d5100b84 100644
--- a/server/src/test/java/com/metamx/druid/index/v1/processing/IntersectingOffsetTest.java
+++ b/server/src/test/java/com/metamx/druid/index/v1/processing/IntersectingOffsetTest.java
@@ -80,7 +80,6 @@ public class IntersectingOffsetTest
);
}
-
private static void assertExpected(int[] expectedValues, IntersectingOffset offset)
{
final LinkedList offsets = Lists.newLinkedList();
diff --git a/server/src/test/java/com/metamx/druid/index/v1/processing/UnioningOffsetTest.java b/server/src/test/java/com/metamx/druid/index/v1/processing/UnioningOffsetTest.java
index a49ab954341..f470e5ae37a 100644
--- a/server/src/test/java/com/metamx/druid/index/v1/processing/UnioningOffsetTest.java
+++ b/server/src/test/java/com/metamx/druid/index/v1/processing/UnioningOffsetTest.java
@@ -96,7 +96,6 @@ public class UnioningOffsetTest
);
}
-
private static void assertExpected(int[] expectedValues, UnioningOffset offset)
{
final ArrayList offsets = Lists.newArrayList();
diff --git a/server/src/test/java/com/metamx/druid/master/DruidMasterRuleRunnerTest.java b/server/src/test/java/com/metamx/druid/master/DruidMasterRuleRunnerTest.java
index 60429dbcae1..70e6258ec88 100644
--- a/server/src/test/java/com/metamx/druid/master/DruidMasterRuleRunnerTest.java
+++ b/server/src/test/java/com/metamx/druid/master/DruidMasterRuleRunnerTest.java
@@ -419,7 +419,6 @@ public class DruidMasterRuleRunnerTest
.withBalancerReferenceTimestamp(new DateTime("2013-01-01"))
.build();
-
ruleRunner.run(params);
EasyMock.verify(emitter);
diff --git a/server/src/test/java/com/metamx/druid/master/DruidMasterTest.java b/server/src/test/java/com/metamx/druid/master/DruidMasterTest.java
index 584ae31de47..254d16cb1ed 100644
--- a/server/src/test/java/com/metamx/druid/master/DruidMasterTest.java
+++ b/server/src/test/java/com/metamx/druid/master/DruidMasterTest.java
@@ -130,7 +130,6 @@ public class DruidMasterTest
return 0;
}
-
@Override
public int getReplicantLifetime()
{
diff --git a/server/src/test/java/com/metamx/druid/query/QueryRunnerTestHelper.java b/server/src/test/java/com/metamx/druid/query/QueryRunnerTestHelper.java
index 69e74181faa..18c647c1c70 100644
--- a/server/src/test/java/com/metamx/druid/query/QueryRunnerTestHelper.java
+++ b/server/src/test/java/com/metamx/druid/query/QueryRunnerTestHelper.java
@@ -68,7 +68,6 @@ public class QueryRunnerTestHelper
);
public static final List commonAggregators = Arrays.asList(rowsCount, indexDoubleSum);
-
public static final String[] expectedFullOnIndexValues = new String[]{
"4500.0", "6077.949111938477", "4922.488838195801", "5726.140853881836", "4698.468170166016",
"4651.030891418457", "4398.145851135254", "4596.068244934082", "4434.630561828613", "0.0",
diff --git a/server/src/test/java/com/metamx/druid/query/group/GroupByQueryRunnerTest.java b/server/src/test/java/com/metamx/druid/query/group/GroupByQueryRunnerTest.java
index 5dd95c9c4e0..f5d883156b1 100644
--- a/server/src/test/java/com/metamx/druid/query/group/GroupByQueryRunnerTest.java
+++ b/server/src/test/java/com/metamx/druid/query/group/GroupByQueryRunnerTest.java
@@ -87,10 +87,10 @@ public class GroupByQueryRunnerTest
}
}
)
- )
+ ),
+ new GroupByQueryRunnerFactoryConfig(){}
);
-
return Lists.newArrayList(
Iterables.transform(
QueryRunnerTestHelper.makeQueryRunners(factory), new Function