diff --git a/aws-common/src/main/java/io/druid/common/aws/FileSessionCredentialsProvider.java b/aws-common/src/main/java/io/druid/common/aws/FileSessionCredentialsProvider.java index 405569e5a64..0f8b6fa0e9f 100644 --- a/aws-common/src/main/java/io/druid/common/aws/FileSessionCredentialsProvider.java +++ b/aws-common/src/main/java/io/druid/common/aws/FileSessionCredentialsProvider.java @@ -20,7 +20,6 @@ package io.druid.common.aws; import com.amazonaws.auth.AWSCredentials; import com.amazonaws.auth.AWSCredentialsProvider; import com.amazonaws.auth.AWSSessionCredentials; -import com.google.common.util.concurrent.ThreadFactoryBuilder; import io.druid.concurrent.Execs; import java.io.File; @@ -28,7 +27,6 @@ import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Properties; -import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; diff --git a/benchmarks/src/main/java/io/druid/benchmark/CompressedVSizeIndexedBenchmark.java b/benchmarks/src/main/java/io/druid/benchmark/CompressedVSizeIndexedBenchmark.java index 1fc9f460f3b..bd514369a23 100644 --- a/benchmarks/src/main/java/io/druid/benchmark/CompressedVSizeIndexedBenchmark.java +++ b/benchmarks/src/main/java/io/druid/benchmark/CompressedVSizeIndexedBenchmark.java @@ -38,10 +38,6 @@ import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.Setup; import org.openjdk.jmh.annotations.State; import org.openjdk.jmh.infra.Blackhole; -import org.openjdk.jmh.runner.Runner; -import org.openjdk.jmh.runner.RunnerException; -import org.openjdk.jmh.runner.options.Options; -import org.openjdk.jmh.runner.options.OptionsBuilder; import java.io.IOException; import java.nio.ByteBuffer; diff --git a/benchmarks/src/main/java/io/druid/benchmark/MergeSequenceBenchmark.java b/benchmarks/src/main/java/io/druid/benchmark/MergeSequenceBenchmark.java index 71b186dd632..f103bbd8fbc 100644 --- a/benchmarks/src/main/java/io/druid/benchmark/MergeSequenceBenchmark.java +++ b/benchmarks/src/main/java/io/druid/benchmark/MergeSequenceBenchmark.java @@ -7,11 +7,6 @@ import com.metamx.common.guava.Accumulator; import com.metamx.common.guava.MergeSequence; import com.metamx.common.guava.Sequence; import com.metamx.common.guava.Sequences; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Random; -import java.util.concurrent.TimeUnit; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Mode; @@ -22,6 +17,12 @@ import org.openjdk.jmh.annotations.Setup; import org.openjdk.jmh.annotations.State; import org.openjdk.jmh.infra.Blackhole; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Random; +import java.util.concurrent.TimeUnit; + @State(Scope.Benchmark) public class MergeSequenceBenchmark { diff --git a/benchmarks/src/main/java/io/druid/benchmark/StupidPoolConcurrencyBenchmark.java b/benchmarks/src/main/java/io/druid/benchmark/StupidPoolConcurrencyBenchmark.java index 517a8c09898..a71933189a8 100644 --- a/benchmarks/src/main/java/io/druid/benchmark/StupidPoolConcurrencyBenchmark.java +++ b/benchmarks/src/main/java/io/druid/benchmark/StupidPoolConcurrencyBenchmark.java @@ -20,7 +20,6 @@ package io.druid.benchmark; import com.google.common.base.Supplier; -import com.google.common.io.Closer; import com.metamx.common.logger.Logger; import io.druid.collections.ResourceHolder; import io.druid.collections.StupidPool; @@ -28,13 +27,11 @@ import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Level; import org.openjdk.jmh.annotations.Mode; -import org.openjdk.jmh.annotations.OperationsPerInvocation; import org.openjdk.jmh.annotations.OutputTimeUnit; import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.Setup; import org.openjdk.jmh.annotations.State; import org.openjdk.jmh.annotations.TearDown; -import org.openjdk.jmh.annotations.Threads; import org.openjdk.jmh.infra.Blackhole; import java.io.IOException; diff --git a/common/src/main/java/io/druid/timeline/VersionedIntervalTimeline.java b/common/src/main/java/io/druid/timeline/VersionedIntervalTimeline.java index eab26dcee18..daa38a84372 100644 --- a/common/src/main/java/io/druid/timeline/VersionedIntervalTimeline.java +++ b/common/src/main/java/io/druid/timeline/VersionedIntervalTimeline.java @@ -25,7 +25,6 @@ import com.metamx.common.logger.Logger; import io.druid.timeline.partition.ImmutablePartitionHolder; import io.druid.timeline.partition.PartitionChunk; import io.druid.timeline.partition.PartitionHolder; -import org.joda.time.DateTime; import org.joda.time.Interval; import java.util.ArrayList; diff --git a/common/src/test/java/io/druid/collections/CombiningIterableTest.java b/common/src/test/java/io/druid/collections/CombiningIterableTest.java index 08b52a010c8..9021b6e3837 100644 --- a/common/src/test/java/io/druid/collections/CombiningIterableTest.java +++ b/common/src/test/java/io/druid/collections/CombiningIterableTest.java @@ -19,16 +19,18 @@ package io.druid.collections; +import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.collect.Ordering; -import com.google.common.collect.Iterables; - import com.google.common.collect.Sets; import org.junit.Assert; import org.junit.Test; - -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.Set; public class CombiningIterableTest { diff --git a/common/src/test/java/io/druid/collections/CombiningIteratorTest.java b/common/src/test/java/io/druid/collections/CombiningIteratorTest.java index 50fe4ace2fb..9b3e9d6a511 100644 --- a/common/src/test/java/io/druid/collections/CombiningIteratorTest.java +++ b/common/src/test/java/io/druid/collections/CombiningIteratorTest.java @@ -20,13 +20,11 @@ package io.druid.collections; import com.google.common.collect.PeekingIterator; - import com.metamx.common.guava.nary.BinaryFn; - +import org.easymock.EasyMock; import org.junit.After; import org.junit.Assert; import org.junit.Before; -import org.easymock.EasyMock; import org.junit.Test; import java.util.Comparator; diff --git a/common/src/test/java/io/druid/collections/CountingMapTest.java b/common/src/test/java/io/druid/collections/CountingMapTest.java index 21ff1750ad6..605135a466b 100644 --- a/common/src/test/java/io/druid/collections/CountingMapTest.java +++ b/common/src/test/java/io/druid/collections/CountingMapTest.java @@ -20,7 +20,6 @@ package io.druid.collections; import com.google.common.collect.ImmutableMap; - import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/common/src/test/java/io/druid/collections/IntListTest.java b/common/src/test/java/io/druid/collections/IntListTest.java index a0c44024f8d..babc061b794 100644 --- a/common/src/test/java/io/druid/collections/IntListTest.java +++ b/common/src/test/java/io/druid/collections/IntListTest.java @@ -17,11 +17,11 @@ package io.druid.collections; -import java.nio.IntBuffer; - import org.junit.Assert; import org.junit.Test; +import java.nio.IntBuffer; + /** */ public class IntListTest diff --git a/common/src/test/java/io/druid/collections/StupidPoolTest.java b/common/src/test/java/io/druid/collections/StupidPoolTest.java index 931c36d9e81..527edb1e414 100644 --- a/common/src/test/java/io/druid/collections/StupidPoolTest.java +++ b/common/src/test/java/io/druid/collections/StupidPoolTest.java @@ -21,10 +21,8 @@ package io.druid.collections; import com.google.common.base.Supplier; import com.metamx.common.ISE; - import org.easymock.EasyMock; import org.hamcrest.core.IsInstanceOf; -import org.hamcrest.core.IsNull; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/common/src/test/java/io/druid/collections/StupidResourceHolderTest.java b/common/src/test/java/io/druid/collections/StupidResourceHolderTest.java index 788682265ee..240e09ff78e 100644 --- a/common/src/test/java/io/druid/collections/StupidResourceHolderTest.java +++ b/common/src/test/java/io/druid/collections/StupidResourceHolderTest.java @@ -19,9 +19,7 @@ package io.druid.collections; -import org.junit.After; import org.junit.Assert; -import org.junit.Before; import org.junit.Test; import java.io.IOException; diff --git a/common/src/test/java/io/druid/common/utils/JodaUtilsTest.java b/common/src/test/java/io/druid/common/utils/JodaUtilsTest.java index 451114ac2ff..ac05eddc919 100644 --- a/common/src/test/java/io/druid/common/utils/JodaUtilsTest.java +++ b/common/src/test/java/io/druid/common/utils/JodaUtilsTest.java @@ -17,7 +17,6 @@ package io.druid.common.utils; -import org.joda.time.DateTimeConstants; import org.joda.time.Duration; import org.joda.time.Interval; import org.joda.time.Period; @@ -26,7 +25,6 @@ import org.junit.Test; import java.util.Arrays; import java.util.Collections; -import java.util.Date; import java.util.List; /** diff --git a/common/src/test/java/io/druid/common/utils/PropUtilsTest.java b/common/src/test/java/io/druid/common/utils/PropUtilsTest.java index 47e660f3353..0d58fc83a8d 100644 --- a/common/src/test/java/io/druid/common/utils/PropUtilsTest.java +++ b/common/src/test/java/io/druid/common/utils/PropUtilsTest.java @@ -19,14 +19,10 @@ package io.druid.common.utils; +import com.metamx.common.ISE; import org.junit.Assert; import org.junit.Test; -import com.metamx.common.ISE; - -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; import java.util.Properties; public class PropUtilsTest diff --git a/common/src/test/java/io/druid/common/utils/SerializerUtilsTest.java b/common/src/test/java/io/druid/common/utils/SerializerUtilsTest.java index d07157920cf..d3bcec4cf1d 100644 --- a/common/src/test/java/io/druid/common/utils/SerializerUtilsTest.java +++ b/common/src/test/java/io/druid/common/utils/SerializerUtilsTest.java @@ -19,6 +19,7 @@ package io.druid.common.utils; +import io.druid.collections.IntList; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -33,8 +34,6 @@ import java.nio.channels.Channels; import java.nio.channels.WritableByteChannel; import java.nio.charset.Charset; -import io.druid.collections.IntList; - public class SerializerUtilsTest { private SerializerUtils serializerUtils; diff --git a/common/src/test/java/io/druid/common/utils/SocketUtilTest.java b/common/src/test/java/io/druid/common/utils/SocketUtilTest.java index 39eca32d405..9002a1b086d 100644 --- a/common/src/test/java/io/druid/common/utils/SocketUtilTest.java +++ b/common/src/test/java/io/druid/common/utils/SocketUtilTest.java @@ -19,12 +19,11 @@ package io.druid.common.utils; +import com.metamx.common.ISE; +import org.hamcrest.number.OrderingComparison; import org.junit.Assert; import org.junit.Test; -import org.hamcrest.number.OrderingComparison; -import com.metamx.common.ISE; - public class SocketUtilTest { private final int MAX_PORT = 0xffff; diff --git a/common/src/test/java/io/druid/metadata/DefaultPasswordProviderTest.java b/common/src/test/java/io/druid/metadata/DefaultPasswordProviderTest.java index 010dbc78292..2bc25345a93 100644 --- a/common/src/test/java/io/druid/metadata/DefaultPasswordProviderTest.java +++ b/common/src/test/java/io/druid/metadata/DefaultPasswordProviderTest.java @@ -19,11 +19,10 @@ package io.druid.metadata; +import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.Assert; import org.junit.Test; -import com.fasterxml.jackson.databind.ObjectMapper; - public class DefaultPasswordProviderTest { private static final String pwd = "nothing"; diff --git a/common/src/test/java/io/druid/metadata/MetadataStorageConnectorConfigTest.java b/common/src/test/java/io/druid/metadata/MetadataStorageConnectorConfigTest.java index 2381bfd4304..51ef275000f 100644 --- a/common/src/test/java/io/druid/metadata/MetadataStorageConnectorConfigTest.java +++ b/common/src/test/java/io/druid/metadata/MetadataStorageConnectorConfigTest.java @@ -19,11 +19,10 @@ package io.druid.metadata; +import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.Assert; import org.junit.Test; -import com.fasterxml.jackson.databind.ObjectMapper; - public class MetadataStorageConnectorConfigTest { private static final ObjectMapper jsonMapper = new ObjectMapper(); diff --git a/common/src/test/java/io/druid/timeline/VersionedIntervalTimelineTest.java b/common/src/test/java/io/druid/timeline/VersionedIntervalTimelineTest.java index 2f19ad3b333..aa693e154c5 100644 --- a/common/src/test/java/io/druid/timeline/VersionedIntervalTimelineTest.java +++ b/common/src/test/java/io/druid/timeline/VersionedIntervalTimelineTest.java @@ -21,7 +21,6 @@ import com.google.common.base.Function; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; -import com.google.common.collect.Lists; import com.google.common.collect.Ordering; import com.google.common.collect.Sets; import com.metamx.common.Pair; diff --git a/extensions/azure-extensions/src/main/java/io/druid/storage/azure/AzureDataSegmentPuller.java b/extensions/azure-extensions/src/main/java/io/druid/storage/azure/AzureDataSegmentPuller.java index 8f2f058c057..d093d2996bd 100644 --- a/extensions/azure-extensions/src/main/java/io/druid/storage/azure/AzureDataSegmentPuller.java +++ b/extensions/azure-extensions/src/main/java/io/druid/storage/azure/AzureDataSegmentPuller.java @@ -19,13 +19,13 @@ package io.druid.storage.azure; import com.google.common.io.ByteSource; import com.google.inject.Inject; +import com.metamx.common.CompressionUtils; import com.metamx.common.ISE; import com.metamx.common.MapUtils; import com.metamx.common.logger.Logger; import io.druid.segment.loading.DataSegmentPuller; import io.druid.segment.loading.SegmentLoadingException; import io.druid.timeline.DataSegment; -import com.metamx.common.CompressionUtils; import org.apache.commons.io.FileUtils; import java.io.File; diff --git a/extensions/azure-extensions/src/main/java/io/druid/storage/azure/AzureStorageDruidModule.java b/extensions/azure-extensions/src/main/java/io/druid/storage/azure/AzureStorageDruidModule.java index 88f59d7bf72..adea4b228f5 100644 --- a/extensions/azure-extensions/src/main/java/io/druid/storage/azure/AzureStorageDruidModule.java +++ b/extensions/azure-extensions/src/main/java/io/druid/storage/azure/AzureStorageDruidModule.java @@ -30,7 +30,6 @@ import io.druid.firehose.azure.StaticAzureBlobStoreFirehoseFactory; import io.druid.guice.Binders; import io.druid.guice.JsonConfigProvider; import io.druid.guice.LazySingleton; -import io.druid.guice.annotations.Json; import io.druid.initialization.DruidModule; import java.net.URISyntaxException; diff --git a/extensions/azure-extensions/src/test/java/io/druid/storage/azure/AzureByteSourceTest.java b/extensions/azure-extensions/src/test/java/io/druid/storage/azure/AzureByteSourceTest.java index fda493bb2e2..01d8579fce6 100644 --- a/extensions/azure-extensions/src/test/java/io/druid/storage/azure/AzureByteSourceTest.java +++ b/extensions/azure-extensions/src/test/java/io/druid/storage/azure/AzureByteSourceTest.java @@ -25,7 +25,7 @@ import java.io.IOException; import java.io.InputStream; import java.net.URISyntaxException; -import static org.easymock.EasyMock.*; +import static org.easymock.EasyMock.expect; public class AzureByteSourceTest extends EasyMockSupport { diff --git a/extensions/azure-extensions/src/test/java/io/druid/storage/azure/AzureDataSegmentKillerTest.java b/extensions/azure-extensions/src/test/java/io/druid/storage/azure/AzureDataSegmentKillerTest.java index 1b1ce988be4..3f9caf4f7c9 100644 --- a/extensions/azure-extensions/src/test/java/io/druid/storage/azure/AzureDataSegmentKillerTest.java +++ b/extensions/azure-extensions/src/test/java/io/druid/storage/azure/AzureDataSegmentKillerTest.java @@ -32,7 +32,7 @@ import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; -import static org.easymock.EasyMock.*; +import static org.easymock.EasyMock.expect; public class AzureDataSegmentKillerTest extends EasyMockSupport { diff --git a/extensions/azure-extensions/src/test/java/io/druid/storage/azure/AzureDataSegmentPullerTest.java b/extensions/azure-extensions/src/test/java/io/druid/storage/azure/AzureDataSegmentPullerTest.java index 7a5eee17c62..9f7ff56a6e0 100644 --- a/extensions/azure-extensions/src/test/java/io/druid/storage/azure/AzureDataSegmentPullerTest.java +++ b/extensions/azure-extensions/src/test/java/io/druid/storage/azure/AzureDataSegmentPullerTest.java @@ -35,7 +35,7 @@ import java.io.InputStream; import java.net.URISyntaxException; import java.nio.file.Files; -import static org.easymock.EasyMock.*; +import static org.easymock.EasyMock.expect; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; diff --git a/extensions/azure-extensions/src/test/java/io/druid/storage/azure/AzureDataSegmentPusherTest.java b/extensions/azure-extensions/src/test/java/io/druid/storage/azure/AzureDataSegmentPusherTest.java index e05c0fc930b..67bf8bbd3fb 100644 --- a/extensions/azure-extensions/src/test/java/io/druid/storage/azure/AzureDataSegmentPusherTest.java +++ b/extensions/azure-extensions/src/test/java/io/druid/storage/azure/AzureDataSegmentPusherTest.java @@ -34,10 +34,10 @@ import java.io.IOException; import java.net.URISyntaxException; import java.util.Map; +import static org.easymock.EasyMock.expect; +import static org.easymock.EasyMock.expectLastCall; import static org.junit.Assert.assertEquals; -import static org.easymock.EasyMock.*; - public class AzureDataSegmentPusherTest extends EasyMockSupport { private static final String containerName = "container"; diff --git a/extensions/hdfs-storage/src/main/java/io/druid/storage/hdfs/HdfsDataSegmentPuller.java b/extensions/hdfs-storage/src/main/java/io/druid/storage/hdfs/HdfsDataSegmentPuller.java index be655087cc5..d0f8e4879e0 100644 --- a/extensions/hdfs-storage/src/main/java/io/druid/storage/hdfs/HdfsDataSegmentPuller.java +++ b/extensions/hdfs-storage/src/main/java/io/druid/storage/hdfs/HdfsDataSegmentPuller.java @@ -32,12 +32,10 @@ import io.druid.segment.loading.SegmentLoadingException; import io.druid.segment.loading.URIDataPuller; import io.druid.timeline.DataSegment; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.LocalFileSystem; import org.apache.hadoop.fs.LocatedFileStatus; import org.apache.hadoop.fs.Path; -import org.apache.hadoop.fs.PathFilter; import org.apache.hadoop.fs.RemoteIterator; import javax.tools.FileObject; @@ -50,7 +48,6 @@ import java.io.Writer; import java.net.URI; import java.util.ArrayList; import java.util.concurrent.Callable; -import java.util.regex.Pattern; /** */ diff --git a/extensions/hdfs-storage/src/main/java/io/druid/storage/hdfs/HdfsLoadSpec.java b/extensions/hdfs-storage/src/main/java/io/druid/storage/hdfs/HdfsLoadSpec.java index 9c86846314e..f423e045790 100644 --- a/extensions/hdfs-storage/src/main/java/io/druid/storage/hdfs/HdfsLoadSpec.java +++ b/extensions/hdfs-storage/src/main/java/io/druid/storage/hdfs/HdfsLoadSpec.java @@ -22,14 +22,11 @@ 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.metamx.common.ISE; -import io.druid.segment.loading.DataSegmentPuller; import io.druid.segment.loading.LoadSpec; import io.druid.segment.loading.SegmentLoadingException; import org.apache.hadoop.fs.Path; import java.io.File; -import java.util.Map; /** * diff --git a/extensions/histogram/src/test/java/io/druid/query/aggregation/histogram/ApproximateHistogramAggregationTest.java b/extensions/histogram/src/test/java/io/druid/query/aggregation/histogram/ApproximateHistogramAggregationTest.java index e0ade6f6971..58ab989f2d2 100644 --- a/extensions/histogram/src/test/java/io/druid/query/aggregation/histogram/ApproximateHistogramAggregationTest.java +++ b/extensions/histogram/src/test/java/io/druid/query/aggregation/histogram/ApproximateHistogramAggregationTest.java @@ -30,8 +30,6 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; -import java.io.File; - /** */ public class ApproximateHistogramAggregationTest diff --git a/extensions/histogram/src/test/java/io/druid/query/aggregation/histogram/ApproximateHistogramGroupByQueryTest.java b/extensions/histogram/src/test/java/io/druid/query/aggregation/histogram/ApproximateHistogramGroupByQueryTest.java index cf91d8007a5..f6c4493d15c 100644 --- a/extensions/histogram/src/test/java/io/druid/query/aggregation/histogram/ApproximateHistogramGroupByQueryTest.java +++ b/extensions/histogram/src/test/java/io/druid/query/aggregation/histogram/ApproximateHistogramGroupByQueryTest.java @@ -48,7 +48,6 @@ import javax.annotation.Nullable; import java.io.IOException; import java.nio.ByteBuffer; import java.util.Arrays; -import java.util.Collection; import java.util.List; /** diff --git a/extensions/histogram/src/test/java/io/druid/query/aggregation/histogram/ApproximateHistogramTopNQueryTest.java b/extensions/histogram/src/test/java/io/druid/query/aggregation/histogram/ApproximateHistogramTopNQueryTest.java index d6952b66736..51c72557b66 100644 --- a/extensions/histogram/src/test/java/io/druid/query/aggregation/histogram/ApproximateHistogramTopNQueryTest.java +++ b/extensions/histogram/src/test/java/io/druid/query/aggregation/histogram/ApproximateHistogramTopNQueryTest.java @@ -27,8 +27,8 @@ import io.druid.query.QueryRunnerTestHelper; import io.druid.query.Result; import io.druid.query.TestQueryRunners; import io.druid.query.aggregation.AggregatorFactory; -import io.druid.query.aggregation.DoubleMinAggregatorFactory; import io.druid.query.aggregation.DoubleMaxAggregatorFactory; +import io.druid.query.aggregation.DoubleMinAggregatorFactory; import io.druid.query.aggregation.PostAggregator; import io.druid.query.topn.TopNQuery; import io.druid.query.topn.TopNQueryBuilder; @@ -45,7 +45,6 @@ import org.junit.runners.Parameterized; import java.io.IOException; import java.nio.ByteBuffer; import java.util.Arrays; -import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/extensions/kafka-eight-simpleConsumer/src/main/java/io/druid/firehose/kafka/KafkaEightSimpleConsumerFirehoseFactory.java b/extensions/kafka-eight-simpleConsumer/src/main/java/io/druid/firehose/kafka/KafkaEightSimpleConsumerFirehoseFactory.java index 482e0faa581..d1a6079415e 100644 --- a/extensions/kafka-eight-simpleConsumer/src/main/java/io/druid/firehose/kafka/KafkaEightSimpleConsumerFirehoseFactory.java +++ b/extensions/kafka-eight-simpleConsumer/src/main/java/io/druid/firehose/kafka/KafkaEightSimpleConsumerFirehoseFactory.java @@ -24,7 +24,6 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Preconditions; import com.google.common.collect.Maps; import com.google.common.io.Closeables; -import com.metamx.common.logger.Logger; import com.metamx.emitter.EmittingLogger; import io.druid.data.input.ByteBufferInputRowParser; import io.druid.data.input.Committer; @@ -38,7 +37,6 @@ import java.io.IOException; import java.nio.ByteBuffer; import java.util.List; import java.util.Map; -import java.util.concurrent.ConcurrentMap; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/extensions/kafka-extraction-namespace/src/test/java/io/druid/query/extraction/namespace/TestKafkaExtractionCluster.java b/extensions/kafka-extraction-namespace/src/test/java/io/druid/query/extraction/namespace/TestKafkaExtractionCluster.java index fb252768503..899b053f8f8 100644 --- a/extensions/kafka-extraction-namespace/src/test/java/io/druid/query/extraction/namespace/TestKafkaExtractionCluster.java +++ b/extensions/kafka-extraction-namespace/src/test/java/io/druid/query/extraction/namespace/TestKafkaExtractionCluster.java @@ -31,9 +31,6 @@ import com.google.inject.Key; import com.google.inject.Module; import com.google.inject.Provider; import com.google.inject.TypeLiteral; -import com.google.inject.multibindings.MapBinder; -import com.google.inject.multibindings.Multibinder; -import com.google.inject.name.Named; import com.google.inject.name.Names; import com.metamx.common.ISE; import com.metamx.common.StringUtils; @@ -58,10 +55,6 @@ import kafka.utils.ZKStringSerializer$; import org.I0Itec.zkclient.ZkClient; import org.apache.commons.io.FileUtils; import org.apache.curator.test.TestingServer; -import org.apache.log4j.BasicConfigurator; -import org.apache.log4j.ConsoleAppender; -import org.apache.log4j.Level; -import org.apache.log4j.PatternLayout; import org.apache.zookeeper.CreateMode; import org.joda.time.DateTime; import org.junit.AfterClass; diff --git a/extensions/namespace-lookup/src/main/java/io/druid/query/extraction/NamespacedExtractor.java b/extensions/namespace-lookup/src/main/java/io/druid/query/extraction/NamespacedExtractor.java index fb1b52dc1a7..841b7f3f34f 100644 --- a/extensions/namespace-lookup/src/main/java/io/druid/query/extraction/NamespacedExtractor.java +++ b/extensions/namespace-lookup/src/main/java/io/druid/query/extraction/NamespacedExtractor.java @@ -25,11 +25,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeName; import com.google.common.base.Function; import com.google.common.base.Preconditions; -import com.google.common.base.Strings; import com.google.inject.name.Named; import com.metamx.common.StringUtils; -import javax.annotation.Nullable; import javax.validation.constraints.NotNull; import java.nio.ByteBuffer; diff --git a/extensions/namespace-lookup/src/main/java/io/druid/query/extraction/namespace/ExtractionNamespaceFunctionFactory.java b/extensions/namespace-lookup/src/main/java/io/druid/query/extraction/namespace/ExtractionNamespaceFunctionFactory.java index 367f004665e..acb9f1d731b 100644 --- a/extensions/namespace-lookup/src/main/java/io/druid/query/extraction/namespace/ExtractionNamespaceFunctionFactory.java +++ b/extensions/namespace-lookup/src/main/java/io/druid/query/extraction/namespace/ExtractionNamespaceFunctionFactory.java @@ -23,7 +23,6 @@ import com.google.common.base.Function; import java.util.Map; import java.util.concurrent.Callable; -import java.util.concurrent.ConcurrentMap; /** * diff --git a/extensions/namespace-lookup/src/main/java/io/druid/server/initialization/NamespaceLookupStaticConfig.java b/extensions/namespace-lookup/src/main/java/io/druid/server/initialization/NamespaceLookupStaticConfig.java index 48f1a769274..c6bd5416958 100644 --- a/extensions/namespace-lookup/src/main/java/io/druid/server/initialization/NamespaceLookupStaticConfig.java +++ b/extensions/namespace-lookup/src/main/java/io/druid/server/initialization/NamespaceLookupStaticConfig.java @@ -20,7 +20,6 @@ package io.druid.server.initialization; import com.fasterxml.jackson.annotation.JsonProperty; - import io.druid.query.extraction.namespace.ExtractionNamespace; import java.util.Arrays; diff --git a/extensions/namespace-lookup/src/test/java/io/druid/query/extraction/namespace/URIExtractionNamespaceTest.java b/extensions/namespace-lookup/src/test/java/io/druid/query/extraction/namespace/URIExtractionNamespaceTest.java index acea090249e..bd5e55c2003 100644 --- a/extensions/namespace-lookup/src/test/java/io/druid/query/extraction/namespace/URIExtractionNamespaceTest.java +++ b/extensions/namespace-lookup/src/test/java/io/druid/query/extraction/namespace/URIExtractionNamespaceTest.java @@ -21,13 +21,13 @@ package io.druid.query.extraction.namespace; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair; -import io.druid.guice.GuiceAnnotationIntrospector; -import io.druid.guice.GuiceInjectableValues; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.inject.Binder; import com.google.inject.Guice; import com.google.inject.Module; +import io.druid.guice.GuiceAnnotationIntrospector; +import io.druid.guice.GuiceInjectableValues; import io.druid.guice.annotations.Json; import io.druid.jackson.DefaultObjectMapper; import org.junit.Assert; diff --git a/extensions/namespace-lookup/src/test/java/io/druid/server/namespace/NamespacedExtractorModuleTest.java b/extensions/namespace-lookup/src/test/java/io/druid/server/namespace/NamespacedExtractorModuleTest.java index b363cdc27e5..75b2857188d 100644 --- a/extensions/namespace-lookup/src/test/java/io/druid/server/namespace/NamespacedExtractorModuleTest.java +++ b/extensions/namespace-lookup/src/test/java/io/druid/server/namespace/NamespacedExtractorModuleTest.java @@ -46,7 +46,6 @@ import org.junit.rules.TemporaryFolder; import java.io.File; import java.io.FileWriter; import java.io.OutputStreamWriter; -import java.net.URI; import java.util.Arrays; import java.util.Collection; import java.util.HashMap; diff --git a/extensions/rabbitmq/src/main/java/io/druid/firehose/rabbitmq/RabbitMQFirehoseFactory.java b/extensions/rabbitmq/src/main/java/io/druid/firehose/rabbitmq/RabbitMQFirehoseFactory.java index 2c715700003..6c3263a3f7d 100644 --- a/extensions/rabbitmq/src/main/java/io/druid/firehose/rabbitmq/RabbitMQFirehoseFactory.java +++ b/extensions/rabbitmq/src/main/java/io/druid/firehose/rabbitmq/RabbitMQFirehoseFactory.java @@ -19,8 +19,8 @@ package io.druid.firehose.rabbitmq; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.metamx.common.logger.Logger; import com.metamx.common.StringUtils; +import com.metamx.common.logger.Logger; import com.rabbitmq.client.AMQP; import com.rabbitmq.client.Channel; import com.rabbitmq.client.Connection; diff --git a/extensions/s3-extensions/src/main/java/io/druid/firehose/s3/StaticS3FirehoseFactory.java b/extensions/s3-extensions/src/main/java/io/druid/firehose/s3/StaticS3FirehoseFactory.java index 32a75a3e84a..da40321dad9 100644 --- a/extensions/s3-extensions/src/main/java/io/druid/firehose/s3/StaticS3FirehoseFactory.java +++ b/extensions/s3-extensions/src/main/java/io/druid/firehose/s3/StaticS3FirehoseFactory.java @@ -45,7 +45,6 @@ import java.net.URI; import java.util.Iterator; import java.util.LinkedList; import java.util.List; -import java.util.zip.GZIPInputStream; /** * Builds firehoses that read from a predefined list of S3 objects and then dry up. diff --git a/extensions/s3-extensions/src/main/java/io/druid/storage/s3/S3LoadSpec.java b/extensions/s3-extensions/src/main/java/io/druid/storage/s3/S3LoadSpec.java index ae260dbda0c..304b230ecac 100644 --- a/extensions/s3-extensions/src/main/java/io/druid/storage/s3/S3LoadSpec.java +++ b/extensions/s3-extensions/src/main/java/io/druid/storage/s3/S3LoadSpec.java @@ -17,43 +17,15 @@ package io.druid.storage.s3; -import com.amazonaws.AmazonClientException; -import com.amazonaws.services.elasticbeanstalk.model.S3LocationNotInServiceRegionException; -import com.amazonaws.services.s3.AmazonS3URI; import com.fasterxml.jackson.annotation.JacksonInject; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeName; import com.google.common.base.Preconditions; -import com.google.common.base.Predicate; -import com.google.common.base.Supplier; -import com.google.common.base.Throwables; -import com.metamx.common.CompressionUtils; -import com.metamx.common.FileUtils; -import com.metamx.common.IAE; -import com.metamx.common.ISE; -import com.metamx.common.RetryUtils; -import com.metamx.common.StreamUtils; -import com.metamx.common.logger.Logger; -import io.druid.segment.loading.DataSegmentPuller; import io.druid.segment.loading.LoadSpec; import io.druid.segment.loading.SegmentLoadingException; -import org.jets3t.service.S3ServiceException; -import org.jets3t.service.ServiceException; -import javax.swing.text.Segment; import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.URI; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.util.Map; -import java.util.concurrent.atomic.AtomicReference; /** * diff --git a/extensions/s3-extensions/src/main/java/io/druid/storage/s3/S3Utils.java b/extensions/s3-extensions/src/main/java/io/druid/storage/s3/S3Utils.java index fe66e838dab..71fce87f469 100644 --- a/extensions/s3-extensions/src/main/java/io/druid/storage/s3/S3Utils.java +++ b/extensions/s3-extensions/src/main/java/io/druid/storage/s3/S3Utils.java @@ -19,7 +19,6 @@ package io.druid.storage.s3; import com.google.common.base.Joiner; import com.google.common.base.Predicate; -import com.metamx.common.FileUtils; import com.metamx.common.RetryUtils; import io.druid.segment.loading.DataSegmentPusherUtil; import io.druid.timeline.DataSegment; diff --git a/indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerMapper.java b/indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerMapper.java index e644288df7e..426b930c6e6 100644 --- a/indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerMapper.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerMapper.java @@ -17,30 +17,17 @@ package io.druid.indexer; +import com.metamx.common.RE; import com.metamx.common.logger.Logger; import io.druid.data.input.InputRow; import io.druid.data.input.impl.InputRowParser; -import io.druid.data.input.impl.MapInputRowParser; import io.druid.data.input.impl.StringInputRowParser; import io.druid.segment.indexing.granularity.GranularitySpec; - -import java.io.IOException; -import java.nio.ByteBuffer; -import java.util.HashMap; -import java.util.Map; - -import org.apache.hadoop.io.BytesWritable; -import org.apache.hadoop.io.DoubleWritable; -import org.apache.hadoop.io.FloatWritable; -import org.apache.hadoop.io.IntWritable; -import org.apache.hadoop.io.LongWritable; -import org.apache.hadoop.io.MapWritable; import org.apache.hadoop.io.Text; -import org.apache.hadoop.io.Writable; import org.apache.hadoop.mapreduce.Mapper; import org.joda.time.DateTime; -import com.metamx.common.RE; +import java.io.IOException; public abstract class HadoopDruidIndexerMapper extends Mapper { diff --git a/indexing-hadoop/src/main/java/io/druid/indexer/JobHelper.java b/indexing-hadoop/src/main/java/io/druid/indexer/JobHelper.java index 5f8b62e0607..6cf21c3631d 100644 --- a/indexing-hadoop/src/main/java/io/druid/indexer/JobHelper.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/JobHelper.java @@ -34,6 +34,21 @@ import io.druid.indexer.updater.HadoopDruidConverterConfig; import io.druid.segment.ProgressIndicator; import io.druid.segment.SegmentUtils; import io.druid.timeline.DataSegment; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.FileStatus; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.LocalFileSystem; +import org.apache.hadoop.fs.Path; +import org.apache.hadoop.io.retry.RetryPolicies; +import org.apache.hadoop.io.retry.RetryProxy; +import org.apache.hadoop.mapreduce.Job; +import org.apache.hadoop.mapreduce.TaskAttemptContext; +import org.apache.hadoop.mapreduce.TaskAttemptID; +import org.apache.hadoop.util.Progressable; +import org.joda.time.DateTime; +import org.joda.time.Interval; +import org.joda.time.format.ISODateTimeFormat; + import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; @@ -53,20 +68,6 @@ import java.util.regex.Pattern; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import java.util.zip.ZipOutputStream; -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.FileStatus; -import org.apache.hadoop.fs.FileSystem; -import org.apache.hadoop.fs.LocalFileSystem; -import org.apache.hadoop.fs.Path; -import org.apache.hadoop.io.retry.RetryPolicies; -import org.apache.hadoop.io.retry.RetryProxy; -import org.apache.hadoop.mapreduce.Job; -import org.apache.hadoop.mapreduce.TaskAttemptContext; -import org.apache.hadoop.mapreduce.TaskAttemptID; -import org.apache.hadoop.util.Progressable; -import org.joda.time.DateTime; -import org.joda.time.Interval; -import org.joda.time.format.ISODateTimeFormat; /** */ diff --git a/indexing-hadoop/src/main/java/io/druid/indexer/path/GranularityPathSpec.java b/indexing-hadoop/src/main/java/io/druid/indexer/path/GranularityPathSpec.java index e793827b65b..fef7249f8f5 100644 --- a/indexing-hadoop/src/main/java/io/druid/indexer/path/GranularityPathSpec.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/path/GranularityPathSpec.java @@ -30,10 +30,6 @@ import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.mapreduce.InputFormat; import org.apache.hadoop.mapreduce.Job; -import org.apache.hadoop.mapreduce.lib.input.CombineTextInputFormat; -import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; -import org.apache.hadoop.mapreduce.lib.input.MultipleInputs; -import org.apache.hadoop.mapreduce.lib.input.TextInputFormat; import org.joda.time.DateTime; import org.joda.time.Interval; import org.joda.time.format.DateTimeFormat; diff --git a/indexing-hadoop/src/test/java/io/druid/indexer/BucketTest.java b/indexing-hadoop/src/test/java/io/druid/indexer/BucketTest.java index 2621b1c85b1..44b86795b42 100644 --- a/indexing-hadoop/src/test/java/io/druid/indexer/BucketTest.java +++ b/indexing-hadoop/src/test/java/io/druid/indexer/BucketTest.java @@ -20,7 +20,7 @@ package io.druid.indexer; import com.google.common.primitives.Bytes; - +import com.metamx.common.Pair; import org.hamcrest.number.OrderingComparison; import org.joda.time.DateTime; import org.junit.After; @@ -28,10 +28,6 @@ import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import com.metamx.common.Pair; - -import java.nio.ByteBuffer; - public class BucketTest { Bucket bucket; diff --git a/indexing-hadoop/src/test/java/io/druid/indexer/DetermineHashedPartitionsJobTest.java b/indexing-hadoop/src/test/java/io/druid/indexer/DetermineHashedPartitionsJobTest.java index 2219bb837a4..88b53ef0a93 100644 --- a/indexing-hadoop/src/test/java/io/druid/indexer/DetermineHashedPartitionsJobTest.java +++ b/indexing-hadoop/src/test/java/io/druid/indexer/DetermineHashedPartitionsJobTest.java @@ -21,6 +21,7 @@ package io.druid.indexer; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; +import com.google.common.io.Files; import com.metamx.common.Granularity; import io.druid.data.input.impl.DelimitedParseSpec; import io.druid.data.input.impl.DimensionsSpec; @@ -36,13 +37,11 @@ import org.joda.time.DateTime; import org.joda.time.Interval; import org.junit.Assert; import org.junit.Test; - -import java.io.File; -import java.io.IOException; -import com.google.common.io.Files; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; +import java.io.File; +import java.io.IOException; import java.util.Arrays; import java.util.Collection; import java.util.List; diff --git a/indexing-hadoop/src/test/java/io/druid/indexer/HadoopIOPeonTest.java b/indexing-hadoop/src/test/java/io/druid/indexer/HadoopIOPeonTest.java index 48c49879acb..8e9fab71f77 100644 --- a/indexing-hadoop/src/test/java/io/druid/indexer/HadoopIOPeonTest.java +++ b/indexing-hadoop/src/test/java/io/druid/indexer/HadoopIOPeonTest.java @@ -20,16 +20,15 @@ package io.druid.indexer; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.mapred.JobContext; import org.apache.hadoop.fs.Path; - +import org.apache.hadoop.mapred.JobContext; +import org.easymock.EasyMock; import org.junit.After; import org.junit.Assert; import org.junit.Before; -import org.junit.Test; import org.junit.Rule; +import org.junit.Test; import org.junit.rules.TemporaryFolder; -import org.easymock.EasyMock; import java.io.IOException; public class HadoopIOPeonTest diff --git a/indexing-hadoop/src/test/java/io/druid/indexer/HadoopIngestionSpecUpdateDatasourcePathSpecSegmentsTest.java b/indexing-hadoop/src/test/java/io/druid/indexer/HadoopIngestionSpecUpdateDatasourcePathSpecSegmentsTest.java index 0060c1fb98f..b09dc5a401d 100644 --- a/indexing-hadoop/src/test/java/io/druid/indexer/HadoopIngestionSpecUpdateDatasourcePathSpecSegmentsTest.java +++ b/indexing-hadoop/src/test/java/io/druid/indexer/HadoopIngestionSpecUpdateDatasourcePathSpecSegmentsTest.java @@ -19,8 +19,6 @@ package io.druid.indexer; -import com.fasterxml.jackson.databind.BeanProperty; -import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.InjectableValues; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.ImmutableList; diff --git a/indexing-hadoop/src/test/java/io/druid/indexer/HdfsClasspathSetupTest.java b/indexing-hadoop/src/test/java/io/druid/indexer/HdfsClasspathSetupTest.java index 6204c04d1de..21935db18b3 100644 --- a/indexing-hadoop/src/test/java/io/druid/indexer/HdfsClasspathSetupTest.java +++ b/indexing-hadoop/src/test/java/io/druid/indexer/HdfsClasspathSetupTest.java @@ -25,20 +25,6 @@ import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.MoreExecutors; import com.metamx.common.StringUtils; import io.druid.common.utils.UUIDUtils; -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.StandardCopyOption; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.Callable; -import java.util.concurrent.CyclicBarrier; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; import junit.framework.Assert; import org.apache.commons.io.IOUtils; import org.apache.hadoop.conf.Configuration; @@ -55,6 +41,20 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.StandardCopyOption; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.Callable; +import java.util.concurrent.CyclicBarrier; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + public class HdfsClasspathSetupTest { private static MiniDFSCluster miniCluster; diff --git a/indexing-hadoop/src/test/java/io/druid/indexer/UtilsCompressionTest.java b/indexing-hadoop/src/test/java/io/druid/indexer/UtilsCompressionTest.java index 78c476b9004..1eaa1ead53c 100644 --- a/indexing-hadoop/src/test/java/io/druid/indexer/UtilsCompressionTest.java +++ b/indexing-hadoop/src/test/java/io/druid/indexer/UtilsCompressionTest.java @@ -29,7 +29,6 @@ import org.apache.hadoop.mapred.JobContext; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; import org.apache.hadoop.util.ReflectionUtils; import org.easymock.EasyMock; - import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/indexing-hadoop/src/test/java/io/druid/indexer/UtilsTest.java b/indexing-hadoop/src/test/java/io/druid/indexer/UtilsTest.java index 084d8250668..09064e089cf 100644 --- a/indexing-hadoop/src/test/java/io/druid/indexer/UtilsTest.java +++ b/indexing-hadoop/src/test/java/io/druid/indexer/UtilsTest.java @@ -20,18 +20,14 @@ package io.druid.indexer; import com.google.common.base.Function; -import com.google.common.collect.Iterables; import com.google.common.collect.Maps; - import com.google.common.io.ByteStreams; import com.metamx.common.ISE; - +import org.apache.commons.io.FileUtils; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; -import org.apache.commons.io.FileUtils; import org.apache.hadoop.fs.Path; import org.apache.hadoop.mapred.JobContext; - import org.easymock.EasyMock; import org.hamcrest.core.Is; import org.junit.After; @@ -42,8 +38,8 @@ import org.junit.Test; import org.junit.rules.TemporaryFolder; import java.io.File; -import java.io.InputStream; import java.io.IOException; +import java.io.InputStream; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Arrays; diff --git a/indexing-hadoop/src/test/java/io/druid/indexer/partitions/HashedPartitionsSpecTest.java b/indexing-hadoop/src/test/java/io/druid/indexer/partitions/HashedPartitionsSpecTest.java index 4874242c5ef..9ae8a8fd1cb 100644 --- a/indexing-hadoop/src/test/java/io/druid/indexer/partitions/HashedPartitionsSpecTest.java +++ b/indexing-hadoop/src/test/java/io/druid/indexer/partitions/HashedPartitionsSpecTest.java @@ -17,10 +17,9 @@ package io.druid.indexer.partitions; -import io.druid.jackson.DefaultObjectMapper; - import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Throwables; +import io.druid.jackson.DefaultObjectMapper; import org.junit.Assert; import org.junit.Test; diff --git a/indexing-hadoop/src/test/java/io/druid/indexer/path/GranularityPathSpecTest.java b/indexing-hadoop/src/test/java/io/druid/indexer/path/GranularityPathSpecTest.java index fcad18866ff..0dec1501167 100644 --- a/indexing-hadoop/src/test/java/io/druid/indexer/path/GranularityPathSpecTest.java +++ b/indexing-hadoop/src/test/java/io/druid/indexer/path/GranularityPathSpecTest.java @@ -19,11 +19,9 @@ package io.druid.indexer.path; -import io.druid.jackson.DefaultObjectMapper; - import com.fasterxml.jackson.databind.ObjectMapper; import com.metamx.common.Granularity; - +import io.druid.jackson.DefaultObjectMapper; import org.apache.hadoop.mapreduce.lib.input.TextInputFormat; import org.junit.After; import org.junit.Assert; diff --git a/indexing-hadoop/src/test/java/io/druid/indexer/path/StaticPathSpecTest.java b/indexing-hadoop/src/test/java/io/druid/indexer/path/StaticPathSpecTest.java index b654d7849f0..0be2e95a1e5 100644 --- a/indexing-hadoop/src/test/java/io/druid/indexer/path/StaticPathSpecTest.java +++ b/indexing-hadoop/src/test/java/io/druid/indexer/path/StaticPathSpecTest.java @@ -19,14 +19,12 @@ package io.druid.indexer.path; +import com.fasterxml.jackson.databind.ObjectMapper; import io.druid.jackson.DefaultObjectMapper; - import org.apache.hadoop.mapreduce.lib.input.TextInputFormat; import org.junit.Assert; import org.junit.Test; -import com.fasterxml.jackson.databind.ObjectMapper; - public class StaticPathSpecTest { private final ObjectMapper jsonMapper = new DefaultObjectMapper(); diff --git a/indexing-hadoop/src/test/java/io/druid/indexer/updater/MetadataStorageUpdaterJobSpecTest.java b/indexing-hadoop/src/test/java/io/druid/indexer/updater/MetadataStorageUpdaterJobSpecTest.java index 720da2e8637..c7d8581dad2 100644 --- a/indexing-hadoop/src/test/java/io/druid/indexer/updater/MetadataStorageUpdaterJobSpecTest.java +++ b/indexing-hadoop/src/test/java/io/druid/indexer/updater/MetadataStorageUpdaterJobSpecTest.java @@ -19,11 +19,10 @@ package io.druid.indexer.updater; +import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.Assert; import org.junit.Test; -import com.fasterxml.jackson.databind.ObjectMapper; - public class MetadataStorageUpdaterJobSpecTest { private static final ObjectMapper jsonMapper = new ObjectMapper(); diff --git a/indexing-service/src/main/java/io/druid/indexing/common/SegmentLoaderFactory.java b/indexing-service/src/main/java/io/druid/indexing/common/SegmentLoaderFactory.java index 8b60effdfb6..40515b40381 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/SegmentLoaderFactory.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/SegmentLoaderFactory.java @@ -18,9 +18,9 @@ package io.druid.indexing.common; import com.google.inject.Inject; -import io.druid.segment.loading.SegmentLoaderLocalCacheManager; import io.druid.segment.loading.SegmentLoader; import io.druid.segment.loading.SegmentLoaderConfig; +import io.druid.segment.loading.SegmentLoaderLocalCacheManager; import io.druid.segment.loading.StorageLocationConfig; import java.io.File; diff --git a/indexing-service/src/main/java/io/druid/indexing/common/task/AbstractFixedIntervalTask.java b/indexing-service/src/main/java/io/druid/indexing/common/task/AbstractFixedIntervalTask.java index b36ff75cd4d..b91afc7a92c 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/task/AbstractFixedIntervalTask.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/AbstractFixedIntervalTask.java @@ -22,9 +22,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Preconditions; import io.druid.indexing.common.actions.LockTryAcquireAction; import io.druid.indexing.common.actions.TaskActionClient; -import java.util.Map; import org.joda.time.Interval; +import java.util.Map; + public abstract class AbstractFixedIntervalTask extends AbstractTask { @JsonIgnore diff --git a/indexing-service/src/main/java/io/druid/indexing/common/task/AbstractTask.java b/indexing-service/src/main/java/io/druid/indexing/common/task/AbstractTask.java index 3d3df6b363b..0ac699f2bdc 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/task/AbstractTask.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/AbstractTask.java @@ -28,11 +28,11 @@ import io.druid.indexing.common.TaskToolbox; import io.druid.indexing.common.actions.LockListAction; import io.druid.query.Query; import io.druid.query.QueryRunner; -import java.util.Map; import org.joda.time.DateTime; import org.joda.time.Interval; import java.io.IOException; +import java.util.Map; public abstract class AbstractTask implements Task { diff --git a/indexing-service/src/main/java/io/druid/indexing/common/task/ArchiveTask.java b/indexing-service/src/main/java/io/druid/indexing/common/task/ArchiveTask.java index fa0435c2b0f..b1bf1c7a99d 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/task/ArchiveTask.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/ArchiveTask.java @@ -28,10 +28,10 @@ import io.druid.indexing.common.TaskToolbox; import io.druid.indexing.common.actions.SegmentListUnusedAction; import io.druid.indexing.common.actions.SegmentMetadataUpdateAction; import io.druid.timeline.DataSegment; -import java.util.Map; import org.joda.time.Interval; import java.util.List; +import java.util.Map; public class ArchiveTask extends AbstractFixedIntervalTask { diff --git a/indexing-service/src/main/java/io/druid/indexing/common/task/HadoopIndexTask.java b/indexing-service/src/main/java/io/druid/indexing/common/task/HadoopIndexTask.java index c148c3f4cb6..9233e3862fd 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/task/HadoopIndexTask.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/HadoopIndexTask.java @@ -43,11 +43,11 @@ import io.druid.indexing.common.actions.LockTryAcquireAction; import io.druid.indexing.common.actions.TaskActionClient; import io.druid.indexing.hadoop.OverlordActionBasedUsedSegmentLister; import io.druid.timeline.DataSegment; -import java.util.Map; import org.joda.time.DateTime; import org.joda.time.Interval; import java.util.List; +import java.util.Map; import java.util.SortedSet; public class HadoopIndexTask extends HadoopTask diff --git a/indexing-service/src/main/java/io/druid/indexing/common/task/KillTask.java b/indexing-service/src/main/java/io/druid/indexing/common/task/KillTask.java index 0a04e325f7d..4bc92809c03 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/task/KillTask.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/KillTask.java @@ -29,10 +29,10 @@ import io.druid.indexing.common.TaskToolbox; import io.druid.indexing.common.actions.SegmentListUnusedAction; import io.druid.indexing.common.actions.SegmentNukeAction; import io.druid.timeline.DataSegment; -import java.util.Map; import org.joda.time.Interval; import java.util.List; +import java.util.Map; /** */ diff --git a/indexing-service/src/main/java/io/druid/indexing/common/task/NoopTask.java b/indexing-service/src/main/java/io/druid/indexing/common/task/NoopTask.java index a783a659b7f..a32818d147b 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/task/NoopTask.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/NoopTask.java @@ -26,9 +26,9 @@ import io.druid.data.input.FirehoseFactory; import io.druid.indexing.common.TaskStatus; import io.druid.indexing.common.TaskToolbox; import io.druid.indexing.common.actions.TaskActionClient; -import java.util.Map; import org.joda.time.DateTime; +import java.util.Map; import java.util.UUID; /** diff --git a/indexing-service/src/main/java/io/druid/indexing/common/task/RestoreTask.java b/indexing-service/src/main/java/io/druid/indexing/common/task/RestoreTask.java index 0d9b9c8e480..c1e4c336136 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/task/RestoreTask.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/RestoreTask.java @@ -29,10 +29,10 @@ import io.druid.indexing.common.TaskToolbox; import io.druid.indexing.common.actions.SegmentListUnusedAction; import io.druid.indexing.common.actions.SegmentMetadataUpdateAction; import io.druid.timeline.DataSegment; -import java.util.Map; import org.joda.time.Interval; import java.util.List; +import java.util.Map; public class RestoreTask extends AbstractFixedIntervalTask { diff --git a/indexing-service/src/main/java/io/druid/indexing/common/task/Task.java b/indexing-service/src/main/java/io/druid/indexing/common/task/Task.java index 2f3e472b76f..6ac9f66facf 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/task/Task.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/Task.java @@ -24,6 +24,7 @@ import io.druid.indexing.common.TaskToolbox; import io.druid.indexing.common.actions.TaskActionClient; import io.druid.query.Query; import io.druid.query.QueryRunner; + import java.util.Map; /** diff --git a/indexing-service/src/main/java/io/druid/indexing/overlord/MetadataTaskStorage.java b/indexing-service/src/main/java/io/druid/indexing/overlord/MetadataTaskStorage.java index 22d5593f2eb..1044e52a306 100644 --- a/indexing-service/src/main/java/io/druid/indexing/overlord/MetadataTaskStorage.java +++ b/indexing-service/src/main/java/io/druid/indexing/overlord/MetadataTaskStorage.java @@ -30,16 +30,16 @@ import com.metamx.common.Pair; import com.metamx.common.lifecycle.LifecycleStart; import com.metamx.common.lifecycle.LifecycleStop; import com.metamx.emitter.EmittingLogger; +import io.druid.indexing.common.TaskLock; import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.actions.TaskAction; +import io.druid.indexing.common.config.TaskStorageConfig; +import io.druid.indexing.common.task.Task; import io.druid.metadata.EntryExistsException; import io.druid.metadata.MetadataStorageActionHandler; import io.druid.metadata.MetadataStorageActionHandlerFactory; import io.druid.metadata.MetadataStorageActionHandlerTypes; import io.druid.metadata.MetadataStorageConnector; -import io.druid.indexing.common.TaskLock; -import io.druid.indexing.common.actions.TaskAction; -import io.druid.indexing.common.config.TaskStorageConfig; -import io.druid.indexing.common.task.Task; import io.druid.metadata.MetadataStorageTablesConfig; import org.joda.time.DateTime; diff --git a/indexing-service/src/main/java/io/druid/indexing/overlord/TaskLockbox.java b/indexing-service/src/main/java/io/druid/indexing/overlord/TaskLockbox.java index 81612489469..dd7cb858d3b 100644 --- a/indexing-service/src/main/java/io/druid/indexing/overlord/TaskLockbox.java +++ b/indexing-service/src/main/java/io/druid/indexing/overlord/TaskLockbox.java @@ -38,6 +38,10 @@ import com.metamx.emitter.EmittingLogger; import io.druid.common.utils.JodaUtils; import io.druid.indexing.common.TaskLock; import io.druid.indexing.common.task.Task; +import org.joda.time.DateTime; +import org.joda.time.Interval; + +import javax.annotation.Nullable; import java.util.Collections; import java.util.List; import java.util.Map; @@ -47,9 +51,6 @@ import java.util.Set; import java.util.TreeMap; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.ReentrantLock; -import javax.annotation.Nullable; -import org.joda.time.DateTime; -import org.joda.time.Interval; /** * Remembers which activeTasks have locked which intervals. Tasks are permitted to lock an interval if no other task diff --git a/indexing-service/src/main/java/io/druid/indexing/overlord/TaskMaster.java b/indexing-service/src/main/java/io/druid/indexing/overlord/TaskMaster.java index 9362b11c2df..0dac92615fe 100644 --- a/indexing-service/src/main/java/io/druid/indexing/overlord/TaskMaster.java +++ b/indexing-service/src/main/java/io/druid/indexing/overlord/TaskMaster.java @@ -32,9 +32,9 @@ import io.druid.guice.annotations.Self; import io.druid.indexing.common.actions.TaskActionClient; import io.druid.indexing.common.actions.TaskActionClientFactory; import io.druid.indexing.common.task.Task; -import io.druid.indexing.overlord.config.TaskQueueConfig; import io.druid.indexing.overlord.autoscaling.ResourceManagementScheduler; import io.druid.indexing.overlord.autoscaling.ResourceManagementSchedulerFactory; +import io.druid.indexing.overlord.config.TaskQueueConfig; import io.druid.server.DruidNode; import io.druid.server.initialization.IndexerZkConfig; import org.apache.curator.framework.CuratorFramework; diff --git a/indexing-service/src/main/java/io/druid/indexing/overlord/TaskQueue.java b/indexing-service/src/main/java/io/druid/indexing/overlord/TaskQueue.java index 682f72c63b6..594c46d5716 100644 --- a/indexing-service/src/main/java/io/druid/indexing/overlord/TaskQueue.java +++ b/indexing-service/src/main/java/io/druid/indexing/overlord/TaskQueue.java @@ -24,7 +24,6 @@ import com.google.common.base.Throwables; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; -import com.google.common.collect.MapDifference; import com.google.common.collect.Maps; import com.google.common.collect.Sets; import com.google.common.util.concurrent.FutureCallback; @@ -46,7 +45,6 @@ import io.druid.metadata.EntryExistsException; import io.druid.query.DruidMetrics; import java.util.Collection; -import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; @@ -56,7 +54,6 @@ import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.ReentrantLock; -import javax.annotation.Nullable; /** * Interface between task producers and the task runner. diff --git a/indexing-service/src/main/java/io/druid/indexing/overlord/ThreadPoolTaskRunner.java b/indexing-service/src/main/java/io/druid/indexing/overlord/ThreadPoolTaskRunner.java index 462179d0b15..fd2eb37830b 100644 --- a/indexing-service/src/main/java/io/druid/indexing/overlord/ThreadPoolTaskRunner.java +++ b/indexing-service/src/main/java/io/druid/indexing/overlord/ThreadPoolTaskRunner.java @@ -17,7 +17,6 @@ package io.druid.indexing.overlord; -import com.google.common.base.Function; import com.google.common.base.Preconditions; import com.google.common.base.Throwables; import com.google.common.collect.ImmutableList; @@ -42,7 +41,6 @@ import io.druid.query.QueryRunner; import io.druid.query.QueryRunnerFactoryConglomerate; import io.druid.query.QuerySegmentWalker; import io.druid.query.SegmentDescriptor; -import io.druid.query.UnionQueryRunner; import org.apache.commons.io.FileUtils; import org.joda.time.Interval; diff --git a/indexing-service/src/main/java/io/druid/indexing/overlord/autoscaling/ResourceManagementScheduler.java b/indexing-service/src/main/java/io/druid/indexing/overlord/autoscaling/ResourceManagementScheduler.java index 15a75f5c988..7f9a8aaf7e6 100644 --- a/indexing-service/src/main/java/io/druid/indexing/overlord/autoscaling/ResourceManagementScheduler.java +++ b/indexing-service/src/main/java/io/druid/indexing/overlord/autoscaling/ResourceManagementScheduler.java @@ -23,7 +23,6 @@ import com.metamx.common.lifecycle.LifecycleStop; import com.metamx.common.logger.Logger; import io.druid.granularity.PeriodGranularity; import io.druid.indexing.overlord.RemoteTaskRunner; -import io.druid.indexing.overlord.TaskRunner; import org.joda.time.DateTime; import org.joda.time.Duration; import org.joda.time.Period; diff --git a/indexing-service/src/main/java/io/druid/indexing/overlord/autoscaling/ResourceManagementStrategy.java b/indexing-service/src/main/java/io/druid/indexing/overlord/autoscaling/ResourceManagementStrategy.java index 7a7e23d047c..7e7fb2b6986 100644 --- a/indexing-service/src/main/java/io/druid/indexing/overlord/autoscaling/ResourceManagementStrategy.java +++ b/indexing-service/src/main/java/io/druid/indexing/overlord/autoscaling/ResourceManagementStrategy.java @@ -18,10 +18,6 @@ package io.druid.indexing.overlord.autoscaling; import io.druid.indexing.overlord.RemoteTaskRunner; -import io.druid.indexing.overlord.RemoteTaskRunnerWorkItem; -import io.druid.indexing.overlord.ZkWorker; - -import java.util.Collection; /** * The ResourceManagementStrategy decides if worker nodes should be provisioned or determined diff --git a/indexing-service/src/main/java/io/druid/indexing/overlord/http/OverlordRedirectInfo.java b/indexing-service/src/main/java/io/druid/indexing/overlord/http/OverlordRedirectInfo.java index 7efc5606dbd..d111e14e497 100644 --- a/indexing-service/src/main/java/io/druid/indexing/overlord/http/OverlordRedirectInfo.java +++ b/indexing-service/src/main/java/io/druid/indexing/overlord/http/OverlordRedirectInfo.java @@ -19,7 +19,6 @@ package io.druid.indexing.overlord.http; import com.google.common.base.Throwables; import com.google.inject.Inject; -import com.metamx.common.IAE; import io.druid.indexing.overlord.TaskMaster; import io.druid.server.http.RedirectInfo; diff --git a/indexing-service/src/test/java/io/druid/indexing/common/RetryPolicyFactoryTest.java b/indexing-service/src/test/java/io/druid/indexing/common/RetryPolicyFactoryTest.java index d2c945f134c..68ec04fca6f 100644 --- a/indexing-service/src/test/java/io/druid/indexing/common/RetryPolicyFactoryTest.java +++ b/indexing-service/src/test/java/io/druid/indexing/common/RetryPolicyFactoryTest.java @@ -19,12 +19,11 @@ package io.druid.indexing.common; +import org.joda.time.Duration; import org.joda.time.Period; import org.junit.Assert; import org.junit.Test; -import org.joda.time.Duration; - public class RetryPolicyFactoryTest { @Test diff --git a/indexing-service/src/test/java/io/druid/indexing/common/config/TaskStorageConfigTest.java b/indexing-service/src/test/java/io/druid/indexing/common/config/TaskStorageConfigTest.java index e2ab7e9a612..cb6213b3996 100644 --- a/indexing-service/src/test/java/io/druid/indexing/common/config/TaskStorageConfigTest.java +++ b/indexing-service/src/test/java/io/druid/indexing/common/config/TaskStorageConfigTest.java @@ -19,14 +19,12 @@ package io.druid.indexing.common.config; +import com.fasterxml.jackson.databind.ObjectMapper; +import io.druid.jackson.DefaultObjectMapper; import org.joda.time.Period; import org.junit.Assert; import org.junit.Test; -import com.fasterxml.jackson.databind.ObjectMapper; - -import io.druid.jackson.DefaultObjectMapper; - public class TaskStorageConfigTest { private final ObjectMapper jsonMapper = new DefaultObjectMapper(); diff --git a/indexing-service/src/test/java/io/druid/indexing/common/tasklogs/FileTaskLogsTest.java b/indexing-service/src/test/java/io/druid/indexing/common/tasklogs/FileTaskLogsTest.java index bcbad6ce83e..51176fdd16a 100644 --- a/indexing-service/src/test/java/io/druid/indexing/common/tasklogs/FileTaskLogsTest.java +++ b/indexing-service/src/test/java/io/druid/indexing/common/tasklogs/FileTaskLogsTest.java @@ -27,11 +27,11 @@ import org.apache.commons.io.FileUtils; import org.junit.Assert; import org.junit.Rule; import org.junit.Test; +import org.junit.rules.TemporaryFolder; import java.io.File; import java.io.IOException; import java.util.Map; -import org.junit.rules.TemporaryFolder; public class FileTaskLogsTest { diff --git a/indexing-service/src/test/java/io/druid/indexing/firehose/IngestSegmentFirehoseFactoryTest.java b/indexing-service/src/test/java/io/druid/indexing/firehose/IngestSegmentFirehoseFactoryTest.java index 5d35dbe2ccd..5ece6cd52a8 100644 --- a/indexing-service/src/test/java/io/druid/indexing/firehose/IngestSegmentFirehoseFactoryTest.java +++ b/indexing-service/src/test/java/io/druid/indexing/firehose/IngestSegmentFirehoseFactoryTest.java @@ -19,8 +19,6 @@ package io.druid.indexing.firehose; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair; -import io.druid.guice.GuiceAnnotationIntrospector; -import io.druid.guice.GuiceInjectableValues; import com.fasterxml.jackson.databind.module.SimpleModule; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; @@ -45,6 +43,8 @@ import io.druid.data.input.impl.MapInputRowParser; import io.druid.data.input.impl.SpatialDimensionSchema; import io.druid.data.input.impl.TimestampSpec; import io.druid.granularity.QueryGranularity; +import io.druid.guice.GuiceAnnotationIntrospector; +import io.druid.guice.GuiceInjectableValues; import io.druid.guice.GuiceInjectors; import io.druid.indexing.common.SegmentLoaderFactory; import io.druid.indexing.common.TaskToolboxFactory; diff --git a/indexing-service/src/test/java/io/druid/indexing/overlord/autoscaling/EC2AutoScalerTest.java b/indexing-service/src/test/java/io/druid/indexing/overlord/autoscaling/EC2AutoScalerTest.java index 2861fcfcb23..7e33c85cf00 100644 --- a/indexing-service/src/test/java/io/druid/indexing/overlord/autoscaling/EC2AutoScalerTest.java +++ b/indexing-service/src/test/java/io/druid/indexing/overlord/autoscaling/EC2AutoScalerTest.java @@ -25,10 +25,7 @@ import com.amazonaws.services.ec2.model.Reservation; import com.amazonaws.services.ec2.model.RunInstancesRequest; import com.amazonaws.services.ec2.model.RunInstancesResult; import com.amazonaws.services.ec2.model.TerminateInstancesRequest; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.google.common.base.Charsets; import com.google.common.collect.Lists; -import com.google.common.io.BaseEncoding; import io.druid.indexing.overlord.autoscaling.ec2.EC2AutoScaler; import io.druid.indexing.overlord.autoscaling.ec2.EC2EnvironmentConfig; import io.druid.indexing.overlord.autoscaling.ec2.EC2NodeData; diff --git a/integration-tests/src/main/java/io/druid/testing/ConfigFileConfigProvider.java b/integration-tests/src/main/java/io/druid/testing/ConfigFileConfigProvider.java index b181f855ece..d64b29bc046 100644 --- a/integration-tests/src/main/java/io/druid/testing/ConfigFileConfigProvider.java +++ b/integration-tests/src/main/java/io/druid/testing/ConfigFileConfigProvider.java @@ -21,17 +21,14 @@ package io.druid.testing; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; - -import java.io.FileNotFoundException; -import java.io.File; -import java.io.IOException; - import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; - -import java.util.Map; import com.metamx.common.logger.Logger; +import java.io.File; +import java.io.IOException; +import java.util.Map; + public class ConfigFileConfigProvider implements IntegrationTestingConfigProvider { private final static Logger LOG = new Logger(ConfigFileConfigProvider.class); diff --git a/integration-tests/src/main/java/io/druid/testing/guice/DruidTestModule.java b/integration-tests/src/main/java/io/druid/testing/guice/DruidTestModule.java index eb8ddd10464..b0794fddafa 100644 --- a/integration-tests/src/main/java/io/druid/testing/guice/DruidTestModule.java +++ b/integration-tests/src/main/java/io/druid/testing/guice/DruidTestModule.java @@ -25,12 +25,12 @@ import com.google.inject.Provides; import com.metamx.emitter.core.LoggingEmitter; import com.metamx.emitter.core.LoggingEmitterConfig; import com.metamx.emitter.service.ServiceEmitter; +import io.druid.curator.CuratorConfig; import io.druid.guice.JsonConfigProvider; import io.druid.guice.LazySingleton; import io.druid.guice.ManageLifecycle; import io.druid.testing.IntegrationTestingConfig; import io.druid.testing.IntegrationTestingConfigProvider; -import io.druid.curator.CuratorConfig; import io.druid.testing.IntegrationTestingCuratorConfig; /** diff --git a/integration-tests/src/main/java/io/druid/testing/utils/TestQueryHelper.java b/integration-tests/src/main/java/io/druid/testing/utils/TestQueryHelper.java index bf8826d139d..49a23f13f12 100644 --- a/integration-tests/src/main/java/io/druid/testing/utils/TestQueryHelper.java +++ b/integration-tests/src/main/java/io/druid/testing/utils/TestQueryHelper.java @@ -24,8 +24,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.google.inject.Inject; import com.metamx.common.ISE; import com.metamx.common.logger.Logger; -import io.druid.testing.clients.QueryResourceTestClient; import io.druid.testing.IntegrationTestingConfig; +import io.druid.testing.clients.QueryResourceTestClient; import java.util.List; import java.util.Map; diff --git a/integration-tests/src/test/java/io/druid/tests/indexer/AbstractIndexerTest.java b/integration-tests/src/test/java/io/druid/tests/indexer/AbstractIndexerTest.java index 4601bc0c5c2..5fb492bdb2e 100644 --- a/integration-tests/src/test/java/io/druid/tests/indexer/AbstractIndexerTest.java +++ b/integration-tests/src/test/java/io/druid/tests/indexer/AbstractIndexerTest.java @@ -23,8 +23,8 @@ import io.druid.guice.annotations.Json; import io.druid.guice.annotations.Smile; import io.druid.testing.clients.CoordinatorResourceTestClient; import io.druid.testing.clients.OverlordResourceTestClient; -import io.druid.testing.utils.TestQueryHelper; import io.druid.testing.utils.RetryUtil; +import io.druid.testing.utils.TestQueryHelper; import org.apache.commons.io.IOUtils; import org.joda.time.Interval; diff --git a/integration-tests/src/test/java/io/druid/tests/indexer/ITKafkaTest.java b/integration-tests/src/test/java/io/druid/tests/indexer/ITKafkaTest.java index 621df21ded9..6f28dc46a11 100644 --- a/integration-tests/src/test/java/io/druid/tests/indexer/ITKafkaTest.java +++ b/integration-tests/src/test/java/io/druid/tests/indexer/ITKafkaTest.java @@ -34,9 +34,7 @@ import kafka.producer.KeyedMessage; import kafka.producer.ProducerConfig; import kafka.utils.ZKStringSerializer$; import org.I0Itec.zkclient.ZkClient; - -import java.util.concurrent.TimeUnit; - +import org.apache.commons.io.IOUtils; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.format.DateTimeFormat; @@ -45,13 +43,11 @@ import org.testng.annotations.AfterClass; import org.testng.annotations.Guice; import org.testng.annotations.Test; -import org.apache.commons.io.IOUtils; - -import java.io.InputStream; import java.io.IOException; - +import java.io.InputStream; import java.util.Properties; import java.util.concurrent.Callable; +import java.util.concurrent.TimeUnit; /* * This is a test for the kafka firehose. diff --git a/integration-tests/src/test/java/io/druid/tests/indexer/ITRealtimeIndexTaskTest.java b/integration-tests/src/test/java/io/druid/tests/indexer/ITRealtimeIndexTaskTest.java index d30cf9e0300..59f6446082f 100644 --- a/integration-tests/src/test/java/io/druid/tests/indexer/ITRealtimeIndexTaskTest.java +++ b/integration-tests/src/test/java/io/druid/tests/indexer/ITRealtimeIndexTaskTest.java @@ -17,10 +17,11 @@ package io.druid.tests.indexer; +import com.fasterxml.jackson.core.type.TypeReference; import com.google.common.base.Throwables; import com.google.inject.Inject; -import com.metamx.common.logger.Logger; import com.metamx.common.ISE; +import com.metamx.common.logger.Logger; import com.metamx.http.client.HttpClient; import io.druid.curator.discovery.ServerDiscoveryFactory; import io.druid.curator.discovery.ServerDiscoverySelector; @@ -30,6 +31,7 @@ import io.druid.testing.clients.EventReceiverFirehoseTestClient; import io.druid.testing.guice.DruidTestModuleFactory; import io.druid.testing.utils.RetryUtil; import io.druid.testing.utils.ServerDiscoveryUtil; +import org.apache.commons.io.IOUtils; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.format.DateTimeFormat; @@ -38,20 +40,12 @@ import org.testng.annotations.Guice; import org.testng.annotations.Test; import javax.ws.rs.core.MediaType; - -import org.apache.commons.io.IOUtils; - import java.io.BufferedReader; -import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; - -import com.fasterxml.jackson.core.type.TypeReference; - import java.util.ArrayList; import java.util.Collection; import java.util.Map; - import java.util.concurrent.Callable; import java.util.concurrent.TimeUnit; diff --git a/integration-tests/src/test/java/io/druid/tests/query/ITTwitterQueryTest.java b/integration-tests/src/test/java/io/druid/tests/query/ITTwitterQueryTest.java index 972bc2ae863..56e2b491923 100644 --- a/integration-tests/src/test/java/io/druid/tests/query/ITTwitterQueryTest.java +++ b/integration-tests/src/test/java/io/druid/tests/query/ITTwitterQueryTest.java @@ -20,8 +20,8 @@ package io.druid.tests.query; import com.google.inject.Inject; import io.druid.testing.clients.CoordinatorResourceTestClient; import io.druid.testing.guice.DruidTestModuleFactory; -import io.druid.testing.utils.TestQueryHelper; import io.druid.testing.utils.RetryUtil; +import io.druid.testing.utils.TestQueryHelper; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Guice; import org.testng.annotations.Test; diff --git a/integration-tests/src/test/java/io/druid/tests/query/ITWikipediaQueryTest.java b/integration-tests/src/test/java/io/druid/tests/query/ITWikipediaQueryTest.java index 5644775b69d..e924ab89a45 100644 --- a/integration-tests/src/test/java/io/druid/tests/query/ITWikipediaQueryTest.java +++ b/integration-tests/src/test/java/io/druid/tests/query/ITWikipediaQueryTest.java @@ -20,8 +20,8 @@ package io.druid.tests.query; import com.google.inject.Inject; import io.druid.testing.clients.CoordinatorResourceTestClient; import io.druid.testing.guice.DruidTestModuleFactory; -import io.druid.testing.utils.TestQueryHelper; import io.druid.testing.utils.RetryUtil; +import io.druid.testing.utils.TestQueryHelper; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Guice; import org.testng.annotations.Test; diff --git a/processing/src/main/java/io/druid/jackson/AggregatorsModule.java b/processing/src/main/java/io/druid/jackson/AggregatorsModule.java index e28c0cf71b6..c62dca1f728 100644 --- a/processing/src/main/java/io/druid/jackson/AggregatorsModule.java +++ b/processing/src/main/java/io/druid/jackson/AggregatorsModule.java @@ -25,8 +25,6 @@ import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.aggregation.CountAggregatorFactory; import io.druid.query.aggregation.DoubleMaxAggregatorFactory; import io.druid.query.aggregation.DoubleMinAggregatorFactory; -import io.druid.query.aggregation.MinAggregatorFactory; -import io.druid.query.aggregation.MaxAggregatorFactory; import io.druid.query.aggregation.DoubleSumAggregatorFactory; import io.druid.query.aggregation.FilteredAggregatorFactory; import io.druid.query.aggregation.HistogramAggregatorFactory; @@ -34,6 +32,8 @@ import io.druid.query.aggregation.JavaScriptAggregatorFactory; import io.druid.query.aggregation.LongMaxAggregatorFactory; import io.druid.query.aggregation.LongMinAggregatorFactory; import io.druid.query.aggregation.LongSumAggregatorFactory; +import io.druid.query.aggregation.MaxAggregatorFactory; +import io.druid.query.aggregation.MinAggregatorFactory; import io.druid.query.aggregation.PostAggregator; import io.druid.query.aggregation.cardinality.CardinalityAggregatorFactory; import io.druid.query.aggregation.hyperloglog.HyperUniqueFinalizingPostAggregator; diff --git a/processing/src/main/java/io/druid/query/AsyncQueryRunner.java b/processing/src/main/java/io/druid/query/AsyncQueryRunner.java index 09eee158560..a3c05c76e45 100644 --- a/processing/src/main/java/io/druid/query/AsyncQueryRunner.java +++ b/processing/src/main/java/io/druid/query/AsyncQueryRunner.java @@ -19,12 +19,6 @@ package io.druid.query; -import java.util.Map; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; - import com.google.common.base.Supplier; import com.google.common.base.Throwables; import com.google.common.util.concurrent.ListenableFuture; @@ -33,6 +27,12 @@ import com.google.common.util.concurrent.MoreExecutors; import com.metamx.common.guava.LazySequence; import com.metamx.common.guava.Sequence; +import java.util.Map; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + public class AsyncQueryRunner implements QueryRunner { diff --git a/processing/src/main/java/io/druid/query/CPUTimeMetricQueryRunner.java b/processing/src/main/java/io/druid/query/CPUTimeMetricQueryRunner.java index 734eb55c6a1..1ee5b72561c 100644 --- a/processing/src/main/java/io/druid/query/CPUTimeMetricQueryRunner.java +++ b/processing/src/main/java/io/druid/query/CPUTimeMetricQueryRunner.java @@ -31,11 +31,9 @@ import com.metamx.common.guava.Yielder; import com.metamx.common.guava.YieldingAccumulator; import com.metamx.emitter.service.ServiceEmitter; import com.metamx.emitter.service.ServiceMetricEvent; - import io.druid.common.utils.VMUtils; + import java.io.IOException; -import java.lang.management.ManagementFactory; -import java.lang.management.ThreadMXBean; import java.util.Map; import java.util.concurrent.atomic.AtomicLong; diff --git a/processing/src/main/java/io/druid/query/IntervalChunkingQueryRunnerDecorator.java b/processing/src/main/java/io/druid/query/IntervalChunkingQueryRunnerDecorator.java index 31ba68b5c2f..3dfa530aa08 100644 --- a/processing/src/main/java/io/druid/query/IntervalChunkingQueryRunnerDecorator.java +++ b/processing/src/main/java/io/druid/query/IntervalChunkingQueryRunnerDecorator.java @@ -19,13 +19,12 @@ package io.druid.query; +import com.google.inject.Inject; +import com.metamx.emitter.service.ServiceEmitter; import io.druid.guice.annotations.Processing; import java.util.concurrent.ExecutorService; -import com.google.inject.Inject; -import com.metamx.emitter.service.ServiceEmitter; - public class IntervalChunkingQueryRunnerDecorator { private final ExecutorService executor; diff --git a/processing/src/main/java/io/druid/query/MetricsEmittingQueryRunner.java b/processing/src/main/java/io/druid/query/MetricsEmittingQueryRunner.java index 0bc93f52dab..d13b3c62296 100644 --- a/processing/src/main/java/io/druid/query/MetricsEmittingQueryRunner.java +++ b/processing/src/main/java/io/druid/query/MetricsEmittingQueryRunner.java @@ -19,7 +19,6 @@ package io.druid.query; import com.google.common.base.Function; import com.google.common.base.Strings; -import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.metamx.common.guava.Accumulator; import com.metamx.common.guava.Sequence; @@ -29,7 +28,6 @@ import com.metamx.emitter.service.ServiceEmitter; import com.metamx.emitter.service.ServiceMetricEvent; import java.io.IOException; -import java.util.List; import java.util.Map; /** diff --git a/processing/src/main/java/io/druid/query/Query.java b/processing/src/main/java/io/druid/query/Query.java index f5981d6e033..06399123ead 100644 --- a/processing/src/main/java/io/druid/query/Query.java +++ b/processing/src/main/java/io/druid/query/Query.java @@ -20,8 +20,8 @@ package io.druid.query; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.metamx.common.guava.Sequence; -import io.druid.query.groupby.GroupByQuery; import io.druid.query.datasourcemetadata.DataSourceMetadataQuery; +import io.druid.query.groupby.GroupByQuery; import io.druid.query.metadata.metadata.SegmentMetadataQuery; import io.druid.query.search.search.SearchQuery; import io.druid.query.select.SelectQuery; diff --git a/processing/src/main/java/io/druid/query/groupby/GroupByQueryRunnerFactory.java b/processing/src/main/java/io/druid/query/groupby/GroupByQueryRunnerFactory.java index 8676200d708..23e4e7cc1d7 100644 --- a/processing/src/main/java/io/druid/query/groupby/GroupByQueryRunnerFactory.java +++ b/processing/src/main/java/io/druid/query/groupby/GroupByQueryRunnerFactory.java @@ -48,7 +48,6 @@ import io.druid.segment.StorageAdapter; import io.druid.segment.incremental.IncrementalIndex; import java.nio.ByteBuffer; -import java.util.List; import java.util.Map; import java.util.Queue; import java.util.concurrent.CancellationException; diff --git a/processing/src/main/java/io/druid/query/metadata/SegmentAnalyzer.java b/processing/src/main/java/io/druid/query/metadata/SegmentAnalyzer.java index e086cb9a2d8..250121a0aca 100644 --- a/processing/src/main/java/io/druid/query/metadata/SegmentAnalyzer.java +++ b/processing/src/main/java/io/druid/query/metadata/SegmentAnalyzer.java @@ -23,8 +23,8 @@ import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.primitives.Longs; -import com.metamx.common.logger.Logger; import com.metamx.common.StringUtils; +import com.metamx.common.logger.Logger; import io.druid.query.metadata.metadata.ColumnAnalysis; import io.druid.query.metadata.metadata.SegmentMetadataQuery; import io.druid.segment.QueryableIndex; diff --git a/processing/src/main/java/io/druid/query/metadata/SegmentMetadataQueryQueryToolChest.java b/processing/src/main/java/io/druid/query/metadata/SegmentMetadataQueryQueryToolChest.java index 015375c7931..ec9f7977359 100644 --- a/processing/src/main/java/io/druid/query/metadata/SegmentMetadataQueryQueryToolChest.java +++ b/processing/src/main/java/io/druid/query/metadata/SegmentMetadataQueryQueryToolChest.java @@ -27,7 +27,6 @@ import com.google.common.collect.Maps; import com.google.common.collect.Ordering; import com.google.common.collect.Sets; import com.google.inject.Inject; -import com.metamx.common.ISE; import com.metamx.common.guava.MergeSequence; import com.metamx.common.guava.Sequence; import com.metamx.common.guava.nary.BinaryFn; @@ -35,8 +34,8 @@ import com.metamx.emitter.service.ServiceMetricEvent; import io.druid.collections.OrderedMergeSequence; import io.druid.common.utils.JodaUtils; import io.druid.query.CacheStrategy; -import io.druid.query.Query; import io.druid.query.DruidMetrics; +import io.druid.query.Query; import io.druid.query.QueryRunner; import io.druid.query.QueryToolChest; import io.druid.query.ResultMergeQueryRunner; diff --git a/processing/src/main/java/io/druid/query/search/SearchQueryRunner.java b/processing/src/main/java/io/druid/query/search/SearchQueryRunner.java index 22443f726f3..647b076c67a 100644 --- a/processing/src/main/java/io/druid/query/search/SearchQueryRunner.java +++ b/processing/src/main/java/io/druid/query/search/SearchQueryRunner.java @@ -17,8 +17,6 @@ package io.druid.query.search; -import com.google.common.base.Function; -import com.google.common.base.Functions; import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; @@ -56,7 +54,6 @@ import io.druid.segment.column.Column; import io.druid.segment.data.IndexedInts; import io.druid.segment.filter.Filters; -import javax.annotation.Nullable; import java.util.Arrays; import java.util.List; import java.util.Map; diff --git a/processing/src/main/java/io/druid/query/search/search/SearchQuery.java b/processing/src/main/java/io/druid/query/search/search/SearchQuery.java index 4f969f60143..3cc12682727 100644 --- a/processing/src/main/java/io/druid/query/search/search/SearchQuery.java +++ b/processing/src/main/java/io/druid/query/search/search/SearchQuery.java @@ -19,9 +19,7 @@ package io.druid.query.search.search; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.google.common.base.Function; import com.google.common.base.Preconditions; -import com.google.common.collect.Lists; import io.druid.granularity.QueryGranularity; import io.druid.query.BaseQuery; import io.druid.query.DataSource; @@ -32,7 +30,6 @@ import io.druid.query.filter.DimFilter; import io.druid.query.search.SearchResultValue; import io.druid.query.spec.QuerySegmentSpec; -import javax.annotation.Nullable; import java.util.List; import java.util.Map; diff --git a/processing/src/main/java/io/druid/query/select/SelectQuery.java b/processing/src/main/java/io/druid/query/select/SelectQuery.java index ff21a9b5821..01c57fd9e8d 100644 --- a/processing/src/main/java/io/druid/query/select/SelectQuery.java +++ b/processing/src/main/java/io/druid/query/select/SelectQuery.java @@ -17,10 +17,10 @@ package io.druid.query.select; -import com.google.common.base.Preconditions; 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 io.druid.granularity.QueryGranularity; import io.druid.query.BaseQuery; import io.druid.query.DataSource; diff --git a/processing/src/main/java/io/druid/query/select/SelectQueryQueryToolChest.java b/processing/src/main/java/io/druid/query/select/SelectQueryQueryToolChest.java index 986df658f28..1fbe5370836 100644 --- a/processing/src/main/java/io/druid/query/select/SelectQueryQueryToolChest.java +++ b/processing/src/main/java/io/druid/query/select/SelectQueryQueryToolChest.java @@ -24,17 +24,17 @@ import com.google.common.base.Functions; import com.google.common.collect.Ordering; import com.google.common.collect.Sets; import com.google.inject.Inject; +import com.metamx.common.StringUtils; import com.metamx.common.guava.MergeSequence; import com.metamx.common.guava.Sequence; import com.metamx.common.guava.nary.BinaryFn; -import com.metamx.common.StringUtils; import com.metamx.emitter.service.ServiceMetricEvent; import io.druid.collections.OrderedMergeSequence; import io.druid.granularity.QueryGranularity; import io.druid.query.CacheStrategy; +import io.druid.query.DruidMetrics; import io.druid.query.IntervalChunkingQueryRunnerDecorator; import io.druid.query.Query; -import io.druid.query.DruidMetrics; import io.druid.query.QueryRunner; import io.druid.query.QueryToolChest; import io.druid.query.Result; diff --git a/processing/src/main/java/io/druid/query/timeseries/TimeseriesQueryQueryToolChest.java b/processing/src/main/java/io/druid/query/timeseries/TimeseriesQueryQueryToolChest.java index f77847c60ef..c749597e1aa 100644 --- a/processing/src/main/java/io/druid/query/timeseries/TimeseriesQueryQueryToolChest.java +++ b/processing/src/main/java/io/druid/query/timeseries/TimeseriesQueryQueryToolChest.java @@ -30,10 +30,10 @@ import com.metamx.emitter.service.ServiceMetricEvent; import io.druid.collections.OrderedMergeSequence; import io.druid.granularity.QueryGranularity; import io.druid.query.CacheStrategy; +import io.druid.query.DruidMetrics; import io.druid.query.IntervalChunkingQueryRunnerDecorator; import io.druid.query.Query; import io.druid.query.QueryCacheHelper; -import io.druid.query.DruidMetrics; import io.druid.query.QueryRunner; import io.druid.query.QueryToolChest; import io.druid.query.Result; diff --git a/processing/src/main/java/io/druid/query/topn/TimeExtractionTopNAlgorithm.java b/processing/src/main/java/io/druid/query/topn/TimeExtractionTopNAlgorithm.java index 3833c8b1f93..d518dcf09fa 100644 --- a/processing/src/main/java/io/druid/query/topn/TimeExtractionTopNAlgorithm.java +++ b/processing/src/main/java/io/druid/query/topn/TimeExtractionTopNAlgorithm.java @@ -21,12 +21,9 @@ package io.druid.query.topn; import com.google.common.collect.Maps; import io.druid.query.aggregation.Aggregator; -import io.druid.query.extraction.ExtractionFn; import io.druid.segment.Capabilities; import io.druid.segment.Cursor; import io.druid.segment.DimensionSelector; -import io.druid.segment.LongColumnSelector; -import io.druid.segment.column.Column; import java.util.Map; diff --git a/processing/src/main/java/io/druid/query/topn/TopNLexicographicResultBuilder.java b/processing/src/main/java/io/druid/query/topn/TopNLexicographicResultBuilder.java index dbd20d321a6..beccaae3df1 100644 --- a/processing/src/main/java/io/druid/query/topn/TopNLexicographicResultBuilder.java +++ b/processing/src/main/java/io/druid/query/topn/TopNLexicographicResultBuilder.java @@ -23,14 +23,14 @@ import com.google.common.collect.Maps; import io.druid.query.Result; import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.dimension.DimensionSpec; -import java.util.Arrays; -import java.util.PriorityQueue; import org.joda.time.DateTime; +import java.util.Arrays; import java.util.Comparator; import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.PriorityQueue; /** */ diff --git a/processing/src/main/java/io/druid/query/topn/TopNMapFn.java b/processing/src/main/java/io/druid/query/topn/TopNMapFn.java index 9708f900cf9..e6be09e1a17 100644 --- a/processing/src/main/java/io/druid/query/topn/TopNMapFn.java +++ b/processing/src/main/java/io/druid/query/topn/TopNMapFn.java @@ -19,7 +19,6 @@ package io.druid.query.topn; import com.google.common.base.Function; import io.druid.query.Result; -import io.druid.query.extraction.ExtractionFn; import io.druid.segment.Cursor; import io.druid.segment.DimensionSelector; diff --git a/processing/src/main/java/io/druid/query/topn/TopNQueryQueryToolChest.java b/processing/src/main/java/io/druid/query/topn/TopNQueryQueryToolChest.java index 5d6b3e3974d..51ca2d4bece 100644 --- a/processing/src/main/java/io/druid/query/topn/TopNQueryQueryToolChest.java +++ b/processing/src/main/java/io/druid/query/topn/TopNQueryQueryToolChest.java @@ -35,10 +35,10 @@ import io.druid.collections.OrderedMergeSequence; import io.druid.granularity.QueryGranularity; import io.druid.query.BySegmentResultValue; import io.druid.query.CacheStrategy; +import io.druid.query.DruidMetrics; import io.druid.query.IntervalChunkingQueryRunnerDecorator; import io.druid.query.Query; import io.druid.query.QueryCacheHelper; -import io.druid.query.DruidMetrics; import io.druid.query.QueryRunner; import io.druid.query.QueryToolChest; import io.druid.query.Result; @@ -50,7 +50,6 @@ import io.druid.query.aggregation.MetricManipulationFn; import io.druid.query.aggregation.PostAggregator; import io.druid.query.dimension.DefaultDimensionSpec; import io.druid.query.dimension.DimensionSpec; -import io.druid.query.extraction.ExtractionFn; import io.druid.query.filter.DimFilter; import org.joda.time.DateTime; diff --git a/processing/src/main/java/io/druid/segment/Rowboat.java b/processing/src/main/java/io/druid/segment/Rowboat.java index 7498f9bb13e..8139ecf9300 100644 --- a/processing/src/main/java/io/druid/segment/Rowboat.java +++ b/processing/src/main/java/io/druid/segment/Rowboat.java @@ -17,19 +17,13 @@ package io.druid.segment; -import com.google.common.base.Function; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; import com.google.common.primitives.Ints; import com.google.common.primitives.Longs; import org.joda.time.DateTime; -import javax.annotation.Nullable; -import java.util.ArrayList; import java.util.Arrays; -import java.util.List; import java.util.Map; import java.util.TreeSet; diff --git a/processing/src/test/java/io/druid/query/AsyncQueryRunnerTest.java b/processing/src/test/java/io/druid/query/AsyncQueryRunnerTest.java index d3b9b4c0968..79335246550 100644 --- a/processing/src/test/java/io/druid/query/AsyncQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/AsyncQueryRunnerTest.java @@ -19,8 +19,17 @@ package io.druid.query; +import com.google.common.base.Throwables; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Lists; +import com.google.common.util.concurrent.ListenableFuture; +import com.metamx.common.guava.Sequence; +import com.metamx.common.guava.Sequences; import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.aggregation.CountAggregatorFactory; +import org.easymock.EasyMock; +import org.junit.Assert; +import org.junit.Test; import java.util.Collections; import java.util.Map; @@ -29,17 +38,6 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeoutException; -import org.easymock.EasyMock; -import org.junit.Assert; -import org.junit.Test; - -import com.google.common.base.Throwables; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.Lists; -import com.google.common.util.concurrent.ListenableFuture; -import com.metamx.common.guava.Sequence; -import com.metamx.common.guava.Sequences; - public class AsyncQueryRunnerTest { @@ -132,4 +130,4 @@ public class AsyncQueryRunnerTest asyncRunner.run(query, Collections.EMPTY_MAP); EasyMock.verify(mock); } -} \ No newline at end of file +} diff --git a/processing/src/test/java/io/druid/query/ChainedExecutionQueryRunnerTest.java b/processing/src/test/java/io/druid/query/ChainedExecutionQueryRunnerTest.java index dde97d45760..da768eeab29 100644 --- a/processing/src/test/java/io/druid/query/ChainedExecutionQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/ChainedExecutionQueryRunnerTest.java @@ -22,7 +22,6 @@ import com.google.common.collect.Lists; import com.google.common.collect.Ordering; import com.google.common.collect.Sets; import com.google.common.util.concurrent.ListenableFuture; -import com.metamx.common.concurrent.ExecutorServiceConfig; import com.metamx.common.guava.Sequence; import com.metamx.common.guava.Sequences; import com.metamx.common.lifecycle.Lifecycle; diff --git a/processing/src/test/java/io/druid/query/IntervalChunkingQueryRunnerTest.java b/processing/src/test/java/io/druid/query/IntervalChunkingQueryRunnerTest.java index 821233e6c8c..933d2195281 100644 --- a/processing/src/test/java/io/druid/query/IntervalChunkingQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/IntervalChunkingQueryRunnerTest.java @@ -19,21 +19,19 @@ package io.druid.query; -import io.druid.query.Druids.TimeseriesQueryBuilder; -import io.druid.query.aggregation.AggregatorFactory; -import io.druid.query.aggregation.CountAggregatorFactory; - -import java.util.Collections; -import java.util.concurrent.ExecutorService; - -import org.easymock.EasyMock; -import org.junit.Before; -import org.junit.Test; - import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import com.metamx.common.guava.Sequences; import com.metamx.emitter.service.ServiceEmitter; +import io.druid.query.Druids.TimeseriesQueryBuilder; +import io.druid.query.aggregation.AggregatorFactory; +import io.druid.query.aggregation.CountAggregatorFactory; +import org.easymock.EasyMock; +import org.junit.Before; +import org.junit.Test; + +import java.util.Collections; +import java.util.concurrent.ExecutorService; public class IntervalChunkingQueryRunnerTest { diff --git a/processing/src/test/java/io/druid/query/TestQueryRunners.java b/processing/src/test/java/io/druid/query/TestQueryRunners.java index 02ee18db30c..aad50e8b9ae 100644 --- a/processing/src/test/java/io/druid/query/TestQueryRunners.java +++ b/processing/src/test/java/io/druid/query/TestQueryRunners.java @@ -21,17 +21,14 @@ import com.google.common.base.Supplier; import io.druid.collections.StupidPool; import io.druid.query.search.SearchQueryQueryToolChest; import io.druid.query.search.SearchQueryRunnerFactory; -import io.druid.query.search.SearchResultValue; import io.druid.query.search.search.SearchQueryConfig; import io.druid.query.timeboundary.TimeBoundaryQueryRunnerFactory; import io.druid.query.timeseries.TimeseriesQueryEngine; import io.druid.query.timeseries.TimeseriesQueryQueryToolChest; import io.druid.query.timeseries.TimeseriesQueryRunnerFactory; -import io.druid.query.timeseries.TimeseriesResultValue; import io.druid.query.topn.TopNQueryConfig; import io.druid.query.topn.TopNQueryQueryToolChest; import io.druid.query.topn.TopNQueryRunnerFactory; -import io.druid.query.topn.TopNResultValue; import io.druid.segment.Segment; import java.nio.ByteBuffer; diff --git a/processing/src/test/java/io/druid/query/UnionQueryRunnerTest.java b/processing/src/test/java/io/druid/query/UnionQueryRunnerTest.java index 0cb24e6124b..4a5a9368e06 100644 --- a/processing/src/test/java/io/druid/query/UnionQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/UnionQueryRunnerTest.java @@ -23,11 +23,12 @@ import com.google.common.collect.Maps; import com.metamx.common.guava.Sequence; import com.metamx.common.guava.Sequences; import io.druid.query.timeseries.TimeseriesQueryQueryToolChest; +import junit.framework.Assert; +import org.junit.Test; + import java.util.Arrays; import java.util.List; import java.util.Map; -import junit.framework.Assert; -import org.junit.Test; public class UnionQueryRunnerTest { diff --git a/processing/src/test/java/io/druid/query/aggregation/post/ArithmeticPostAggregatorTest.java b/processing/src/test/java/io/druid/query/aggregation/post/ArithmeticPostAggregatorTest.java index c87aa944a96..a005737d352 100644 --- a/processing/src/test/java/io/druid/query/aggregation/post/ArithmeticPostAggregatorTest.java +++ b/processing/src/test/java/io/druid/query/aggregation/post/ArithmeticPostAggregatorTest.java @@ -21,12 +21,10 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import io.druid.query.aggregation.CountAggregator; -import io.druid.query.aggregation.DoubleSumAggregator; import io.druid.query.aggregation.PostAggregator; import org.junit.Assert; import org.junit.Test; -import java.util.Arrays; import java.util.Comparator; import java.util.HashMap; import java.util.List; diff --git a/processing/src/test/java/io/druid/query/extraction/JavascriptExtractionFnTest.java b/processing/src/test/java/io/druid/query/extraction/JavascriptExtractionFnTest.java index 4d4efb39a05..a6ba59a500c 100644 --- a/processing/src/test/java/io/druid/query/extraction/JavascriptExtractionFnTest.java +++ b/processing/src/test/java/io/druid/query/extraction/JavascriptExtractionFnTest.java @@ -21,8 +21,6 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.Iterators; import com.google.common.collect.Lists; import io.druid.jackson.DefaultObjectMapper; -import io.druid.query.extraction.ExtractionFn; -import io.druid.query.extraction.JavascriptExtractionFn; import org.joda.time.DateTime; import org.junit.Assert; import org.junit.Test; diff --git a/processing/src/test/java/io/druid/query/extraction/MatchingDimExtractionFnTest.java b/processing/src/test/java/io/druid/query/extraction/MatchingDimExtractionFnTest.java index 83e5affb750..1c2d48567f1 100644 --- a/processing/src/test/java/io/druid/query/extraction/MatchingDimExtractionFnTest.java +++ b/processing/src/test/java/io/druid/query/extraction/MatchingDimExtractionFnTest.java @@ -20,8 +20,6 @@ package io.druid.query.extraction; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.Sets; import io.druid.jackson.DefaultObjectMapper; -import io.druid.query.extraction.ExtractionFn; -import io.druid.query.extraction.MatchingDimExtractionFn; import org.junit.Assert; import org.junit.Test; diff --git a/processing/src/test/java/io/druid/query/extraction/RegexDimExtractionFnTest.java b/processing/src/test/java/io/druid/query/extraction/RegexDimExtractionFnTest.java index 3da70ba3f53..250d8a11cdf 100644 --- a/processing/src/test/java/io/druid/query/extraction/RegexDimExtractionFnTest.java +++ b/processing/src/test/java/io/druid/query/extraction/RegexDimExtractionFnTest.java @@ -20,8 +20,6 @@ package io.druid.query.extraction; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.Sets; import io.druid.jackson.DefaultObjectMapper; -import io.druid.query.extraction.ExtractionFn; -import io.druid.query.extraction.RegexDimExtractionFn; import org.junit.Assert; import org.junit.Test; diff --git a/processing/src/test/java/io/druid/query/extraction/SearchQuerySpecDimExtractionFnTest.java b/processing/src/test/java/io/druid/query/extraction/SearchQuerySpecDimExtractionFnTest.java index 9f2540db8b8..218d4ee479d 100644 --- a/processing/src/test/java/io/druid/query/extraction/SearchQuerySpecDimExtractionFnTest.java +++ b/processing/src/test/java/io/druid/query/extraction/SearchQuerySpecDimExtractionFnTest.java @@ -18,8 +18,6 @@ package io.druid.query.extraction; import com.google.common.collect.Sets; -import io.druid.query.extraction.ExtractionFn; -import io.druid.query.extraction.SearchQuerySpecDimExtractionFn; import io.druid.query.search.search.FragmentSearchQuerySpec; import io.druid.query.search.search.SearchQuerySpec; import org.junit.Assert; diff --git a/processing/src/test/java/io/druid/query/extraction/TimeDimExtractionFnTest.java b/processing/src/test/java/io/druid/query/extraction/TimeDimExtractionFnTest.java index e65a4972e04..1f136e5d480 100644 --- a/processing/src/test/java/io/druid/query/extraction/TimeDimExtractionFnTest.java +++ b/processing/src/test/java/io/druid/query/extraction/TimeDimExtractionFnTest.java @@ -20,9 +20,6 @@ package io.druid.query.extraction; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.Sets; import io.druid.jackson.DefaultObjectMapper; -import io.druid.query.extraction.ExtractionFn; -import io.druid.query.extraction.MatchingDimExtractionFn; -import io.druid.query.extraction.TimeDimExtractionFn; import org.junit.Assert; import org.junit.Test; diff --git a/processing/src/test/java/io/druid/query/groupby/GroupByQueryRunnerTest.java b/processing/src/test/java/io/druid/query/groupby/GroupByQueryRunnerTest.java index dfb7cde7bd4..725037bd40a 100644 --- a/processing/src/test/java/io/druid/query/groupby/GroupByQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/groupby/GroupByQueryRunnerTest.java @@ -94,7 +94,6 @@ import org.junit.runners.Parameterized; import javax.annotation.Nullable; import java.io.IOException; import java.nio.ByteBuffer; -import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Comparator; diff --git a/processing/src/test/java/io/druid/query/groupby/GroupByTimeseriesQueryRunnerTest.java b/processing/src/test/java/io/druid/query/groupby/GroupByTimeseriesQueryRunnerTest.java index 817babd0bed..cea90e0c532 100644 --- a/processing/src/test/java/io/druid/query/groupby/GroupByTimeseriesQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/groupby/GroupByTimeseriesQueryRunnerTest.java @@ -18,7 +18,6 @@ package io.druid.query.groupby; import com.google.common.base.Function; -import com.google.common.base.Preconditions; import com.google.common.base.Supplier; import com.google.common.base.Suppliers; import com.google.common.collect.Lists; @@ -42,9 +41,6 @@ import org.junit.runners.Parameterized; import javax.annotation.Nullable; import java.io.IOException; import java.nio.ByteBuffer; -import java.util.Arrays; -import java.util.Collection; -import java.util.List; import java.util.Map; /** diff --git a/processing/src/test/java/io/druid/query/metadata/SegmentAnalyzerTest.java b/processing/src/test/java/io/druid/query/metadata/SegmentAnalyzerTest.java index 3807bc688ed..e5056eebcf1 100644 --- a/processing/src/test/java/io/druid/query/metadata/SegmentAnalyzerTest.java +++ b/processing/src/test/java/io/druid/query/metadata/SegmentAnalyzerTest.java @@ -17,11 +17,9 @@ package io.druid.query.metadata; -import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.metamx.common.guava.Sequences; import io.druid.query.LegacyDataSource; -import io.druid.query.Query; import io.druid.query.QueryRunner; import io.druid.query.QueryRunnerFactory; import io.druid.query.QueryRunnerTestHelper; @@ -34,7 +32,6 @@ import io.druid.segment.QueryableIndexSegment; import io.druid.segment.Segment; import io.druid.segment.TestIndex; import io.druid.segment.column.ValueType; -import org.joda.time.Interval; import org.junit.Assert; import org.junit.Test; diff --git a/processing/src/test/java/io/druid/query/metadata/SegmentMetadataQueryQueryToolChestTest.java b/processing/src/test/java/io/druid/query/metadata/SegmentMetadataQueryQueryToolChestTest.java index 1de554a69d7..7547fe4c35a 100644 --- a/processing/src/test/java/io/druid/query/metadata/SegmentMetadataQueryQueryToolChestTest.java +++ b/processing/src/test/java/io/druid/query/metadata/SegmentMetadataQueryQueryToolChestTest.java @@ -25,7 +25,6 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.druid.jackson.DefaultObjectMapper; import io.druid.query.CacheStrategy; - import io.druid.query.TableDataSource; import io.druid.query.metadata.metadata.ColumnAnalysis; import io.druid.query.metadata.metadata.SegmentAnalysis; diff --git a/processing/src/test/java/io/druid/query/search/SearchQueryRunnerWithCaseTest.java b/processing/src/test/java/io/druid/query/search/SearchQueryRunnerWithCaseTest.java index 50c5e36b04b..f21e16916c0 100644 --- a/processing/src/test/java/io/druid/query/search/SearchQueryRunnerWithCaseTest.java +++ b/processing/src/test/java/io/druid/query/search/SearchQueryRunnerWithCaseTest.java @@ -46,7 +46,17 @@ import java.util.List; import java.util.Map; import java.util.Set; -import static io.druid.query.QueryRunnerTestHelper.*; +import static io.druid.query.QueryRunnerTestHelper.NOOP_QUERYWATCHER; +import static io.druid.query.QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator; +import static io.druid.query.QueryRunnerTestHelper.allGran; +import static io.druid.query.QueryRunnerTestHelper.dataSource; +import static io.druid.query.QueryRunnerTestHelper.fullOnInterval; +import static io.druid.query.QueryRunnerTestHelper.makeQueryRunner; +import static io.druid.query.QueryRunnerTestHelper.marketDimension; +import static io.druid.query.QueryRunnerTestHelper.placementDimension; +import static io.druid.query.QueryRunnerTestHelper.placementishDimension; +import static io.druid.query.QueryRunnerTestHelper.qualityDimension; +import static io.druid.query.QueryRunnerTestHelper.transformToConstructionFeeder; /** */ diff --git a/processing/src/test/java/io/druid/query/select/SelectQueryRunnerTest.java b/processing/src/test/java/io/druid/query/select/SelectQueryRunnerTest.java index bf8d88db8ba..f6e790d582d 100644 --- a/processing/src/test/java/io/druid/query/select/SelectQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/select/SelectQueryRunnerTest.java @@ -40,7 +40,6 @@ import org.junit.runners.Parameterized; import java.io.IOException; import java.util.Arrays; -import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.List; diff --git a/processing/src/test/java/io/druid/query/timeboundary/TimeBoundaryQueryRunnerTest.java b/processing/src/test/java/io/druid/query/timeboundary/TimeBoundaryQueryRunnerTest.java index 5a96a4f280a..964d536919a 100644 --- a/processing/src/test/java/io/druid/query/timeboundary/TimeBoundaryQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/timeboundary/TimeBoundaryQueryRunnerTest.java @@ -34,7 +34,6 @@ import org.junit.runners.Parameterized; import java.io.IOException; import java.util.Arrays; -import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/processing/src/test/java/io/druid/query/timeseries/TimeseriesQueryRunnerTest.java b/processing/src/test/java/io/druid/query/timeseries/TimeseriesQueryRunnerTest.java index bfc868b4ea3..2b18b8eb1f2 100644 --- a/processing/src/test/java/io/druid/query/timeseries/TimeseriesQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/timeseries/TimeseriesQueryRunnerTest.java @@ -30,10 +30,10 @@ import io.druid.query.QueryRunnerTestHelper; import io.druid.query.Result; import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.aggregation.CountAggregatorFactory; -import io.druid.query.aggregation.FilteredAggregatorFactory; -import io.druid.query.aggregation.LongSumAggregatorFactory; import io.druid.query.aggregation.DoubleMaxAggregatorFactory; import io.druid.query.aggregation.DoubleMinAggregatorFactory; +import io.druid.query.aggregation.FilteredAggregatorFactory; +import io.druid.query.aggregation.LongSumAggregatorFactory; import io.druid.query.aggregation.PostAggregator; import io.druid.query.filter.AndDimFilter; import io.druid.query.filter.DimFilter; diff --git a/processing/src/test/java/io/druid/query/topn/TopNUnionQueryTest.java b/processing/src/test/java/io/druid/query/topn/TopNUnionQueryTest.java index 4daa9efd119..2baf2b2a2ca 100644 --- a/processing/src/test/java/io/druid/query/topn/TopNUnionQueryTest.java +++ b/processing/src/test/java/io/druid/query/topn/TopNUnionQueryTest.java @@ -27,8 +27,8 @@ import io.druid.query.QueryRunnerTestHelper; import io.druid.query.Result; import io.druid.query.TestQueryRunners; import io.druid.query.aggregation.AggregatorFactory; -import io.druid.query.aggregation.DoubleMinAggregatorFactory; import io.druid.query.aggregation.DoubleMaxAggregatorFactory; +import io.druid.query.aggregation.DoubleMinAggregatorFactory; import io.druid.query.aggregation.PostAggregator; import io.druid.segment.TestHelper; import org.joda.time.DateTime; diff --git a/processing/src/test/java/io/druid/segment/AppendTest.java b/processing/src/test/java/io/druid/segment/AppendTest.java index d604b3fcd94..2a6afec8b54 100644 --- a/processing/src/test/java/io/druid/segment/AppendTest.java +++ b/processing/src/test/java/io/druid/segment/AppendTest.java @@ -29,8 +29,8 @@ import io.druid.query.TestQueryRunners; import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.aggregation.CountAggregatorFactory; import io.druid.query.aggregation.DoubleMaxAggregatorFactory; -import io.druid.query.aggregation.DoubleSumAggregatorFactory; import io.druid.query.aggregation.DoubleMinAggregatorFactory; +import io.druid.query.aggregation.DoubleSumAggregatorFactory; import io.druid.query.aggregation.PostAggregator; import io.druid.query.aggregation.hyperloglog.HyperUniquesAggregatorFactory; import io.druid.query.aggregation.post.ArithmeticPostAggregator; diff --git a/processing/src/test/java/io/druid/segment/CloserRule.java b/processing/src/test/java/io/druid/segment/CloserRule.java index 4d7340b51af..35d0bc01971 100644 --- a/processing/src/test/java/io/druid/segment/CloserRule.java +++ b/processing/src/test/java/io/druid/segment/CloserRule.java @@ -24,7 +24,6 @@ import org.junit.rules.TestRule; import org.junit.runner.Description; import org.junit.runners.model.Statement; -import java.io.Closeable; import java.io.IOException; import java.util.LinkedList; import java.util.List; diff --git a/processing/src/test/java/io/druid/segment/IndexSpecTest.java b/processing/src/test/java/io/druid/segment/IndexSpecTest.java index 7657949a76a..bfcb867827e 100644 --- a/processing/src/test/java/io/druid/segment/IndexSpecTest.java +++ b/processing/src/test/java/io/druid/segment/IndexSpecTest.java @@ -22,7 +22,6 @@ package io.druid.segment; import com.fasterxml.jackson.databind.ObjectMapper; import io.druid.jackson.DefaultObjectMapper; import io.druid.segment.data.CompressedObjectStrategy; -import io.druid.segment.data.ConciseBitmapSerdeFactory; import io.druid.segment.data.RoaringBitmapSerdeFactory; import org.junit.Assert; import org.junit.Test; diff --git a/processing/src/test/java/io/druid/segment/SchemalessTestFull.java b/processing/src/test/java/io/druid/segment/SchemalessTestFull.java index 70a38ddbcab..4ad2f741997 100644 --- a/processing/src/test/java/io/druid/segment/SchemalessTestFull.java +++ b/processing/src/test/java/io/druid/segment/SchemalessTestFull.java @@ -29,9 +29,9 @@ import io.druid.query.Result; import io.druid.query.TestQueryRunners; import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.aggregation.CountAggregatorFactory; +import io.druid.query.aggregation.DoubleMaxAggregatorFactory; import io.druid.query.aggregation.DoubleMinAggregatorFactory; import io.druid.query.aggregation.DoubleSumAggregatorFactory; -import io.druid.query.aggregation.DoubleMaxAggregatorFactory; import io.druid.query.aggregation.PostAggregator; import io.druid.query.aggregation.hyperloglog.HyperUniquesAggregatorFactory; import io.druid.query.aggregation.post.ArithmeticPostAggregator; diff --git a/server/src/main/java/io/druid/client/BrokerServerView.java b/server/src/main/java/io/druid/client/BrokerServerView.java index 706e7ee652d..c69daa5d8fb 100644 --- a/server/src/main/java/io/druid/client/BrokerServerView.java +++ b/server/src/main/java/io/druid/client/BrokerServerView.java @@ -18,7 +18,6 @@ package io.druid.client; import com.fasterxml.jackson.databind.ObjectMapper; -import com.google.common.base.Function; import com.google.common.collect.Iterables; import com.google.common.collect.Maps; import com.google.common.collect.Ordering; @@ -38,12 +37,10 @@ import io.druid.query.QueryToolChestWarehouse; import io.druid.query.QueryWatcher; import io.druid.server.coordination.DruidServerMetadata; import io.druid.timeline.DataSegment; -import io.druid.timeline.TimelineLookup; import io.druid.timeline.VersionedIntervalTimeline; import io.druid.timeline.partition.PartitionChunk; import java.util.Iterator; -import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.Executor; diff --git a/server/src/main/java/io/druid/client/ServerInventoryView.java b/server/src/main/java/io/druid/client/ServerInventoryView.java index fea060d5bce..a13f6634c4b 100644 --- a/server/src/main/java/io/druid/client/ServerInventoryView.java +++ b/server/src/main/java/io/druid/client/ServerInventoryView.java @@ -24,9 +24,9 @@ import com.google.common.base.Charsets; import com.google.common.base.Function; import com.google.common.base.Throwables; import com.google.common.collect.MapMaker; +import com.metamx.common.StringUtils; import com.metamx.common.lifecycle.LifecycleStart; import com.metamx.common.lifecycle.LifecycleStop; -import com.metamx.common.StringUtils; import com.metamx.emitter.EmittingLogger; import io.druid.concurrent.Execs; import io.druid.curator.inventory.CuratorInventoryManager; diff --git a/server/src/main/java/io/druid/client/cache/Cache.java b/server/src/main/java/io/druid/client/cache/Cache.java index 4462b75aa61..70181b1ab58 100644 --- a/server/src/main/java/io/druid/client/cache/Cache.java +++ b/server/src/main/java/io/druid/client/cache/Cache.java @@ -30,8 +30,8 @@ import java.util.Map; */ public interface Cache { - public byte[] get(NamedKey key); - public void put(NamedKey key, byte[] value); + byte[] get(NamedKey key); + void put(NamedKey key, byte[] value); /** * Resulting map should not contain any null values (i.e. cache misses should not be included) @@ -39,21 +39,21 @@ public interface Cache * @param keys * @return */ - public Map getBulk(Iterable keys); + Map getBulk(Iterable keys); - public void close(String namespace); + void close(String namespace); - public CacheStats getStats(); + CacheStats getStats(); - public boolean isLocal(); + boolean isLocal(); /** * Custom metrics not covered by CacheStats may be emitted by this method. * @param emitter The service emitter to emit on. */ - public void doMonitor(ServiceEmitter emitter); + void doMonitor(ServiceEmitter emitter); - public class NamedKey + class NamedKey { final public String namespace; final public byte[] key; diff --git a/server/src/main/java/io/druid/client/cache/LZ4Transcoder.java b/server/src/main/java/io/druid/client/cache/LZ4Transcoder.java index b23ff9e51f1..6680990825b 100644 --- a/server/src/main/java/io/druid/client/cache/LZ4Transcoder.java +++ b/server/src/main/java/io/druid/client/cache/LZ4Transcoder.java @@ -19,7 +19,6 @@ package io.druid.client.cache; import com.google.common.primitives.Ints; import net.jpountz.lz4.LZ4Compressor; -import net.jpountz.lz4.LZ4Decompressor; import net.jpountz.lz4.LZ4Factory; import net.jpountz.lz4.LZ4FastDecompressor; import net.spy.memcached.transcoders.SerializingTranscoder; diff --git a/server/src/main/java/io/druid/curator/CuratorConfig.java b/server/src/main/java/io/druid/curator/CuratorConfig.java index 4270a61e52a..b3bf5dd1c80 100644 --- a/server/src/main/java/io/druid/curator/CuratorConfig.java +++ b/server/src/main/java/io/druid/curator/CuratorConfig.java @@ -18,6 +18,7 @@ package io.druid.curator; import com.fasterxml.jackson.annotation.JsonProperty; + import javax.validation.constraints.Min; /** diff --git a/server/src/main/java/io/druid/guice/QueryRunnerFactoryModule.java b/server/src/main/java/io/druid/guice/QueryRunnerFactoryModule.java index d963108a418..81400a67f4a 100644 --- a/server/src/main/java/io/druid/guice/QueryRunnerFactoryModule.java +++ b/server/src/main/java/io/druid/guice/QueryRunnerFactoryModule.java @@ -23,11 +23,11 @@ import com.google.inject.multibindings.MapBinder; import io.druid.query.Query; import io.druid.query.QueryRunnerFactory; import io.druid.query.QueryWatcher; +import io.druid.query.datasourcemetadata.DataSourceMetadataQuery; +import io.druid.query.datasourcemetadata.DataSourceMetadataQueryRunnerFactory; import io.druid.query.groupby.GroupByQuery; import io.druid.query.groupby.GroupByQueryEngine; import io.druid.query.groupby.GroupByQueryRunnerFactory; -import io.druid.query.datasourcemetadata.DataSourceMetadataQuery; -import io.druid.query.datasourcemetadata.DataSourceMetadataQueryRunnerFactory; import io.druid.query.metadata.SegmentMetadataQueryRunnerFactory; import io.druid.query.metadata.metadata.SegmentMetadataQuery; import io.druid.query.search.SearchQueryRunnerFactory; diff --git a/server/src/main/java/io/druid/guice/QueryToolChestModule.java b/server/src/main/java/io/druid/guice/QueryToolChestModule.java index ba7c58ecfa5..28a2631acd1 100644 --- a/server/src/main/java/io/druid/guice/QueryToolChestModule.java +++ b/server/src/main/java/io/druid/guice/QueryToolChestModule.java @@ -23,14 +23,14 @@ import com.google.inject.Module; import com.google.inject.multibindings.MapBinder; import io.druid.query.Query; import io.druid.query.QueryToolChest; +import io.druid.query.datasourcemetadata.DataSourceMetadataQuery; +import io.druid.query.datasourcemetadata.DataSourceQueryQueryToolChest; import io.druid.query.groupby.GroupByQuery; import io.druid.query.groupby.GroupByQueryConfig; import io.druid.query.groupby.GroupByQueryQueryToolChest; -import io.druid.query.datasourcemetadata.DataSourceMetadataQuery; -import io.druid.query.datasourcemetadata.DataSourceQueryQueryToolChest; +import io.druid.query.metadata.SegmentMetadataQueryConfig; import io.druid.query.metadata.SegmentMetadataQueryQueryToolChest; import io.druid.query.metadata.metadata.SegmentMetadataQuery; -import io.druid.query.metadata.SegmentMetadataQueryConfig; import io.druid.query.search.SearchQueryQueryToolChest; import io.druid.query.search.search.SearchQuery; import io.druid.query.search.search.SearchQueryConfig; diff --git a/server/src/main/java/io/druid/guice/SQLMetadataStorageDruidModule.java b/server/src/main/java/io/druid/guice/SQLMetadataStorageDruidModule.java index 217764dad2f..2b7c821415b 100644 --- a/server/src/main/java/io/druid/guice/SQLMetadataStorageDruidModule.java +++ b/server/src/main/java/io/druid/guice/SQLMetadataStorageDruidModule.java @@ -20,11 +20,10 @@ package io.druid.guice; import com.google.inject.Binder; import com.google.inject.Key; import com.google.inject.Module; +import io.druid.audit.AuditManager; import io.druid.indexer.MetadataStorageUpdaterJobHandler; import io.druid.indexer.SQLMetadataStorageUpdaterJobHandler; import io.druid.indexing.overlord.IndexerMetadataStorageCoordinator; -import io.druid.metadata.MetadataRuleManagerConfig; -import io.druid.metadata.MetadataStorageActionHandlerFactory; import io.druid.metadata.IndexerSQLMetadataStorageCoordinator; import io.druid.metadata.MetadataRuleManager; import io.druid.metadata.MetadataRuleManagerProvider; @@ -32,6 +31,7 @@ import io.druid.metadata.MetadataSegmentManager; import io.druid.metadata.MetadataSegmentManagerProvider; import io.druid.metadata.MetadataSegmentPublisher; import io.druid.metadata.MetadataSegmentPublisherProvider; +import io.druid.metadata.MetadataStorageActionHandlerFactory; import io.druid.metadata.MetadataStorageConnector; import io.druid.metadata.MetadataStorageProvider; import io.druid.metadata.NoopMetadataStorageProvider; @@ -43,7 +43,6 @@ import io.druid.metadata.SQLMetadataSegmentManagerProvider; import io.druid.metadata.SQLMetadataSegmentPublisher; import io.druid.metadata.SQLMetadataSegmentPublisherProvider; import io.druid.metadata.SQLMetadataStorageActionHandlerFactory; -import io.druid.audit.AuditManager; import io.druid.server.audit.AuditManagerProvider; import io.druid.server.audit.SQLAuditManager; import io.druid.server.audit.SQLAuditManagerConfig; diff --git a/server/src/main/java/io/druid/indexer/SQLMetadataStorageUpdaterJobHandler.java b/server/src/main/java/io/druid/indexer/SQLMetadataStorageUpdaterJobHandler.java index d6a9dbc81b1..860b952ab0b 100644 --- a/server/src/main/java/io/druid/indexer/SQLMetadataStorageUpdaterJobHandler.java +++ b/server/src/main/java/io/druid/indexer/SQLMetadataStorageUpdaterJobHandler.java @@ -18,7 +18,9 @@ package io.druid.indexer; import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.common.collect.ImmutableMap; import com.google.inject.Inject; +import com.metamx.common.logger.Logger; import io.druid.metadata.SQLMetadataConnector; import io.druid.timeline.DataSegment; import io.druid.timeline.partition.NoneShardSpec; @@ -27,8 +29,6 @@ import org.skife.jdbi.v2.Handle; import org.skife.jdbi.v2.IDBI; import org.skife.jdbi.v2.PreparedBatch; import org.skife.jdbi.v2.tweak.HandleCallback; -import com.metamx.common.logger.Logger; -import com.google.common.collect.ImmutableMap; import java.util.List; diff --git a/server/src/main/java/io/druid/metadata/SQLMetadataConnector.java b/server/src/main/java/io/druid/metadata/SQLMetadataConnector.java index 70e5ae7d1fe..21d8c57e399 100644 --- a/server/src/main/java/io/druid/metadata/SQLMetadataConnector.java +++ b/server/src/main/java/io/druid/metadata/SQLMetadataConnector.java @@ -28,7 +28,6 @@ import org.apache.commons.dbcp2.BasicDataSource; import org.skife.jdbi.v2.Batch; import org.skife.jdbi.v2.DBI; import org.skife.jdbi.v2.Handle; -import org.skife.jdbi.v2.IDBI; import org.skife.jdbi.v2.TransactionCallback; import org.skife.jdbi.v2.TransactionStatus; import org.skife.jdbi.v2.exceptions.DBIException; diff --git a/server/src/main/java/io/druid/metadata/SQLMetadataSegmentManager.java b/server/src/main/java/io/druid/metadata/SQLMetadataSegmentManager.java index d2e69d7970d..c6e382d7dd7 100644 --- a/server/src/main/java/io/druid/metadata/SQLMetadataSegmentManager.java +++ b/server/src/main/java/io/druid/metadata/SQLMetadataSegmentManager.java @@ -29,7 +29,6 @@ import com.google.inject.Inject; import com.metamx.common.MapUtils; import com.metamx.common.lifecycle.LifecycleStart; import com.metamx.common.lifecycle.LifecycleStop; -import com.metamx.common.logger.Logger; import com.metamx.emitter.EmittingLogger; import io.druid.client.DruidDataSource; import io.druid.concurrent.Execs; diff --git a/server/src/main/java/io/druid/segment/realtime/RealtimeManager.java b/server/src/main/java/io/druid/segment/realtime/RealtimeManager.java index 5566f14c387..47ae87626e4 100644 --- a/server/src/main/java/io/druid/segment/realtime/RealtimeManager.java +++ b/server/src/main/java/io/druid/segment/realtime/RealtimeManager.java @@ -45,7 +45,6 @@ import io.druid.query.QueryRunnerFactoryConglomerate; import io.druid.query.QuerySegmentWalker; import io.druid.query.QueryToolChest; import io.druid.query.SegmentDescriptor; -import io.druid.query.UnionQueryRunner; import io.druid.segment.incremental.IndexSizeExceededException; import io.druid.segment.indexing.DataSchema; import io.druid.segment.indexing.RealtimeTuningConfig; diff --git a/server/src/main/java/io/druid/server/ClientInfoResource.java b/server/src/main/java/io/druid/server/ClientInfoResource.java index 620f081af24..f114dedbd46 100644 --- a/server/src/main/java/io/druid/server/ClientInfoResource.java +++ b/server/src/main/java/io/druid/server/ClientInfoResource.java @@ -17,6 +17,13 @@ package io.druid.server; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Iterables; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import com.google.common.collect.Sets; +import com.google.inject.Inject; +import com.metamx.common.logger.Logger; import io.druid.client.DruidDataSource; import io.druid.client.DruidServer; import io.druid.client.InventoryView; @@ -27,13 +34,9 @@ import io.druid.query.metadata.SegmentMetadataQueryConfig; import io.druid.timeline.DataSegment; import io.druid.timeline.TimelineLookup; import io.druid.timeline.TimelineObjectHolder; - -import java.util.Collections; -import java.util.Comparator; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.TreeMap; +import io.druid.timeline.partition.PartitionHolder; +import org.joda.time.DateTime; +import org.joda.time.Interval; import javax.ws.rs.GET; import javax.ws.rs.Path; @@ -41,18 +44,12 @@ import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; - -import io.druid.timeline.partition.PartitionHolder; -import org.joda.time.DateTime; -import org.joda.time.Interval; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.Iterables; -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; -import com.google.common.collect.Sets; -import com.google.inject.Inject; -import com.metamx.common.logger.Logger; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.TreeMap; /** */ diff --git a/server/src/main/java/io/druid/server/QueryResource.java b/server/src/main/java/io/druid/server/QueryResource.java index ae084ba1af2..8920fdc183e 100644 --- a/server/src/main/java/io/druid/server/QueryResource.java +++ b/server/src/main/java/io/druid/server/QueryResource.java @@ -32,10 +32,10 @@ import com.metamx.emitter.EmittingLogger; import com.metamx.emitter.service.ServiceEmitter; import io.druid.guice.annotations.Json; import io.druid.guice.annotations.Smile; +import io.druid.query.DruidMetrics; import io.druid.query.Query; import io.druid.query.QueryContextKeys; import io.druid.query.QueryInterruptedException; -import io.druid.query.DruidMetrics; import io.druid.query.QuerySegmentWalker; import io.druid.server.initialization.ServerConfig; import io.druid.server.log.RequestLogger; diff --git a/server/src/main/java/io/druid/server/coordination/ServerManager.java b/server/src/main/java/io/druid/server/coordination/ServerManager.java index 0cbb504f6b3..ec915140c3e 100644 --- a/server/src/main/java/io/druid/server/coordination/ServerManager.java +++ b/server/src/main/java/io/druid/server/coordination/ServerManager.java @@ -42,7 +42,6 @@ import io.druid.query.FinalizeResultsQueryRunner; import io.druid.query.MetricsEmittingQueryRunner; import io.druid.query.NoopQueryRunner; import io.druid.query.Query; -import io.druid.query.QueryDataSource; import io.druid.query.QueryRunner; import io.druid.query.QueryRunnerFactory; import io.druid.query.QueryRunnerFactoryConglomerate; @@ -59,7 +58,6 @@ import io.druid.segment.Segment; import io.druid.segment.loading.SegmentLoader; import io.druid.segment.loading.SegmentLoadingException; import io.druid.timeline.DataSegment; -import io.druid.timeline.TimelineLookup; import io.druid.timeline.TimelineObjectHolder; import io.druid.timeline.VersionedIntervalTimeline; import io.druid.timeline.partition.PartitionChunk; @@ -70,7 +68,6 @@ import javax.annotation.Nullable; import java.io.IOException; import java.util.Arrays; import java.util.HashMap; -import java.util.List; import java.util.Map; import java.util.concurrent.ExecutorService; import java.util.concurrent.atomic.AtomicLong; diff --git a/server/src/main/java/io/druid/server/coordinator/DruidCoordinator.java b/server/src/main/java/io/druid/server/coordinator/DruidCoordinator.java index d1398bffa18..acba0d807eb 100644 --- a/server/src/main/java/io/druid/server/coordinator/DruidCoordinator.java +++ b/server/src/main/java/io/druid/server/coordinator/DruidCoordinator.java @@ -48,10 +48,10 @@ import io.druid.collections.CountingMap; import io.druid.common.config.JacksonConfigManager; import io.druid.concurrent.Execs; import io.druid.curator.discovery.ServiceAnnouncer; -import io.druid.metadata.MetadataRuleManager; -import io.druid.metadata.MetadataSegmentManager; import io.druid.guice.ManageLifecycle; import io.druid.guice.annotations.Self; +import io.druid.metadata.MetadataRuleManager; +import io.druid.metadata.MetadataSegmentManager; import io.druid.segment.IndexIO; import io.druid.server.DruidNode; import io.druid.server.coordinator.helper.DruidCoordinatorBalancer; diff --git a/server/src/main/java/io/druid/server/http/DatasourcesResource.java b/server/src/main/java/io/druid/server/http/DatasourcesResource.java index dac3ed9a1f5..e210ed58e20 100644 --- a/server/src/main/java/io/druid/server/http/DatasourcesResource.java +++ b/server/src/main/java/io/druid/server/http/DatasourcesResource.java @@ -27,14 +27,12 @@ import com.google.inject.Inject; import com.metamx.common.MapUtils; import com.metamx.common.Pair; import com.metamx.common.guava.Comparators; - import io.druid.client.DruidDataSource; import io.druid.client.DruidServer; import io.druid.client.InventoryView; import io.druid.client.indexing.IndexingServiceClient; import io.druid.metadata.MetadataSegmentManager; import io.druid.timeline.DataSegment; - import org.joda.time.DateTime; import org.joda.time.Interval; @@ -49,7 +47,6 @@ import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; - import java.util.Comparator; import java.util.HashSet; import java.util.List; diff --git a/server/src/main/java/io/druid/server/http/IntervalsResource.java b/server/src/main/java/io/druid/server/http/IntervalsResource.java index 8adb1a80cff..103330fc50a 100644 --- a/server/src/main/java/io/druid/server/http/IntervalsResource.java +++ b/server/src/main/java/io/druid/server/http/IntervalsResource.java @@ -23,11 +23,9 @@ import com.google.common.collect.Maps; import com.google.inject.Inject; import com.metamx.common.MapUtils; import com.metamx.common.guava.Comparators; - import io.druid.client.DruidDataSource; import io.druid.client.InventoryView; import io.druid.timeline.DataSegment; - import org.joda.time.Interval; import javax.ws.rs.GET; @@ -37,7 +35,6 @@ import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; - import java.util.Comparator; import java.util.Map; import java.util.Set; diff --git a/server/src/main/java/io/druid/server/http/InventoryViewUtils.java b/server/src/main/java/io/druid/server/http/InventoryViewUtils.java index 6caf90017fe..df39f5e70c1 100644 --- a/server/src/main/java/io/druid/server/http/InventoryViewUtils.java +++ b/server/src/main/java/io/druid/server/http/InventoryViewUtils.java @@ -19,6 +19,10 @@ package io.druid.server.http; +import com.google.common.base.Function; +import com.google.common.collect.Iterables; +import com.google.common.collect.Lists; +import com.google.common.collect.Sets; import io.druid.client.DruidDataSource; import io.druid.client.DruidServer; import io.druid.client.InventoryView; @@ -27,11 +31,6 @@ import java.util.Comparator; import java.util.Set; import java.util.TreeSet; -import com.google.common.base.Function; -import com.google.common.collect.Iterables; -import com.google.common.collect.Lists; -import com.google.common.collect.Sets; - public class InventoryViewUtils { public static Set getDataSources(InventoryView serverInventoryView) diff --git a/server/src/main/java/io/druid/server/initialization/ComposingEmitterModule.java b/server/src/main/java/io/druid/server/initialization/ComposingEmitterModule.java index a102c19b839..dd2b9806695 100644 --- a/server/src/main/java/io/druid/server/initialization/ComposingEmitterModule.java +++ b/server/src/main/java/io/druid/server/initialization/ComposingEmitterModule.java @@ -19,9 +19,6 @@ package io.druid.server.initialization; -import java.util.Collections; -import java.util.List; - import com.fasterxml.jackson.databind.Module; import com.google.common.base.Function; import com.google.common.collect.Lists; @@ -34,11 +31,13 @@ import com.google.inject.name.Names; import com.metamx.common.logger.Logger; import com.metamx.emitter.core.ComposingEmitter; import com.metamx.emitter.core.Emitter; - import io.druid.guice.JsonConfigProvider; import io.druid.guice.ManageLifecycle; import io.druid.initialization.DruidModule; +import java.util.Collections; +import java.util.List; + /** */ public class ComposingEmitterModule implements DruidModule diff --git a/server/src/main/java/io/druid/server/initialization/HttpEmitterModule.java b/server/src/main/java/io/druid/server/initialization/HttpEmitterModule.java index 97ff643eee6..ab440915de1 100644 --- a/server/src/main/java/io/druid/server/initialization/HttpEmitterModule.java +++ b/server/src/main/java/io/druid/server/initialization/HttpEmitterModule.java @@ -18,8 +18,8 @@ package io.druid.server.initialization; import com.fasterxml.jackson.databind.ObjectMapper; -import com.google.common.base.Throwables; import com.google.common.base.Supplier; +import com.google.common.base.Throwables; import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Provides; diff --git a/server/src/main/java/io/druid/server/initialization/jetty/JettyServerModule.java b/server/src/main/java/io/druid/server/initialization/jetty/JettyServerModule.java index 45bd177251b..53c4907e25b 100644 --- a/server/src/main/java/io/druid/server/initialization/jetty/JettyServerModule.java +++ b/server/src/main/java/io/druid/server/initialization/jetty/JettyServerModule.java @@ -46,7 +46,6 @@ import io.druid.guice.annotations.Self; import io.druid.server.DruidNode; import io.druid.server.StatusResource; import io.druid.server.initialization.ServerConfig; - import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; diff --git a/server/src/main/java/io/druid/server/sql/SQLRunner.java b/server/src/main/java/io/druid/server/sql/SQLRunner.java index b1379af0441..b578636c32b 100644 --- a/server/src/main/java/io/druid/server/sql/SQLRunner.java +++ b/server/src/main/java/io/druid/server/sql/SQLRunner.java @@ -25,8 +25,8 @@ import com.google.common.base.Function; import com.google.common.base.Joiner; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; -import com.metamx.common.guava.CloseQuietly; import com.metamx.common.StringUtils; +import com.metamx.common.guava.CloseQuietly; import io.druid.data.input.Row; import io.druid.jackson.DefaultObjectMapper; import io.druid.query.Druids; diff --git a/server/src/test/java/io/druid/client/BrokerServerViewTest.java b/server/src/test/java/io/druid/client/BrokerServerViewTest.java index c178648f453..82aa1153c2e 100644 --- a/server/src/test/java/io/druid/client/BrokerServerViewTest.java +++ b/server/src/test/java/io/druid/client/BrokerServerViewTest.java @@ -30,7 +30,6 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.metamx.common.Pair; -import com.metamx.emitter.service.ServiceEmitter; import com.metamx.http.client.HttpClient; import io.druid.client.selector.HighestPriorityTierSelectorStrategy; import io.druid.client.selector.RandomServerSelectorStrategy; diff --git a/server/src/test/java/io/druid/client/cache/MemcachedCacheTest.java b/server/src/test/java/io/druid/client/cache/MemcachedCacheTest.java index 2b25b7a393a..0d3350b4a43 100644 --- a/server/src/test/java/io/druid/client/cache/MemcachedCacheTest.java +++ b/server/src/test/java/io/druid/client/cache/MemcachedCacheTest.java @@ -34,10 +34,8 @@ import com.metamx.emitter.core.Emitter; import com.metamx.emitter.core.Event; import com.metamx.emitter.service.ServiceEmitter; import com.metamx.metrics.AbstractMonitor; -import com.metamx.metrics.MonitorScheduler; import io.druid.collections.ResourceHolder; import io.druid.collections.StupidResourceHolder; -import io.druid.guice.CacheModule; import io.druid.guice.GuiceInjectors; import io.druid.guice.JsonConfigProvider; import io.druid.guice.ManageLifecycle; diff --git a/server/src/test/java/io/druid/client/indexing/ClientAppendQueryTest.java b/server/src/test/java/io/druid/client/indexing/ClientAppendQueryTest.java index 1659094ac21..d699abf2387 100644 --- a/server/src/test/java/io/druid/client/indexing/ClientAppendQueryTest.java +++ b/server/src/test/java/io/druid/client/indexing/ClientAppendQueryTest.java @@ -23,7 +23,6 @@ import com.google.common.collect.Lists; import io.druid.timeline.DataSegment; import org.joda.time.DateTime; import org.joda.time.Interval; -import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/server/src/test/java/io/druid/initialization/ComposingEmitterModuleTest.java b/server/src/test/java/io/druid/initialization/ComposingEmitterModuleTest.java index 84b45bbf580..e452aacd6dd 100644 --- a/server/src/test/java/io/druid/initialization/ComposingEmitterModuleTest.java +++ b/server/src/test/java/io/druid/initialization/ComposingEmitterModuleTest.java @@ -19,20 +19,6 @@ package io.druid.initialization; -import io.druid.guice.DruidGuiceExtensions; -import io.druid.guice.LifecycleModule; - -import java.util.Properties; - -import javax.validation.Validation; -import javax.validation.Validator; - -import io.druid.server.initialization.ComposingEmitterConfig; -import io.druid.server.initialization.ComposingEmitterModule; -import org.easymock.EasyMock; -import org.junit.Before; -import org.junit.Test; - import com.google.common.collect.Lists; import com.google.inject.Binder; import com.google.inject.Guice; @@ -41,6 +27,17 @@ import com.google.inject.Key; import com.google.inject.Module; import com.google.inject.name.Names; import com.metamx.emitter.core.Emitter; +import io.druid.guice.DruidGuiceExtensions; +import io.druid.guice.LifecycleModule; +import io.druid.server.initialization.ComposingEmitterConfig; +import io.druid.server.initialization.ComposingEmitterModule; +import org.easymock.EasyMock; +import org.junit.Before; +import org.junit.Test; + +import javax.validation.Validation; +import javax.validation.Validator; +import java.util.Properties; /** */ diff --git a/server/src/test/java/io/druid/metadata/MetadataSegmentManagerTest.java b/server/src/test/java/io/druid/metadata/MetadataSegmentManagerTest.java index da244f4841b..7352a62e77b 100644 --- a/server/src/test/java/io/druid/metadata/MetadataSegmentManagerTest.java +++ b/server/src/test/java/io/druid/metadata/MetadataSegmentManagerTest.java @@ -26,7 +26,6 @@ import io.druid.jackson.DefaultObjectMapper; import io.druid.timeline.DataSegment; import io.druid.timeline.partition.NoneShardSpec; import org.joda.time.Interval; -import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Rule; diff --git a/server/src/test/java/io/druid/metadata/SQLMetadataConnectorTest.java b/server/src/test/java/io/druid/metadata/SQLMetadataConnectorTest.java index 99607c63109..b60aa6a1b50 100644 --- a/server/src/test/java/io/druid/metadata/SQLMetadataConnectorTest.java +++ b/server/src/test/java/io/druid/metadata/SQLMetadataConnectorTest.java @@ -16,7 +16,6 @@ */ package io.druid.metadata; -import com.google.common.base.Suppliers; import org.junit.Assert; import org.junit.Before; import org.junit.Rule; diff --git a/server/src/test/java/io/druid/segment/indexing/DataSchemaTest.java b/server/src/test/java/io/druid/segment/indexing/DataSchemaTest.java index 4b2d534d4de..7fc9483f011 100644 --- a/server/src/test/java/io/druid/segment/indexing/DataSchemaTest.java +++ b/server/src/test/java/io/druid/segment/indexing/DataSchemaTest.java @@ -32,8 +32,8 @@ import io.druid.jackson.DefaultObjectMapper; import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.aggregation.DoubleSumAggregatorFactory; import io.druid.segment.indexing.granularity.ArbitraryGranularitySpec; -import org.junit.Assert; import org.joda.time.Interval; +import org.junit.Assert; import org.junit.Test; import java.util.Map; diff --git a/server/src/test/java/io/druid/segment/loading/LoadSpecTest.java b/server/src/test/java/io/druid/segment/loading/LoadSpecTest.java index b50e996c094..7098dfef825 100644 --- a/server/src/test/java/io/druid/segment/loading/LoadSpecTest.java +++ b/server/src/test/java/io/druid/segment/loading/LoadSpecTest.java @@ -20,13 +20,13 @@ package io.druid.segment.loading; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair; -import io.druid.guice.GuiceAnnotationIntrospector; -import io.druid.guice.GuiceInjectableValues; import com.fasterxml.jackson.databind.module.SimpleModule; import com.google.common.collect.ImmutableList; import com.google.inject.Binder; import com.google.inject.Injector; import com.google.inject.Module; +import io.druid.guice.GuiceAnnotationIntrospector; +import io.druid.guice.GuiceInjectableValues; import io.druid.guice.GuiceInjectors; import io.druid.jackson.DefaultObjectMapper; import org.junit.Assert; diff --git a/server/src/test/java/io/druid/segment/realtime/firehose/IngestSegmentFirehoseTest.java b/server/src/test/java/io/druid/segment/realtime/firehose/IngestSegmentFirehoseTest.java index ca4a3708453..c7ef6a99743 100644 --- a/server/src/test/java/io/druid/segment/realtime/firehose/IngestSegmentFirehoseTest.java +++ b/server/src/test/java/io/druid/segment/realtime/firehose/IngestSegmentFirehoseTest.java @@ -29,7 +29,6 @@ import io.druid.data.input.impl.TimestampSpec; import io.druid.granularity.QueryGranularity; import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.aggregation.LongSumAggregatorFactory; -import io.druid.query.aggregation.hyperloglog.HyperUniquesAggregatorFactory; import io.druid.segment.IndexIO; import io.druid.segment.IndexMerger; import io.druid.segment.IndexSpec; diff --git a/server/src/test/java/io/druid/server/http/IntervalsResourceTest.java b/server/src/test/java/io/druid/server/http/IntervalsResourceTest.java index 3173c4516d8..b77842bff8d 100644 --- a/server/src/test/java/io/druid/server/http/IntervalsResourceTest.java +++ b/server/src/test/java/io/druid/server/http/IntervalsResourceTest.java @@ -20,11 +20,9 @@ package io.druid.server.http; import com.google.common.collect.ImmutableList; - import io.druid.client.DruidServer; import io.druid.client.InventoryView; import io.druid.timeline.DataSegment; - import org.easymock.EasyMock; import org.joda.time.Interval; import org.junit.Assert; @@ -32,7 +30,6 @@ import org.junit.Before; import org.junit.Test; import javax.ws.rs.core.Response; - import java.util.ArrayList; import java.util.List; import java.util.Map; diff --git a/server/src/test/java/io/druid/server/initialization/BaseJettyTest.java b/server/src/test/java/io/druid/server/initialization/BaseJettyTest.java index fc4867a25af..0214da2b3d2 100644 --- a/server/src/test/java/io/druid/server/initialization/BaseJettyTest.java +++ b/server/src/test/java/io/druid/server/initialization/BaseJettyTest.java @@ -42,7 +42,6 @@ import io.druid.server.DruidNode; import io.druid.server.initialization.jetty.JettyServerInitUtils; import io.druid.server.initialization.jetty.JettyServerInitializer; import io.druid.server.initialization.jetty.ServletFilterHolder; - import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.HandlerList; diff --git a/server/src/test/java/io/druid/server/initialization/JettyTest.java b/server/src/test/java/io/druid/server/initialization/JettyTest.java index 06b165f6085..7060a9a7838 100644 --- a/server/src/test/java/io/druid/server/initialization/JettyTest.java +++ b/server/src/test/java/io/druid/server/initialization/JettyTest.java @@ -31,6 +31,7 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; +import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; @@ -43,8 +44,6 @@ import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; -import javax.servlet.http.HttpServletResponse; - public class JettyTest extends BaseJettyTest { diff --git a/server/src/test/java/io/druid/server/log/FileRequestLoggerTest.java b/server/src/test/java/io/druid/server/log/FileRequestLoggerTest.java index 5c53c1cfe4a..b31c40bbe2d 100644 --- a/server/src/test/java/io/druid/server/log/FileRequestLoggerTest.java +++ b/server/src/test/java/io/druid/server/log/FileRequestLoggerTest.java @@ -27,7 +27,6 @@ import org.joda.time.DateTime; import org.junit.Assert; import org.junit.Rule; import org.junit.Test; - import org.junit.rules.TemporaryFolder; import java.io.File; diff --git a/server/src/test/java/io/druid/server/shard/NumberedShardSpecTest.java b/server/src/test/java/io/druid/server/shard/NumberedShardSpecTest.java index 128ccefe44c..aaa96566f79 100644 --- a/server/src/test/java/io/druid/server/shard/NumberedShardSpecTest.java +++ b/server/src/test/java/io/druid/server/shard/NumberedShardSpecTest.java @@ -23,10 +23,8 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; import com.google.common.collect.Ordering; import io.druid.TestUtil; -import io.druid.timeline.DataSegment; import io.druid.timeline.TimelineObjectHolder; import io.druid.timeline.VersionedIntervalTimeline; -import io.druid.timeline.partition.NumberedPartitionChunk; import io.druid.timeline.partition.NumberedShardSpec; import io.druid.timeline.partition.PartitionChunk; import io.druid.timeline.partition.ShardSpec; diff --git a/services/src/main/java/io/druid/cli/CliBroker.java b/services/src/main/java/io/druid/cli/CliBroker.java index 7b6743128e0..27e5f77d583 100644 --- a/services/src/main/java/io/druid/cli/CliBroker.java +++ b/services/src/main/java/io/druid/cli/CliBroker.java @@ -26,10 +26,8 @@ import io.airlift.airline.Command; import io.druid.client.BrokerServerView; import io.druid.client.CachingClusteredClient; import io.druid.client.TimelineServerView; -import io.druid.client.cache.Cache; import io.druid.client.cache.CacheConfig; import io.druid.client.cache.CacheMonitor; -import io.druid.client.cache.CacheProvider; import io.druid.client.selector.CustomTierSelectorStrategyConfig; import io.druid.client.selector.ServerSelectorStrategy; import io.druid.client.selector.TierSelectorStrategy; @@ -38,7 +36,6 @@ import io.druid.guice.Jerseys; import io.druid.guice.JsonConfigProvider; import io.druid.guice.LazySingleton; import io.druid.guice.LifecycleModule; -import io.druid.guice.ManageLifecycle; import io.druid.query.MapQueryToolChestWarehouse; import io.druid.query.QuerySegmentWalker; import io.druid.query.QueryToolChestWarehouse; diff --git a/services/src/main/java/io/druid/cli/CliCoordinator.java b/services/src/main/java/io/druid/cli/CliCoordinator.java index 7f5b254a829..8942eac1718 100644 --- a/services/src/main/java/io/druid/cli/CliCoordinator.java +++ b/services/src/main/java/io/druid/cli/CliCoordinator.java @@ -25,8 +25,8 @@ import com.google.inject.Provides; import com.google.inject.name.Names; import com.metamx.common.concurrent.ScheduledExecutorFactory; import com.metamx.common.logger.Logger; - import io.airlift.airline.Command; +import io.druid.audit.AuditManager; import io.druid.client.indexing.IndexingServiceClient; import io.druid.guice.ConfigProvider; import io.druid.guice.Jerseys; @@ -42,7 +42,6 @@ import io.druid.metadata.MetadataSegmentManagerConfig; import io.druid.metadata.MetadataSegmentManagerProvider; import io.druid.metadata.MetadataStorage; import io.druid.metadata.MetadataStorageProvider; -import io.druid.audit.AuditManager; import io.druid.server.audit.AuditManagerProvider; import io.druid.server.coordinator.DruidCoordinator; import io.druid.server.coordinator.DruidCoordinatorConfig; @@ -60,7 +59,6 @@ import io.druid.server.http.ServersResource; import io.druid.server.http.TiersResource; import io.druid.server.initialization.jetty.JettyServerInitializer; import io.druid.server.router.TieredBrokerConfig; - import org.apache.curator.framework.CuratorFramework; import org.eclipse.jetty.server.Server; diff --git a/services/src/main/java/io/druid/cli/CliHistorical.java b/services/src/main/java/io/druid/cli/CliHistorical.java index 873e89c449b..4ff430679ac 100644 --- a/services/src/main/java/io/druid/cli/CliHistorical.java +++ b/services/src/main/java/io/druid/cli/CliHistorical.java @@ -23,10 +23,8 @@ import com.google.inject.Module; import com.google.inject.name.Names; import com.metamx.common.logger.Logger; import io.airlift.airline.Command; -import io.druid.client.cache.Cache; import io.druid.client.cache.CacheConfig; import io.druid.client.cache.CacheMonitor; -import io.druid.client.cache.CacheProvider; import io.druid.guice.CacheModule; import io.druid.guice.Jerseys; import io.druid.guice.JsonConfigProvider; diff --git a/services/src/main/java/io/druid/cli/CliMiddleManager.java b/services/src/main/java/io/druid/cli/CliMiddleManager.java index b8d462fc065..cd2b5559259 100644 --- a/services/src/main/java/io/druid/cli/CliMiddleManager.java +++ b/services/src/main/java/io/druid/cli/CliMiddleManager.java @@ -45,7 +45,6 @@ import io.druid.indexing.worker.http.WorkerResource; import io.druid.segment.realtime.firehose.ChatHandlerProvider; import io.druid.server.DruidNode; import io.druid.server.initialization.jetty.JettyServerInitializer; - import org.eclipse.jetty.server.Server; import java.util.List; diff --git a/services/src/main/java/io/druid/cli/CreateTables.java b/services/src/main/java/io/druid/cli/CreateTables.java index 8ea58ca7ebc..d320483f098 100644 --- a/services/src/main/java/io/druid/cli/CreateTables.java +++ b/services/src/main/java/io/druid/cli/CreateTables.java @@ -25,11 +25,11 @@ import com.google.inject.Module; import com.metamx.common.logger.Logger; import io.airlift.airline.Command; import io.airlift.airline.Option; +import io.druid.guice.JsonConfigProvider; +import io.druid.guice.annotations.Self; import io.druid.metadata.MetadataStorageConnector; import io.druid.metadata.MetadataStorageConnectorConfig; import io.druid.metadata.MetadataStorageTablesConfig; -import io.druid.guice.JsonConfigProvider; -import io.druid.guice.annotations.Self; import io.druid.server.DruidNode; import java.util.List; diff --git a/services/src/main/java/io/druid/cli/MiddleManagerJettyServerInitializer.java b/services/src/main/java/io/druid/cli/MiddleManagerJettyServerInitializer.java index b09d25c4143..f070930cec5 100644 --- a/services/src/main/java/io/druid/cli/MiddleManagerJettyServerInitializer.java +++ b/services/src/main/java/io/druid/cli/MiddleManagerJettyServerInitializer.java @@ -17,11 +17,10 @@ package io.druid.cli; -import io.druid.server.initialization.jetty.JettyServerInitUtils; -import io.druid.server.initialization.jetty.JettyServerInitializer; - import com.google.inject.Injector; import com.google.inject.servlet.GuiceFilter; +import io.druid.server.initialization.jetty.JettyServerInitUtils; +import io.druid.server.initialization.jetty.JettyServerInitializer; import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.DefaultHandler; diff --git a/services/src/main/java/io/druid/cli/PullDependencies.java b/services/src/main/java/io/druid/cli/PullDependencies.java index 062cf886e5f..e970ef360b5 100644 --- a/services/src/main/java/io/druid/cli/PullDependencies.java +++ b/services/src/main/java/io/druid/cli/PullDependencies.java @@ -18,7 +18,6 @@ package io.druid.cli; import com.google.common.base.Throwables; -import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.google.common.collect.Sets; import com.google.inject.Inject; diff --git a/services/src/main/java/io/druid/cli/QueryJettyServerInitializer.java b/services/src/main/java/io/druid/cli/QueryJettyServerInitializer.java index a5b8af4903a..13c484603e0 100644 --- a/services/src/main/java/io/druid/cli/QueryJettyServerInitializer.java +++ b/services/src/main/java/io/druid/cli/QueryJettyServerInitializer.java @@ -19,10 +19,8 @@ package io.druid.cli; import com.google.inject.Injector; import com.google.inject.servlet.GuiceFilter; - import io.druid.server.initialization.jetty.JettyServerInitUtils; import io.druid.server.initialization.jetty.JettyServerInitializer; - import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.HandlerList; diff --git a/services/src/main/java/io/druid/guice/RealtimeModule.java b/services/src/main/java/io/druid/guice/RealtimeModule.java index 784aa7958be..fcc12f5d5bb 100644 --- a/services/src/main/java/io/druid/guice/RealtimeModule.java +++ b/services/src/main/java/io/druid/guice/RealtimeModule.java @@ -35,7 +35,6 @@ import io.druid.segment.realtime.firehose.NoopChatHandlerProvider; import io.druid.segment.realtime.firehose.ServiceAnnouncingChatHandlerProvider; import io.druid.server.QueryResource; import io.druid.server.initialization.jetty.JettyServerInitializer; - import org.eclipse.jetty.server.Server; import java.util.List; diff --git a/services/src/test/java/io/druid/cli/convert/ConvertPropertiesTest.java b/services/src/test/java/io/druid/cli/convert/ConvertPropertiesTest.java index fca1bc62c96..cce39974c04 100644 --- a/services/src/test/java/io/druid/cli/convert/ConvertPropertiesTest.java +++ b/services/src/test/java/io/druid/cli/convert/ConvertPropertiesTest.java @@ -19,14 +19,12 @@ package io.druid.cli.convert; +import io.airlift.airline.Cli; import org.apache.commons.io.FileUtils; import org.junit.After; import org.junit.Assert; -import org.junit.Test; import org.junit.Rule; - -import io.airlift.airline.Cli; - +import org.junit.Test; import org.junit.rules.TemporaryFolder; import java.io.File; diff --git a/services/src/test/java/io/druid/cli/validate/DruidJsonValidatorTest.java b/services/src/test/java/io/druid/cli/validate/DruidJsonValidatorTest.java index 74d93019d18..2bb263da8a9 100644 --- a/services/src/test/java/io/druid/cli/validate/DruidJsonValidatorTest.java +++ b/services/src/test/java/io/druid/cli/validate/DruidJsonValidatorTest.java @@ -20,7 +20,6 @@ package io.druid.cli.validate; import io.airlift.airline.Cli; - import org.junit.After; import org.junit.Assert; import org.junit.Before;