diff --git a/.travis.yml b/.travis.yml index 813f2d7463c..12b145b4daf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,8 @@ language: java jdk: - oraclejdk8 -script: - - mvn clean -Pstrict -pl '!benchmarks' compile test-compile -B - - mvn test -B -Pparallel-test -Dmaven.fork.count=2 +# Using && instead of two script steps to make Travis build fail faster, if "strict" compilation is not successful +script: mvn clean -Pstrict -pl '!benchmarks' compile test-compile -B && mvn test -B -Pparallel-test -Dmaven.fork.count=2 install: true diff --git a/api/src/main/java/io/druid/data/input/MapBasedRow.java b/api/src/main/java/io/druid/data/input/MapBasedRow.java index 77e4fd9f3d3..534c5eec929 100644 --- a/api/src/main/java/io/druid/data/input/MapBasedRow.java +++ b/api/src/main/java/io/druid/data/input/MapBasedRow.java @@ -76,6 +76,7 @@ public class MapBasedRow implements Row return timestamp.getMillis(); } + @Override @JsonProperty public DateTime getTimestamp() { diff --git a/api/src/main/java/io/druid/data/input/impl/TimeAndDimsParseSpec.java b/api/src/main/java/io/druid/data/input/impl/TimeAndDimsParseSpec.java index ec1fdb2a040..9f81a18fc57 100644 --- a/api/src/main/java/io/druid/data/input/impl/TimeAndDimsParseSpec.java +++ b/api/src/main/java/io/druid/data/input/impl/TimeAndDimsParseSpec.java @@ -42,6 +42,7 @@ public class TimeAndDimsParseSpec extends ParseSpec ); } + @Override public Parser makeParser() { return new Parser() @@ -66,11 +67,13 @@ public class TimeAndDimsParseSpec extends ParseSpec }; } + @Override public ParseSpec withTimestampSpec(TimestampSpec spec) { return new TimeAndDimsParseSpec(spec, getDimensionsSpec()); } + @Override public ParseSpec withDimensionsSpec(DimensionsSpec spec) { return new TimeAndDimsParseSpec(getTimestampSpec(), spec); diff --git a/api/src/main/java/io/druid/utils/Runnables.java b/api/src/main/java/io/druid/utils/Runnables.java index 793c9c1c3d0..a70ff66de48 100644 --- a/api/src/main/java/io/druid/utils/Runnables.java +++ b/api/src/main/java/io/druid/utils/Runnables.java @@ -25,6 +25,7 @@ public class Runnables { public static Runnable getNoopRunnable(){ return new Runnable(){ + @Override public void run(){} }; } diff --git a/bytebuffer-collections/src/main/java/io/druid/collections/spatial/search/RectangularBound.java b/bytebuffer-collections/src/main/java/io/druid/collections/spatial/search/RectangularBound.java index 0d6ab38f781..1eae8688b05 100755 --- a/bytebuffer-collections/src/main/java/io/druid/collections/spatial/search/RectangularBound.java +++ b/bytebuffer-collections/src/main/java/io/druid/collections/spatial/search/RectangularBound.java @@ -78,6 +78,7 @@ public class RectangularBound implements Bound return maxCoords; } + @Override @JsonProperty public int getLimit() { diff --git a/common/pom.xml b/common/pom.xml index 24a1a49b457..d1c6be23435 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -229,4 +229,24 @@ + + + strict + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + -Xep:MissingOverride:WARN + + + + + + + + diff --git a/common/src/main/java/io/druid/common/guava/CombiningSequence.java b/common/src/main/java/io/druid/common/guava/CombiningSequence.java index 6abe7ce0203..6cb465d8960 100644 --- a/common/src/main/java/io/druid/common/guava/CombiningSequence.java +++ b/common/src/main/java/io/druid/common/guava/CombiningSequence.java @@ -183,16 +183,19 @@ public class CombiningSequence implements Sequence return accumulator; } + @Override public void reset() { accumulator.reset(); } + @Override public boolean yielded() { return accumulator.yielded(); } + @Override public void yield() { accumulator.yield(); diff --git a/common/src/main/java/io/druid/timeline/VersionedIntervalTimeline.java b/common/src/main/java/io/druid/timeline/VersionedIntervalTimeline.java index c03c52f4a82..e54402d3b54 100644 --- a/common/src/main/java/io/druid/timeline/VersionedIntervalTimeline.java +++ b/common/src/main/java/io/druid/timeline/VersionedIntervalTimeline.java @@ -159,6 +159,7 @@ public class VersionedIntervalTimeline implements Timel } } + @Override public PartitionHolder findEntry(Interval interval, VersionType version) { try { @@ -190,6 +191,7 @@ public class VersionedIntervalTimeline implements Timel * @return Holders representing the interval that the objects exist for, PartitionHolders * are guaranteed to be complete */ + @Override public List> lookup(Interval interval) { try { diff --git a/common/src/test/java/io/druid/concurrent/ExecsTest.java b/common/src/test/java/io/druid/concurrent/ExecsTest.java index caca1b905f2..fdb75260737 100644 --- a/common/src/test/java/io/druid/concurrent/ExecsTest.java +++ b/common/src/test/java/io/druid/concurrent/ExecsTest.java @@ -71,6 +71,7 @@ public class ExecsTest producer.submit( new Runnable() { + @Override public void run() { for (int i = 0; i < nTasks; i++) { diff --git a/common/src/test/java/io/druid/guice/LifecycleScopeTest.java b/common/src/test/java/io/druid/guice/LifecycleScopeTest.java index f08cc863021..7deefe3a4d3 100644 --- a/common/src/test/java/io/druid/guice/LifecycleScopeTest.java +++ b/common/src/test/java/io/druid/guice/LifecycleScopeTest.java @@ -193,16 +193,19 @@ public class LifecycleScopeTest ++ran; } + @Override public int getStarted() { return started; } + @Override public int getStopped() { return stopped; } + @Override public int getRan() { return ran; @@ -233,16 +236,19 @@ public class LifecycleScopeTest ++ran; } + @Override public int getStarted() { return started; } + @Override public int getStopped() { return stopped; } + @Override public int getRan() { return ran; diff --git a/examples/src/main/java/io/druid/examples/twitter/TwitterSpritzerFirehoseFactory.java b/examples/src/main/java/io/druid/examples/twitter/TwitterSpritzerFirehoseFactory.java index 9333e58126e..3694de41c47 100644 --- a/examples/src/main/java/io/druid/examples/twitter/TwitterSpritzerFirehoseFactory.java +++ b/examples/src/main/java/io/druid/examples/twitter/TwitterSpritzerFirehoseFactory.java @@ -213,6 +213,7 @@ public class TwitterSpritzerFirehoseFactory implements FirehoseFactory /** * @return true if the iterator has more elements. */ + @Override boolean hasNext(); /** @@ -612,6 +613,7 @@ public interface IntSet extends Cloneable, Comparable * * @throws NoSuchElementException iteration has no more elements. */ + @Override int next(); /** @@ -648,6 +650,7 @@ public interface IntSet extends Cloneable, Comparable * * @return a clone of the IntIterator */ + @Override public IntIterator clone(); } } diff --git a/extensions-contrib/parquet-extensions/src/main/java/org/apache/parquet/avro/DruidParquetReadSupport.java b/extensions-contrib/parquet-extensions/src/main/java/org/apache/parquet/avro/DruidParquetReadSupport.java index a8e564bd91d..f4f17f9e279 100755 --- a/extensions-contrib/parquet-extensions/src/main/java/org/apache/parquet/avro/DruidParquetReadSupport.java +++ b/extensions-contrib/parquet-extensions/src/main/java/org/apache/parquet/avro/DruidParquetReadSupport.java @@ -73,6 +73,7 @@ public class DruidParquetReadSupport extends AvroReadSupport return new MessageType(name, partialFields); } + @Override public ReadContext init(InitContext context) { MessageType requestedProjection = getSchemaForRead(context.getFileSchema(), getPartialReadSchema(context)); diff --git a/extensions-contrib/scan-query/src/main/java/io/druid/query/scan/ScanQueryDruidModule.java b/extensions-contrib/scan-query/src/main/java/io/druid/query/scan/ScanQueryDruidModule.java index f33ea997b26..4a1633aaa38 100644 --- a/extensions-contrib/scan-query/src/main/java/io/druid/query/scan/ScanQueryDruidModule.java +++ b/extensions-contrib/scan-query/src/main/java/io/druid/query/scan/ScanQueryDruidModule.java @@ -30,6 +30,7 @@ import java.util.Arrays; import java.util.List; public class ScanQueryDruidModule implements DruidModule { + @Override public void configure(Binder binder) { DruidBinders.queryToolChestBinder(binder) .addBinding(ScanQuery.class) @@ -42,6 +43,7 @@ public class ScanQueryDruidModule implements DruidModule { .in(LazySingleton.class); } + @Override public List getJacksonModules() { return Arrays.asList( new SimpleModule("ScanQueryDruidModule") diff --git a/extensions-contrib/thrift-extensions/pom.xml b/extensions-contrib/thrift-extensions/pom.xml index 0e2a2969c96..36d11e426f3 100644 --- a/extensions-contrib/thrift-extensions/pom.xml +++ b/extensions-contrib/thrift-extensions/pom.xml @@ -96,4 +96,24 @@ + + + + strict + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + -Xep:MissingOverride:WARN + + + + + + + diff --git a/extensions-contrib/virtual-columns/src/main/java/io/druid/segment/MapVirtualColumn.java b/extensions-contrib/virtual-columns/src/main/java/io/druid/segment/MapVirtualColumn.java index 33ce97c231e..581561d0190 100644 --- a/extensions-contrib/virtual-columns/src/main/java/io/druid/segment/MapVirtualColumn.java +++ b/extensions-contrib/virtual-columns/src/main/java/io/druid/segment/MapVirtualColumn.java @@ -226,6 +226,7 @@ public class MapVirtualColumn implements VirtualColumn return valueDimension; } + @Override @JsonProperty public String getOutputName() { diff --git a/extensions-core/avro-extensions/pom.xml b/extensions-core/avro-extensions/pom.xml index 7a02571d044..a02d043223d 100644 --- a/extensions-core/avro-extensions/pom.xml +++ b/extensions-core/avro-extensions/pom.xml @@ -140,4 +140,24 @@ + + + + strict + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + -Xep:MissingOverride:WARN + + + + + + + diff --git a/extensions-core/avro-extensions/src/test/java/io/druid/data/input/AvroStreamInputRowParserTest.java b/extensions-core/avro-extensions/src/test/java/io/druid/data/input/AvroStreamInputRowParserTest.java index c83682142d6..e8d24e76012 100644 --- a/extensions-core/avro-extensions/src/test/java/io/druid/data/input/AvroStreamInputRowParserTest.java +++ b/extensions-core/avro-extensions/src/test/java/io/druid/data/input/AvroStreamInputRowParserTest.java @@ -109,6 +109,7 @@ public class AvroStreamInputRowParserTest public static final ByteBuffer SOME_BYTES_VALUE = ByteBuffer.allocate(8); private static final Function TO_STRING_INCLUDING_NULL = new Function() { + @Override public String apply(Object o) { return String.valueOf(o); } }; diff --git a/extensions-core/histogram/src/main/java/io/druid/query/aggregation/histogram/ApproximateHistogramFoldingSerde.java b/extensions-core/histogram/src/main/java/io/druid/query/aggregation/histogram/ApproximateHistogramFoldingSerde.java index 9dc37b61b2a..d1e20092a32 100644 --- a/extensions-core/histogram/src/main/java/io/druid/query/aggregation/histogram/ApproximateHistogramFoldingSerde.java +++ b/extensions-core/histogram/src/main/java/io/druid/query/aggregation/histogram/ApproximateHistogramFoldingSerde.java @@ -107,6 +107,7 @@ public class ApproximateHistogramFoldingSerde extends ComplexMetricSerde return LargeColumnSupportedComplexColumnSerializer.create(peon, column, this.getObjectStrategy()); } + @Override public ObjectStrategy getObjectStrategy() { return new ObjectStrategy() diff --git a/extensions-core/kafka-indexing-service/src/main/java/io/druid/indexing/kafka/KafkaTuningConfig.java b/extensions-core/kafka-indexing-service/src/main/java/io/druid/indexing/kafka/KafkaTuningConfig.java index f02eb5a923b..fa721f2bd7a 100644 --- a/extensions-core/kafka-indexing-service/src/main/java/io/druid/indexing/kafka/KafkaTuningConfig.java +++ b/extensions-core/kafka-indexing-service/src/main/java/io/druid/indexing/kafka/KafkaTuningConfig.java @@ -98,6 +98,7 @@ public class KafkaTuningConfig implements TuningConfig, AppenderatorConfig ); } + @Override @JsonProperty public int getMaxRowsInMemory() { @@ -110,24 +111,28 @@ public class KafkaTuningConfig implements TuningConfig, AppenderatorConfig return maxRowsPerSegment; } + @Override @JsonProperty public Period getIntermediatePersistPeriod() { return intermediatePersistPeriod; } + @Override @JsonProperty public File getBasePersistDirectory() { return basePersistDirectory; } + @Override @JsonProperty public int getMaxPendingPersists() { return maxPendingPersists; } + @Override @JsonProperty public IndexSpec getIndexSpec() { @@ -140,6 +145,7 @@ public class KafkaTuningConfig implements TuningConfig, AppenderatorConfig return buildV9Directly; } + @Override @JsonProperty public boolean isReportParseExceptions() { diff --git a/extensions-core/lookups-cached-global/src/main/java/io/druid/server/lookup/namespace/cache/CacheHandler.java b/extensions-core/lookups-cached-global/src/main/java/io/druid/server/lookup/namespace/cache/CacheHandler.java index c249661eb63..e56bf505748 100644 --- a/extensions-core/lookups-cached-global/src/main/java/io/druid/server/lookup/namespace/cache/CacheHandler.java +++ b/extensions-core/lookups-cached-global/src/main/java/io/druid/server/lookup/namespace/cache/CacheHandler.java @@ -44,6 +44,7 @@ public final class CacheHandler implements AutoCloseable return cache; } + @Override public void close() { cacheManager.disposeCache(this); diff --git a/extensions-core/lookups-cached-single/src/main/java/io/druid/server/lookup/cache/loading/LoadingCache.java b/extensions-core/lookups-cached-single/src/main/java/io/druid/server/lookup/cache/loading/LoadingCache.java index 2abde26b6f0..5a32ea93470 100644 --- a/extensions-core/lookups-cached-single/src/main/java/io/druid/server/lookup/cache/loading/LoadingCache.java +++ b/extensions-core/lookups-cached-single/src/main/java/io/druid/server/lookup/cache/loading/LoadingCache.java @@ -128,5 +128,6 @@ public interface LoadingCache extends Closeable * the namespace deletion event should call this method to clean up resources. */ + @Override void close(); } diff --git a/extensions-core/s3-extensions/src/main/java/io/druid/storage/s3/AWSSessionCredentialsAdapter.java b/extensions-core/s3-extensions/src/main/java/io/druid/storage/s3/AWSSessionCredentialsAdapter.java index d5bc25677fc..abaa8f03076 100644 --- a/extensions-core/s3-extensions/src/main/java/io/druid/storage/s3/AWSSessionCredentialsAdapter.java +++ b/extensions-core/s3-extensions/src/main/java/io/druid/storage/s3/AWSSessionCredentialsAdapter.java @@ -54,6 +54,7 @@ public class AWSSessionCredentialsAdapter extends AWSSessionCredentials { return provider.getCredentials().getAWSSecretKey(); } + @Override public String getSessionToken() { com.amazonaws.auth.AWSSessionCredentials sessionCredentials = (com.amazonaws.auth.AWSSessionCredentials) provider.getCredentials(); diff --git a/extensions-core/s3-extensions/src/main/java/io/druid/storage/s3/S3DataSegmentPuller.java b/extensions-core/s3-extensions/src/main/java/io/druid/storage/s3/S3DataSegmentPuller.java index eb7ca2ddd2b..56b12145254 100644 --- a/extensions-core/s3-extensions/src/main/java/io/druid/storage/s3/S3DataSegmentPuller.java +++ b/extensions-core/s3-extensions/src/main/java/io/druid/storage/s3/S3DataSegmentPuller.java @@ -363,6 +363,7 @@ public class S3DataSegmentPuller implements DataSegmentPuller, URIDataPuller this.path = key; } + @Override public String toString() { return String.format("s3://%s/%s", bucket, path); diff --git a/extensions-core/s3-extensions/src/main/java/io/druid/storage/s3/S3TaskLogs.java b/extensions-core/s3-extensions/src/main/java/io/druid/storage/s3/S3TaskLogs.java index 0a3cdcebe0f..83e931e6bd5 100644 --- a/extensions-core/s3-extensions/src/main/java/io/druid/storage/s3/S3TaskLogs.java +++ b/extensions-core/s3-extensions/src/main/java/io/druid/storage/s3/S3TaskLogs.java @@ -108,6 +108,7 @@ public class S3TaskLogs implements TaskLogs } } + @Override public void pushTaskLog(final String taskid, final File logFile) throws IOException { final String taskKey = getTaskLogKey(taskid); diff --git a/indexing-hadoop/src/main/java/io/druid/indexer/DetermineHashedPartitionsJob.java b/indexing-hadoop/src/main/java/io/druid/indexer/DetermineHashedPartitionsJob.java index 0256a8835aa..f231f9f005f 100644 --- a/indexing-hadoop/src/main/java/io/druid/indexer/DetermineHashedPartitionsJob.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/DetermineHashedPartitionsJob.java @@ -75,6 +75,7 @@ public class DetermineHashedPartitionsJob implements Jobby this.config = config; } + @Override public boolean run() { try { diff --git a/indexing-hadoop/src/main/java/io/druid/indexer/DeterminePartitionsJob.java b/indexing-hadoop/src/main/java/io/druid/indexer/DeterminePartitionsJob.java index e1f21df70e0..0792272db1f 100644 --- a/indexing-hadoop/src/main/java/io/druid/indexer/DeterminePartitionsJob.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/DeterminePartitionsJob.java @@ -104,6 +104,7 @@ public class DeterminePartitionsJob implements Jobby this.config = config; } + @Override public boolean run() { try { diff --git a/indexing-hadoop/src/main/java/io/druid/indexer/IndexGeneratorJob.java b/indexing-hadoop/src/main/java/io/druid/indexer/IndexGeneratorJob.java index b3ce809f39d..68a49c744e5 100644 --- a/indexing-hadoop/src/main/java/io/druid/indexer/IndexGeneratorJob.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/IndexGeneratorJob.java @@ -153,6 +153,7 @@ public class IndexGeneratorJob implements Jobby return jobStats; } + @Override public boolean run() { try { diff --git a/indexing-hadoop/src/main/java/io/druid/indexer/hadoop/FSSpideringIterator.java b/indexing-hadoop/src/main/java/io/druid/indexer/hadoop/FSSpideringIterator.java index 22d558628d7..453fa7f5ada 100644 --- a/indexing-hadoop/src/main/java/io/druid/indexer/hadoop/FSSpideringIterator.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/hadoop/FSSpideringIterator.java @@ -50,6 +50,7 @@ public class FSSpideringIterator implements Iterator { return new Iterable() { + @Override public Iterator iterator() { return spiderPathPropagateExceptions(fs, path); @@ -72,6 +73,7 @@ public class FSSpideringIterator implements Iterator this.statii = statii; } + @Override public boolean hasNext() { if (statuses != null && !statuses.hasNext()) { @@ -81,6 +83,7 @@ public class FSSpideringIterator implements Iterator return index < statii.length; } + @Override public FileStatus next() { while (hasNext()) { @@ -98,6 +101,7 @@ public class FSSpideringIterator implements Iterator throw new NoSuchElementException(); } + @Override public void remove() { throw new UnsupportedOperationException(); diff --git a/indexing-hadoop/src/main/java/io/druid/indexer/partitions/AbstractPartitionsSpec.java b/indexing-hadoop/src/main/java/io/druid/indexer/partitions/AbstractPartitionsSpec.java index 7908ba5b3c7..b227059ce6b 100644 --- a/indexing-hadoop/src/main/java/io/druid/indexer/partitions/AbstractPartitionsSpec.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/partitions/AbstractPartitionsSpec.java @@ -52,18 +52,21 @@ public abstract class AbstractPartitionsSpec implements PartitionsSpec ); } + @Override @JsonProperty public long getTargetPartitionSize() { return targetPartitionSize; } + @Override @JsonProperty public long getMaxPartitionSize() { return maxPartitionSize; } + @Override @JsonProperty public boolean isAssumeGrouped() { diff --git a/indexing-service/src/main/java/io/druid/indexing/common/actions/LockAcquireAction.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/LockAcquireAction.java index 6d05a9cf6f7..2d61f063924 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/actions/LockAcquireAction.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/LockAcquireAction.java @@ -47,6 +47,7 @@ public class LockAcquireAction implements TaskAction return interval; } + @Override public TypeReference getReturnTypeReference() { return new TypeReference() diff --git a/indexing-service/src/main/java/io/druid/indexing/common/actions/LockListAction.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/LockListAction.java index 40ea12abe38..06cea468810 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/actions/LockListAction.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/LockListAction.java @@ -27,6 +27,7 @@ import java.util.List; public class LockListAction implements TaskAction> { + @Override public TypeReference> getReturnTypeReference() { return new TypeReference>() {}; diff --git a/indexing-service/src/main/java/io/druid/indexing/common/actions/LockReleaseAction.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/LockReleaseAction.java index 8a3ffa6c0a1..f68e780ed6f 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/actions/LockReleaseAction.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/LockReleaseAction.java @@ -45,6 +45,7 @@ public class LockReleaseAction implements TaskAction return interval; } + @Override public TypeReference getReturnTypeReference() { return new TypeReference() {}; diff --git a/indexing-service/src/main/java/io/druid/indexing/common/actions/LockTryAcquireAction.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/LockTryAcquireAction.java index 06243a8fc87..28cfd6ef22a 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/actions/LockTryAcquireAction.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/LockTryAcquireAction.java @@ -46,6 +46,7 @@ public class LockTryAcquireAction implements TaskAction return interval; } + @Override public TypeReference getReturnTypeReference() { return new TypeReference() diff --git a/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentInsertAction.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentInsertAction.java index 2e3dbd5d941..d73c073c9dd 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentInsertAction.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentInsertAction.java @@ -56,6 +56,7 @@ public class SegmentInsertAction implements TaskAction> return segments; } + @Override public TypeReference> getReturnTypeReference() { return new TypeReference>() diff --git a/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentListUnusedAction.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentListUnusedAction.java index 83585a9869b..1836d2cf9ae 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentListUnusedAction.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentListUnusedAction.java @@ -60,6 +60,7 @@ public class SegmentListUnusedAction implements TaskAction> return interval; } + @Override public TypeReference> getReturnTypeReference() { return new TypeReference>() {}; diff --git a/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentListUsedAction.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentListUsedAction.java index 4cf77449c3b..6e4e52c6b5d 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentListUsedAction.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentListUsedAction.java @@ -76,6 +76,7 @@ public class SegmentListUsedAction implements TaskAction> return intervals; } + @Override public TypeReference> getReturnTypeReference() { return new TypeReference>() {}; diff --git a/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentMetadataUpdateAction.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentMetadataUpdateAction.java index de5670f0d7f..6162dce4e8c 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentMetadataUpdateAction.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentMetadataUpdateAction.java @@ -51,6 +51,7 @@ public class SegmentMetadataUpdateAction implements TaskAction return segments; } + @Override public TypeReference getReturnTypeReference() { return new TypeReference() {}; diff --git a/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentNukeAction.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentNukeAction.java index 3f195c563f5..2d078ebfaee 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentNukeAction.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentNukeAction.java @@ -51,6 +51,7 @@ public class SegmentNukeAction implements TaskAction return segments; } + @Override public TypeReference getReturnTypeReference() { return new TypeReference() diff --git a/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentTransactionalInsertAction.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentTransactionalInsertAction.java index d15793e9b95..806969e860c 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentTransactionalInsertAction.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentTransactionalInsertAction.java @@ -84,6 +84,7 @@ public class SegmentTransactionalInsertAction implements TaskAction getReturnTypeReference() { return new TypeReference() 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 c69381708f2..54b6c5ae308 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 @@ -147,6 +147,7 @@ public class HadoopIndexTask extends HadoopTask return spec; } + @Override @JsonProperty public List getHadoopDependencyCoordinates() { diff --git a/indexing-service/src/main/java/io/druid/indexing/overlord/ForkingTaskRunner.java b/indexing-service/src/main/java/io/druid/indexing/overlord/ForkingTaskRunner.java index 6ab7e39066e..b6818124290 100644 --- a/indexing-service/src/main/java/io/druid/indexing/overlord/ForkingTaskRunner.java +++ b/indexing-service/src/main/java/io/druid/indexing/overlord/ForkingTaskRunner.java @@ -516,6 +516,7 @@ public class ForkingTaskRunner implements TaskRunner, TaskLogStreamer } } + @Override @LifecycleStop public void stop() { diff --git a/indexing-service/src/main/java/io/druid/indexing/overlord/RemoteTaskRunner.java b/indexing-service/src/main/java/io/druid/indexing/overlord/RemoteTaskRunner.java index c83e015e24e..fb66e53e610 100644 --- a/indexing-service/src/main/java/io/druid/indexing/overlord/RemoteTaskRunner.java +++ b/indexing-service/src/main/java/io/druid/indexing/overlord/RemoteTaskRunner.java @@ -428,12 +428,14 @@ public class RemoteTaskRunner implements WorkerTaskRunner, TaskLogStreamer return ImmutableList.copyOf(pendingTasks.values()); } + @Override public Collection getPendingTaskPayloads() { // return a snapshot of current pending task payloads. return ImmutableList.copyOf(pendingTaskPayloads.values()); } + @Override public RemoteTaskRunnerConfig getConfig() { return config; diff --git a/indexing-service/src/main/java/io/druid/indexing/overlord/autoscaling/PendingTaskBasedWorkerResourceManagementConfig.java b/indexing-service/src/main/java/io/druid/indexing/overlord/autoscaling/PendingTaskBasedWorkerResourceManagementConfig.java index 4d107865797..7d120ed5c4d 100644 --- a/indexing-service/src/main/java/io/druid/indexing/overlord/autoscaling/PendingTaskBasedWorkerResourceManagementConfig.java +++ b/indexing-service/src/main/java/io/druid/indexing/overlord/autoscaling/PendingTaskBasedWorkerResourceManagementConfig.java @@ -41,30 +41,35 @@ public class PendingTaskBasedWorkerResourceManagementConfig extends SimpleWorker return this; } + @Override public PendingTaskBasedWorkerResourceManagementConfig setWorkerIdleTimeout(Period workerIdleTimeout) { super.setWorkerIdleTimeout(workerIdleTimeout); return this; } + @Override public PendingTaskBasedWorkerResourceManagementConfig setMaxScalingDuration(Period maxScalingDuration) { super.setMaxScalingDuration(maxScalingDuration); return this; } + @Override public PendingTaskBasedWorkerResourceManagementConfig setNumEventsToTrack(int numEventsToTrack) { super.setNumEventsToTrack(numEventsToTrack); return this; } + @Override public PendingTaskBasedWorkerResourceManagementConfig setWorkerVersion(String workerVersion) { super.setWorkerVersion(workerVersion); return this; } + @Override public PendingTaskBasedWorkerResourceManagementConfig setPendingTaskTimeout(Period pendingTaskTimeout) { super.setPendingTaskTimeout(pendingTaskTimeout); diff --git a/indexing-service/src/main/java/io/druid/indexing/overlord/autoscaling/SimpleWorkerResourceManagementStrategy.java b/indexing-service/src/main/java/io/druid/indexing/overlord/autoscaling/SimpleWorkerResourceManagementStrategy.java index 1a7696565ea..4907ac0baaa 100644 --- a/indexing-service/src/main/java/io/druid/indexing/overlord/autoscaling/SimpleWorkerResourceManagementStrategy.java +++ b/indexing-service/src/main/java/io/druid/indexing/overlord/autoscaling/SimpleWorkerResourceManagementStrategy.java @@ -94,6 +94,7 @@ public class SimpleWorkerResourceManagementStrategy extends AbstractWorkerResour } + @Override protected boolean doProvision(WorkerTaskRunner runner) { Collection pendingTasks = runner.getPendingTasks(); @@ -163,6 +164,7 @@ public class SimpleWorkerResourceManagementStrategy extends AbstractWorkerResour } } + @Override boolean doTerminate(WorkerTaskRunner runner) { Collection pendingTasks = runner.getPendingTasks(); diff --git a/indexing-service/src/test/java/io/druid/indexing/overlord/RemoteTaskRunnerRunPendingTasksConcurrencyTest.java b/indexing-service/src/test/java/io/druid/indexing/overlord/RemoteTaskRunnerRunPendingTasksConcurrencyTest.java index 57ae6d155ad..fb870d279f8 100644 --- a/indexing-service/src/test/java/io/druid/indexing/overlord/RemoteTaskRunnerRunPendingTasksConcurrencyTest.java +++ b/indexing-service/src/test/java/io/druid/indexing/overlord/RemoteTaskRunnerRunPendingTasksConcurrencyTest.java @@ -65,6 +65,7 @@ public class RemoteTaskRunnerRunPendingTasksConcurrencyTest remoteTaskRunner = rtrTestUtils.makeRemoteTaskRunner( new TestRemoteTaskRunnerConfig(new Period("PT3600S")) { + @Override public int getPendingTasksRunnerNumThreads() { return 2; diff --git a/java-util/src/main/java/io/druid/java/util/common/collect/CountingMap.java b/java-util/src/main/java/io/druid/java/util/common/collect/CountingMap.java index 6e7911c0b7f..1fbdc8894ea 100644 --- a/java-util/src/main/java/io/druid/java/util/common/collect/CountingMap.java +++ b/java-util/src/main/java/io/druid/java/util/common/collect/CountingMap.java @@ -41,6 +41,7 @@ public class CountingMap extends AbstractMap counts.get(k).addAndGet(n); } + @Override public Set> entrySet() { return Maps.transformValues( diff --git a/java-util/src/main/java/io/druid/java/util/common/concurrent/ScheduledExecutors.java b/java-util/src/main/java/io/druid/java/util/common/concurrent/ScheduledExecutors.java index e8588f66c28..d636d320bdc 100644 --- a/java-util/src/main/java/io/druid/java/util/common/concurrent/ScheduledExecutors.java +++ b/java-util/src/main/java/io/druid/java/util/common/concurrent/ScheduledExecutors.java @@ -192,13 +192,7 @@ public class ScheduledExecutors public static ScheduledExecutorFactory createFactory(final Lifecycle lifecycle) { - return new ScheduledExecutorFactory() - { - public ScheduledExecutorService create(int corePoolSize, String nameFormat) - { - return ExecutorServices.manageLifecycle(lifecycle, fixed(corePoolSize, nameFormat)); - } - }; + return (corePoolSize, nameFormat) -> ExecutorServices.manageLifecycle(lifecycle, fixed(corePoolSize, nameFormat)); } public static ScheduledExecutorService fixed(int corePoolSize, String nameFormat) diff --git a/java-util/src/main/java/io/druid/java/util/common/guava/DroppingIterable.java b/java-util/src/main/java/io/druid/java/util/common/guava/DroppingIterable.java index fa83642e7c8..86e51f84dca 100644 --- a/java-util/src/main/java/io/druid/java/util/common/guava/DroppingIterable.java +++ b/java-util/src/main/java/io/druid/java/util/common/guava/DroppingIterable.java @@ -37,6 +37,7 @@ public class DroppingIterable implements Iterable this.numToDrop = numToDrop; } + @Override public Iterator iterator() { return new DroppingIterator<>(delegate.iterator(), numToDrop); diff --git a/java-util/src/main/java/io/druid/java/util/common/guava/DroppingIterator.java b/java-util/src/main/java/io/druid/java/util/common/guava/DroppingIterator.java index da7e22db66c..e65b72fe584 100644 --- a/java-util/src/main/java/io/druid/java/util/common/guava/DroppingIterator.java +++ b/java-util/src/main/java/io/druid/java/util/common/guava/DroppingIterator.java @@ -38,6 +38,7 @@ public class DroppingIterator implements Iterator this.numToDrop = numToDrop; } + @Override public boolean hasNext() { if (! dropped) { @@ -50,6 +51,7 @@ public class DroppingIterator implements Iterator return delegate.hasNext(); } + @Override public T next() { if (! dropped) { @@ -61,6 +63,7 @@ public class DroppingIterator implements Iterator return delegate.next(); } + @Override public void remove() { throw new UnsupportedOperationException(); diff --git a/java-util/src/main/java/io/druid/java/util/common/guava/FunctionalIterable.java b/java-util/src/main/java/io/druid/java/util/common/guava/FunctionalIterable.java index d05f578399a..f247fc59414 100644 --- a/java-util/src/main/java/io/druid/java/util/common/guava/FunctionalIterable.java +++ b/java-util/src/main/java/io/druid/java/util/common/guava/FunctionalIterable.java @@ -58,6 +58,7 @@ public class FunctionalIterable implements Iterable this.delegate = delegate; } + @Override public Iterator iterator() { return delegate.iterator(); diff --git a/java-util/src/main/java/io/druid/java/util/common/guava/FunctionalIterator.java b/java-util/src/main/java/io/druid/java/util/common/guava/FunctionalIterator.java index 2c9f21a21eb..a829ae916da 100644 --- a/java-util/src/main/java/io/druid/java/util/common/guava/FunctionalIterator.java +++ b/java-util/src/main/java/io/druid/java/util/common/guava/FunctionalIterator.java @@ -58,16 +58,19 @@ public class FunctionalIterator implements Iterator this.delegate = delegate; } + @Override public boolean hasNext() { return delegate.hasNext(); } + @Override public T next() { return delegate.next(); } + @Override public void remove() { delegate.remove(); diff --git a/java-util/src/main/java/io/druid/java/util/common/parsers/JavaScriptParser.java b/java-util/src/main/java/io/druid/java/util/common/parsers/JavaScriptParser.java index 2357be2245c..6cbb6e43051 100644 --- a/java-util/src/main/java/io/druid/java/util/common/parsers/JavaScriptParser.java +++ b/java-util/src/main/java/io/druid/java/util/common/parsers/JavaScriptParser.java @@ -44,6 +44,7 @@ public class JavaScriptParser implements Parser return new Function() { + @Override public Object apply(Object input) { // ideally we need a close() function to discard the context once it is not used anymore diff --git a/pom.xml b/pom.xml index 3d4b78166bf..7527bc50e7b 100644 --- a/pom.xml +++ b/pom.xml @@ -1022,8 +1022,11 @@ false -XepDisableWarningsInGeneratedCode + -Xep:ClassCanBeStatic:ERROR -Xep:PreconditionsInvalidPlaceholder:ERROR + -Xep:MissingOverride:ERROR + -Xep:ArgumentParameterSwap -Xep:AssistedInjectAndInjectOnSameConstructor -Xep:AutoFactoryAtInject diff --git a/processing/src/main/java/io/druid/query/DruidProcessingConfig.java b/processing/src/main/java/io/druid/query/DruidProcessingConfig.java index 94d349fd3fb..5445e5a7324 100644 --- a/processing/src/main/java/io/druid/query/DruidProcessingConfig.java +++ b/processing/src/main/java/io/druid/query/DruidProcessingConfig.java @@ -52,6 +52,7 @@ public abstract class DruidProcessingConfig extends ExecutorServiceConfig implem return Math.max(2, getNumThreads() / 4); } + @Override @Config(value = "${base_path}.columnCache.sizeBytes") public int columnCacheSizeBytes() { diff --git a/processing/src/main/java/io/druid/query/QueryDataSource.java b/processing/src/main/java/io/druid/query/QueryDataSource.java index 0797f2f5f80..6e96eaa6505 100644 --- a/processing/src/main/java/io/druid/query/QueryDataSource.java +++ b/processing/src/main/java/io/druid/query/QueryDataSource.java @@ -49,6 +49,7 @@ public class QueryDataSource implements DataSource return query; } + @Override public String toString() { return query.toString(); } @Override diff --git a/processing/src/main/java/io/druid/query/TableDataSource.java b/processing/src/main/java/io/druid/query/TableDataSource.java index 083595f54f0..c558abe4c5a 100644 --- a/processing/src/main/java/io/druid/query/TableDataSource.java +++ b/processing/src/main/java/io/druid/query/TableDataSource.java @@ -48,6 +48,7 @@ public class TableDataSource implements DataSource return Collections.singletonList(name); } + @Override public String toString() { return name; } @Override diff --git a/processing/src/main/java/io/druid/query/aggregation/Aggregator.java b/processing/src/main/java/io/druid/query/aggregation/Aggregator.java index 5a412fa1f55..2eb34645f90 100644 --- a/processing/src/main/java/io/druid/query/aggregation/Aggregator.java +++ b/processing/src/main/java/io/druid/query/aggregation/Aggregator.java @@ -41,6 +41,7 @@ public interface Aggregator extends Closeable Object get(); float getFloat(); + @Override void close(); long getLong(); diff --git a/processing/src/main/java/io/druid/query/aggregation/BufferAggregator.java b/processing/src/main/java/io/druid/query/aggregation/BufferAggregator.java index c8e957605d8..16574ac0e3e 100644 --- a/processing/src/main/java/io/druid/query/aggregation/BufferAggregator.java +++ b/processing/src/main/java/io/druid/query/aggregation/BufferAggregator.java @@ -123,6 +123,7 @@ public interface BufferAggregator extends HotLoopCallee *

The default implementation inspects nothing. Classes that implement {@code BufferAggregator} are encouraged to * override this method, following the specification of {@link HotLoopCallee#inspectRuntimeShape}. */ + @Override default void inspectRuntimeShape(RuntimeShapeInspector inspector) { } diff --git a/processing/src/main/java/io/druid/query/aggregation/post/ArithmeticPostAggregator.java b/processing/src/main/java/io/druid/query/aggregation/post/ArithmeticPostAggregator.java index 9f22398ac0f..46a7befb7bd 100644 --- a/processing/src/main/java/io/druid/query/aggregation/post/ArithmeticPostAggregator.java +++ b/processing/src/main/java/io/druid/query/aggregation/post/ArithmeticPostAggregator.java @@ -197,6 +197,7 @@ public class ArithmeticPostAggregator implements PostAggregator { PLUS("+") { + @Override public double compute(double lhs, double rhs) { return lhs + rhs; @@ -204,6 +205,7 @@ public class ArithmeticPostAggregator implements PostAggregator }, MINUS("-") { + @Override public double compute(double lhs, double rhs) { return lhs - rhs; @@ -211,6 +213,7 @@ public class ArithmeticPostAggregator implements PostAggregator }, MULT("*") { + @Override public double compute(double lhs, double rhs) { return lhs * rhs; @@ -218,6 +221,7 @@ public class ArithmeticPostAggregator implements PostAggregator }, DIV("/") { + @Override public double compute(double lhs, double rhs) { return (rhs == 0.0) ? 0 : (lhs / rhs); @@ -225,6 +229,7 @@ public class ArithmeticPostAggregator implements PostAggregator }, QUOTIENT("quotient") { + @Override public double compute(double lhs, double rhs) { return lhs / rhs; @@ -267,6 +272,7 @@ public class ArithmeticPostAggregator implements PostAggregator public static enum Ordering implements Comparator { // ensures the following order: numeric > NaN > Infinite numericFirst { + @Override public int compare(Double lhs, Double rhs) { if(isFinite(lhs) && !isFinite(rhs)) { return 1; diff --git a/processing/src/main/java/io/druid/query/aggregation/post/ExpressionPostAggregator.java b/processing/src/main/java/io/druid/query/aggregation/post/ExpressionPostAggregator.java index 149bf675aed..a0c70107016 100644 --- a/processing/src/main/java/io/druid/query/aggregation/post/ExpressionPostAggregator.java +++ b/processing/src/main/java/io/druid/query/aggregation/post/ExpressionPostAggregator.java @@ -148,6 +148,7 @@ public class ExpressionPostAggregator implements PostAggregator { // ensures the following order: numeric > NaN > Infinite numericFirst { + @Override public int compare(Number lhs, Number rhs) { if (lhs instanceof Long && rhs instanceof Long) { diff --git a/processing/src/main/java/io/druid/query/aggregation/post/JavaScriptPostAggregator.java b/processing/src/main/java/io/druid/query/aggregation/post/JavaScriptPostAggregator.java index cf96a4d5afb..0b285c3e8c0 100644 --- a/processing/src/main/java/io/druid/query/aggregation/post/JavaScriptPostAggregator.java +++ b/processing/src/main/java/io/druid/query/aggregation/post/JavaScriptPostAggregator.java @@ -68,6 +68,7 @@ public class JavaScriptPostAggregator implements PostAggregator return new Function() { + @Override public double apply(Object[] args) { // ideally we need a close() function to discard the context once it is not used anymore diff --git a/processing/src/main/java/io/druid/query/extraction/CascadeExtractionFn.java b/processing/src/main/java/io/druid/query/extraction/CascadeExtractionFn.java index 9396e65691c..22e51b726c3 100644 --- a/processing/src/main/java/io/druid/query/extraction/CascadeExtractionFn.java +++ b/processing/src/main/java/io/druid/query/extraction/CascadeExtractionFn.java @@ -34,31 +34,37 @@ public class CascadeExtractionFn implements ExtractionFn private final ChainedExtractionFn DEFAULT_CHAINED_EXTRACTION_FN = new ChainedExtractionFn( new ExtractionFn() { + @Override public byte[] getCacheKey() { return new byte[0]; } + @Override public String apply(Object value) { return null; } + @Override public String apply(String value) { return null; } + @Override public String apply(long value) { return null; } + @Override public boolean preservesOrdering() { return false; } + @Override public ExtractionType getExtractionType() { return ExtractionType.MANY_TO_ONE; @@ -219,6 +225,7 @@ public class CascadeExtractionFn implements ExtractionFn } } + @Override public boolean equals(Object o) { if (this == o) { @@ -240,6 +247,7 @@ public class CascadeExtractionFn implements ExtractionFn return true; } + @Override public int hashCode() { int result = fn.hashCode(); @@ -249,6 +257,7 @@ public class CascadeExtractionFn implements ExtractionFn return result; } + @Override public String toString() { return (child != null) diff --git a/processing/src/main/java/io/druid/query/extraction/JavaScriptExtractionFn.java b/processing/src/main/java/io/druid/query/extraction/JavaScriptExtractionFn.java index eaa7ce7f3eb..bfb7987b0d0 100644 --- a/processing/src/main/java/io/druid/query/extraction/JavaScriptExtractionFn.java +++ b/processing/src/main/java/io/druid/query/extraction/JavaScriptExtractionFn.java @@ -50,6 +50,7 @@ public class JavaScriptExtractionFn implements ExtractionFn return new Function() { + @Override public String apply(Object input) { // ideally we need a close() function to discard the context once it is not used anymore diff --git a/processing/src/main/java/io/druid/query/filter/NotDimFilter.java b/processing/src/main/java/io/druid/query/filter/NotDimFilter.java index cf4de057c0c..978a685d677 100644 --- a/processing/src/main/java/io/druid/query/filter/NotDimFilter.java +++ b/processing/src/main/java/io/druid/query/filter/NotDimFilter.java @@ -37,6 +37,7 @@ public class NotDimFilter implements DimFilter { private static final Function NEGATE = new Function() { + @Override public DimFilter apply(DimFilter filter) { return Druids.newNotDimFilterBuilder().field(filter).build(); } }; diff --git a/processing/src/main/java/io/druid/query/groupby/GroupByQueryEngine.java b/processing/src/main/java/io/druid/query/groupby/GroupByQueryEngine.java index fb518aa109e..621298a34c9 100644 --- a/processing/src/main/java/io/druid/query/groupby/GroupByQueryEngine.java +++ b/processing/src/main/java/io/druid/query/groupby/GroupByQueryEngine.java @@ -447,6 +447,7 @@ public class GroupByQueryEngine throw new UnsupportedOperationException(); } + @Override public void close() { // cleanup diff --git a/processing/src/main/java/io/druid/query/groupby/having/DimensionSelectorHavingSpec.java b/processing/src/main/java/io/druid/query/groupby/having/DimensionSelectorHavingSpec.java index 5aeade63cd9..2f20ff4df6a 100644 --- a/processing/src/main/java/io/druid/query/groupby/having/DimensionSelectorHavingSpec.java +++ b/processing/src/main/java/io/druid/query/groupby/having/DimensionSelectorHavingSpec.java @@ -69,6 +69,7 @@ public class DimensionSelectorHavingSpec extends BaseHavingSpec return extractionFn; } + @Override public boolean eval(Row row) { List dimRowValList = row.getDimension(dimension); @@ -89,6 +90,7 @@ public class DimensionSelectorHavingSpec extends BaseHavingSpec return false; } + @Override public byte[] getCacheKey() { byte[] dimBytes = StringUtils.toUtf8(dimension); @@ -143,6 +145,7 @@ public class DimensionSelectorHavingSpec extends BaseHavingSpec } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/processing/src/main/java/io/druid/query/ordering/StringComparators.java b/processing/src/main/java/io/druid/query/ordering/StringComparators.java index 03f15b111d2..cdf91c07a43 100644 --- a/processing/src/main/java/io/druid/query/ordering/StringComparators.java +++ b/processing/src/main/java/io/druid/query/ordering/StringComparators.java @@ -98,6 +98,7 @@ public class StringComparators { // This code is based on https://github.com/amjjd/java-alphanum, see // NOTICE file for more information + @Override public int compare(String str1, String str2) { int[] pos = diff --git a/processing/src/main/java/io/druid/query/search/search/SearchSortSpec.java b/processing/src/main/java/io/druid/query/search/search/SearchSortSpec.java index 986e020cdc1..a725bf10fc3 100644 --- a/processing/src/main/java/io/druid/query/search/search/SearchSortSpec.java +++ b/processing/src/main/java/io/druid/query/search/search/SearchSortSpec.java @@ -70,6 +70,7 @@ public class SearchSortSpec return ordering.getCacheKey(); } + @Override public String toString() { return String.format("%sSort", ordering.toString()); diff --git a/processing/src/main/java/io/druid/query/select/PagingOffset.java b/processing/src/main/java/io/druid/query/select/PagingOffset.java index c1d98f2bf5c..57826816a3b 100644 --- a/processing/src/main/java/io/druid/query/select/PagingOffset.java +++ b/processing/src/main/java/io/druid/query/select/PagingOffset.java @@ -70,16 +70,19 @@ public abstract class PagingOffset super(offset, threshold); } + @Override public final boolean isDescending() { return false; } + @Override public final int startDelta() { return startOffset; } + @Override public final int current() { return startOffset + counter; @@ -93,16 +96,19 @@ public abstract class PagingOffset super(offset, threshold); } + @Override public final boolean isDescending() { return true; } + @Override public final int startDelta() { return -startOffset - 1; } + @Override public final int current() { return startOffset - counter; 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 79d123f5598..62cfebe6d08 100644 --- a/processing/src/main/java/io/druid/query/select/SelectQuery.java +++ b/processing/src/main/java/io/druid/query/select/SelectQuery.java @@ -145,6 +145,7 @@ public class SelectQuery extends BaseQuery> return pagingSpec.getOffset(identifier, isDescending()); } + @Override public SelectQuery withQuerySegmentSpec(QuerySegmentSpec querySegmentSpec) { return Druids.SelectQueryBuilder.copy(this).intervals(querySegmentSpec).build(); @@ -156,6 +157,7 @@ public class SelectQuery extends BaseQuery> return Druids.SelectQueryBuilder.copy(this).dataSource(dataSource).build(); } + @Override public SelectQuery withOverriddenContext(Map contextOverrides) { Map newContext = computeOverriddenContext(getContext(), contextOverrides); diff --git a/processing/src/main/java/io/druid/query/timeseries/TimeseriesQuery.java b/processing/src/main/java/io/druid/query/timeseries/TimeseriesQuery.java index 87eed52b8cd..82e6c74e52b 100644 --- a/processing/src/main/java/io/druid/query/timeseries/TimeseriesQuery.java +++ b/processing/src/main/java/io/druid/query/timeseries/TimeseriesQuery.java @@ -129,6 +129,7 @@ public class TimeseriesQuery extends BaseQuery> return getContextBoolean("skipEmptyBuckets", false); } + @Override public TimeseriesQuery withQuerySegmentSpec(QuerySegmentSpec querySegmentSpec) { return Druids.TimeseriesQueryBuilder.copy(this).intervals(querySegmentSpec).build(); @@ -140,6 +141,7 @@ public class TimeseriesQuery extends BaseQuery> return Druids.TimeseriesQueryBuilder.copy(this).dataSource(dataSource).build(); } + @Override public TimeseriesQuery withOverriddenContext(Map contextOverrides) { Map newContext = computeOverriddenContext(getContext(), contextOverrides); diff --git a/processing/src/main/java/io/druid/query/topn/TopNQuery.java b/processing/src/main/java/io/druid/query/topn/TopNQuery.java index 028bdb4d31a..4bdbf70b7a2 100644 --- a/processing/src/main/java/io/druid/query/topn/TopNQuery.java +++ b/processing/src/main/java/io/druid/query/topn/TopNQuery.java @@ -168,6 +168,7 @@ public class TopNQuery extends BaseQuery> topNMetricSpec.initTopNAlgorithmSelector(selector); } + @Override public TopNQuery withQuerySegmentSpec(QuerySegmentSpec querySegmentSpec) { return new TopNQueryBuilder(this).intervals(querySegmentSpec).build(); @@ -199,6 +200,7 @@ public class TopNQuery extends BaseQuery> return new TopNQueryBuilder(this).threshold(threshold).build(); } + @Override public TopNQuery withOverriddenContext(Map contextOverrides) { return new TopNQueryBuilder(this).context(computeOverriddenContext(getContext(), contextOverrides)).build(); diff --git a/processing/src/main/java/io/druid/segment/CompressedVSizeIndexedSupplier.java b/processing/src/main/java/io/druid/segment/CompressedVSizeIndexedSupplier.java index e2a47e36eb5..665802b819d 100644 --- a/processing/src/main/java/io/druid/segment/CompressedVSizeIndexedSupplier.java +++ b/processing/src/main/java/io/druid/segment/CompressedVSizeIndexedSupplier.java @@ -65,11 +65,13 @@ public class CompressedVSizeIndexedSupplier implements WritableSupplier T as(Class clazz) { return getBaseSegment().as(clazz); diff --git a/processing/src/main/java/io/druid/segment/StringDimensionMergerV9.java b/processing/src/main/java/io/druid/segment/StringDimensionMergerV9.java index e270c13887a..509ad6785b2 100644 --- a/processing/src/main/java/io/druid/segment/StringDimensionMergerV9.java +++ b/processing/src/main/java/io/druid/segment/StringDimensionMergerV9.java @@ -496,6 +496,7 @@ public class StringDimensionMergerV9 implements DimensionMergerV9 this.lastVal = NOT_INIT; } + @Override public int seek(int dictId) { if (dimConversions == null) { diff --git a/processing/src/main/java/io/druid/segment/VirtualColumns.java b/processing/src/main/java/io/druid/segment/VirtualColumns.java index 9f4d97f60d5..584a4308c37 100644 --- a/processing/src/main/java/io/druid/segment/VirtualColumns.java +++ b/processing/src/main/java/io/druid/segment/VirtualColumns.java @@ -226,6 +226,7 @@ public class VirtualColumns implements Cacheable return new VirtualizedColumnSelectorFactory(baseFactory, this); } + @Override public byte[] getCacheKey() { // id doesn't matter as there is only one kind of "VirtualColumns", so use 0. diff --git a/processing/src/main/java/io/druid/segment/data/BlockLayoutIndexedLongSupplier.java b/processing/src/main/java/io/druid/segment/data/BlockLayoutIndexedLongSupplier.java index 729d75cc9a2..2976758f9a1 100644 --- a/processing/src/main/java/io/druid/segment/data/BlockLayoutIndexedLongSupplier.java +++ b/processing/src/main/java/io/druid/segment/data/BlockLayoutIndexedLongSupplier.java @@ -87,6 +87,7 @@ public class BlockLayoutIndexedLongSupplier implements Supplier return longBuffer.get(longBuffer.position() + bufferIndex); } + @Override protected void loadBuffer(int bufferNum) { CloseQuietly.close(holder); diff --git a/processing/src/main/java/io/druid/segment/data/CompressedIntsIndexedSupplier.java b/processing/src/main/java/io/druid/segment/data/CompressedIntsIndexedSupplier.java index 4e56126354b..d77de9865f6 100644 --- a/processing/src/main/java/io/druid/segment/data/CompressedIntsIndexedSupplier.java +++ b/processing/src/main/java/io/druid/segment/data/CompressedIntsIndexedSupplier.java @@ -94,6 +94,7 @@ public class CompressedIntsIndexedSupplier implements WritableSupplier implements Iterable, this.value = value; } + @Override public TimeAndDims getKey() { return key; } + @Override public Integer getValue() { return value; @@ -1117,6 +1119,7 @@ public abstract class IncrementalIndex implements Iterable, } } + @Override public Iterable> entrySet() { return facts.entrySet(); @@ -1213,6 +1216,7 @@ public abstract class IncrementalIndex implements Iterable, } } + @Override public Iterable> entrySet() { return concat(facts.values(), false); diff --git a/processing/src/test/java/io/druid/data/input/ProtoTestEventWrapper.java b/processing/src/test/java/io/druid/data/input/ProtoTestEventWrapper.java index e443aa49b3e..ddf2a1d3079 100644 --- a/processing/src/test/java/io/druid/data/input/ProtoTestEventWrapper.java +++ b/processing/src/test/java/io/druid/data/input/ProtoTestEventWrapper.java @@ -84,6 +84,7 @@ public final class ProtoTestEventWrapper { return defaultInstance; } + @Override public ProtoTestEvent getDefaultInstanceForType() { return defaultInstance; } @@ -99,7 +100,8 @@ public final class ProtoTestEventWrapper { return ProtoTestEventWrapper.internal_static_prototest_ProtoTestEvent_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return ProtoTestEventWrapper.internal_static_prototest_ProtoTestEvent_fieldAccessorTable; } @@ -116,6 +118,7 @@ public final class ProtoTestEventWrapper { public static final int CATEGORY_TWO_VALUE = 2; + @Override public final int getNumber() { return value; } public static EventCategory valueOf(int value) { @@ -134,15 +137,18 @@ public final class ProtoTestEventWrapper { private static com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { + @Override public EventCategory findValueByNumber(int number) { return EventCategory.valueOf(number); } }; + @Override public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); } + @Override public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); @@ -180,9 +186,11 @@ public final class ProtoTestEventWrapper { // required .prototest.ProtoTestEvent.EventCategory eventType = 1; public static final int EVENTTYPE_FIELD_NUMBER = 1; private ProtoTestEventWrapper.ProtoTestEvent.EventCategory eventType_; + @Override public boolean hasEventType() { return ((bitField0_ & 0x00000001) == 0x00000001); } + @Override public ProtoTestEventWrapper.ProtoTestEvent.EventCategory getEventType() { return eventType_; } @@ -190,9 +198,11 @@ public final class ProtoTestEventWrapper { // required uint64 id = 2; public static final int ID_FIELD_NUMBER = 2; private long id_; + @Override public boolean hasId() { return ((bitField0_ & 0x00000002) == 0x00000002); } + @Override public long getId() { return id_; } @@ -200,9 +210,11 @@ public final class ProtoTestEventWrapper { // required string timestamp = 3; public static final int TIMESTAMP_FIELD_NUMBER = 3; private java.lang.Object timestamp_; + @Override public boolean hasTimestamp() { return ((bitField0_ & 0x00000004) == 0x00000004); } + @Override public String getTimestamp() { java.lang.Object ref = timestamp_; if (ref instanceof String) { @@ -232,9 +244,11 @@ public final class ProtoTestEventWrapper { // optional uint32 someOtherId = 4; public static final int SOMEOTHERID_FIELD_NUMBER = 4; private int someOtherId_; + @Override public boolean hasSomeOtherId() { return ((bitField0_ & 0x00000008) == 0x00000008); } + @Override public int getSomeOtherId() { return someOtherId_; } @@ -242,9 +256,11 @@ public final class ProtoTestEventWrapper { // optional bool isValid = 5; public static final int ISVALID_FIELD_NUMBER = 5; private boolean isValid_; + @Override public boolean hasIsValid() { return ((bitField0_ & 0x00000010) == 0x00000010); } + @Override public boolean getIsValid() { return isValid_; } @@ -252,9 +268,11 @@ public final class ProtoTestEventWrapper { // optional string description = 6; public static final int DESCRIPTION_FIELD_NUMBER = 6; private java.lang.Object description_; + @Override public boolean hasDescription() { return ((bitField0_ & 0x00000020) == 0x00000020); } + @Override public String getDescription() { java.lang.Object ref = description_; if (ref instanceof String) { @@ -284,9 +302,11 @@ public final class ProtoTestEventWrapper { // optional float someFloatColumn = 7; public static final int SOMEFLOATCOLUMN_FIELD_NUMBER = 7; private float someFloatColumn_; + @Override public boolean hasSomeFloatColumn() { return ((bitField0_ & 0x00000040) == 0x00000040); } + @Override public float getSomeFloatColumn() { return someFloatColumn_; } @@ -294,9 +314,11 @@ public final class ProtoTestEventWrapper { // optional uint32 someIntColumn = 8; public static final int SOMEINTCOLUMN_FIELD_NUMBER = 8; private int someIntColumn_; + @Override public boolean hasSomeIntColumn() { return ((bitField0_ & 0x00000080) == 0x00000080); } + @Override public int getSomeIntColumn() { return someIntColumn_; } @@ -304,9 +326,11 @@ public final class ProtoTestEventWrapper { // optional uint64 someLongColumn = 9; public static final int SOMELONGCOLUMN_FIELD_NUMBER = 9; private long someLongColumn_; + @Override public boolean hasSomeLongColumn() { return ((bitField0_ & 0x00000100) == 0x00000100); } + @Override public long getSomeLongColumn() { return someLongColumn_; } @@ -323,6 +347,7 @@ public final class ProtoTestEventWrapper { someLongColumn_ = 0L; } private byte memoizedIsInitialized = -1; + @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) { @@ -345,6 +370,7 @@ public final class ProtoTestEventWrapper { return true; } + @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -379,6 +405,7 @@ public final class ProtoTestEventWrapper { } private int memoizedSerializedSize = -1; + @Override public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) { @@ -428,7 +455,7 @@ public final class ProtoTestEventWrapper { } private static final long serialVersionUID = 0L; - @java.lang.Override + @Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); @@ -502,28 +529,31 @@ public final class ProtoTestEventWrapper { } public static Builder newBuilder() { return Builder.create(); } + @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(ProtoTestEventWrapper.ProtoTestEvent prototype) { return newBuilder().mergeFrom(prototype); } + @Override public Builder toBuilder() { return newBuilder(this); } @SuppressWarnings("ParameterPackage") @Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder + GeneratedMessage.Builder implements ProtoTestEventWrapper.ProtoTestEventOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ProtoTestEventWrapper.internal_static_prototest_ProtoTestEvent_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return ProtoTestEventWrapper.internal_static_prototest_ProtoTestEvent_fieldAccessorTable; } @@ -538,13 +568,14 @@ public final class ProtoTestEventWrapper { maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + if (GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } + @Override public Builder clear() { super.clear(); eventType_ = ProtoTestEventWrapper.ProtoTestEvent.EventCategory.CATEGORY_ZERO; @@ -568,19 +599,23 @@ public final class ProtoTestEventWrapper { return this; } + @Override public Builder clone() { return create().mergeFrom(buildPartial()); } + @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ProtoTestEventWrapper.ProtoTestEvent.getDescriptor(); } + @Override public ProtoTestEventWrapper.ProtoTestEvent getDefaultInstanceForType() { return ProtoTestEventWrapper.ProtoTestEvent.getDefaultInstance(); } + @Override public ProtoTestEventWrapper.ProtoTestEvent build() { ProtoTestEventWrapper.ProtoTestEvent result = buildPartial(); if (!result.isInitialized()) { @@ -600,6 +635,7 @@ public final class ProtoTestEventWrapper { return result; } + @Override public ProtoTestEventWrapper.ProtoTestEvent buildPartial() { ProtoTestEventWrapper.ProtoTestEvent result = new ProtoTestEventWrapper.ProtoTestEvent(this); int from_bitField0_ = bitField0_; @@ -645,6 +681,7 @@ public final class ProtoTestEventWrapper { return result; } + @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof ProtoTestEventWrapper.ProtoTestEvent) { return mergeFrom((ProtoTestEventWrapper.ProtoTestEvent)other); @@ -689,6 +726,7 @@ public final class ProtoTestEventWrapper { return this; } + @Override public final boolean isInitialized() { if (!hasEventType()) { @@ -705,6 +743,7 @@ public final class ProtoTestEventWrapper { return true; } + @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -787,9 +826,11 @@ public final class ProtoTestEventWrapper { // required .prototest.ProtoTestEvent.EventCategory eventType = 1; private ProtoTestEventWrapper.ProtoTestEvent.EventCategory eventType_ = ProtoTestEventWrapper.ProtoTestEvent.EventCategory.CATEGORY_ZERO; + @Override public boolean hasEventType() { return ((bitField0_ & 0x00000001) == 0x00000001); } + @Override public ProtoTestEventWrapper.ProtoTestEvent.EventCategory getEventType() { return eventType_; } @@ -811,9 +852,11 @@ public final class ProtoTestEventWrapper { // required uint64 id = 2; private long id_ ; + @Override public boolean hasId() { return ((bitField0_ & 0x00000002) == 0x00000002); } + @Override public long getId() { return id_; } @@ -832,9 +875,11 @@ public final class ProtoTestEventWrapper { // required string timestamp = 3; private java.lang.Object timestamp_ = ""; + @Override public boolean hasTimestamp() { return ((bitField0_ & 0x00000004) == 0x00000004); } + @Override public String getTimestamp() { java.lang.Object ref = timestamp_; if (!(ref instanceof String)) { @@ -868,9 +913,11 @@ public final class ProtoTestEventWrapper { // optional uint32 someOtherId = 4; private int someOtherId_ ; + @Override public boolean hasSomeOtherId() { return ((bitField0_ & 0x00000008) == 0x00000008); } + @Override public int getSomeOtherId() { return someOtherId_; } @@ -889,9 +936,11 @@ public final class ProtoTestEventWrapper { // optional bool isValid = 5; private boolean isValid_ ; + @Override public boolean hasIsValid() { return ((bitField0_ & 0x00000010) == 0x00000010); } + @Override public boolean getIsValid() { return isValid_; } @@ -910,9 +959,11 @@ public final class ProtoTestEventWrapper { // optional string description = 6; private java.lang.Object description_ = ""; + @Override public boolean hasDescription() { return ((bitField0_ & 0x00000020) == 0x00000020); } + @Override public String getDescription() { java.lang.Object ref = description_; if (!(ref instanceof String)) { @@ -946,9 +997,11 @@ public final class ProtoTestEventWrapper { // optional float someFloatColumn = 7; private float someFloatColumn_ ; + @Override public boolean hasSomeFloatColumn() { return ((bitField0_ & 0x00000040) == 0x00000040); } + @Override public float getSomeFloatColumn() { return someFloatColumn_; } @@ -967,9 +1020,11 @@ public final class ProtoTestEventWrapper { // optional uint32 someIntColumn = 8; private int someIntColumn_ ; + @Override public boolean hasSomeIntColumn() { return ((bitField0_ & 0x00000080) == 0x00000080); } + @Override public int getSomeIntColumn() { return someIntColumn_; } @@ -988,9 +1043,11 @@ public final class ProtoTestEventWrapper { // optional uint64 someLongColumn = 9; private long someLongColumn_ ; + @Override public boolean hasSomeLongColumn() { return ((bitField0_ & 0x00000100) == 0x00000100); } + @Override public long getSomeLongColumn() { return someLongColumn_; } @@ -1021,7 +1078,7 @@ public final class ProtoTestEventWrapper { private static com.google.protobuf.Descriptors.Descriptor internal_static_prototest_ProtoTestEvent_descriptor; private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable + GeneratedMessage.FieldAccessorTable internal_static_prototest_ProtoTestEvent_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -1045,13 +1102,14 @@ public final class ProtoTestEventWrapper { }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + @Override public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor root) { descriptor = root; internal_static_prototest_ProtoTestEvent_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_prototest_ProtoTestEvent_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( + GeneratedMessage.FieldAccessorTable( internal_static_prototest_ProtoTestEvent_descriptor, new java.lang.String[] { "EventType", "Id", "Timestamp", "SomeOtherId", "IsValid", "Description", "SomeFloatColumn", "SomeIntColumn", "SomeLongColumn", }, ProtoTestEventWrapper.ProtoTestEvent.class, diff --git a/processing/src/test/java/io/druid/query/RetryQueryRunnerTest.java b/processing/src/test/java/io/druid/query/RetryQueryRunnerTest.java index 40f1fff4ad1..eb68d47a4ed 100644 --- a/processing/src/test/java/io/druid/query/RetryQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/RetryQueryRunnerTest.java @@ -165,6 +165,7 @@ public class RetryQueryRunnerTest private int numTries = 1; private boolean returnPartialResults = true; + @Override public int getNumTries() { return numTries; } public boolean returnPartialResults() { return returnPartialResults; } @@ -232,6 +233,7 @@ public class RetryQueryRunnerTest private int numTries = 4; private boolean returnPartialResults = true; + @Override public int getNumTries() { return numTries; } public boolean returnPartialResults() { return returnPartialResults; } @@ -284,6 +286,7 @@ public class RetryQueryRunnerTest private int numTries = 1; private boolean returnPartialResults = false; + @Override public int getNumTries() { return numTries; } public boolean returnPartialResults() { return returnPartialResults; } @@ -396,6 +399,7 @@ public class RetryQueryRunnerTest private int numTries = 2; private boolean returnPartialResults = false; + @Override public int getNumTries() { return numTries; } public boolean returnPartialResults() { return returnPartialResults; } diff --git a/processing/src/test/java/io/druid/query/aggregation/JavaScriptAggregatorBenchmark.java b/processing/src/test/java/io/druid/query/aggregation/JavaScriptAggregatorBenchmark.java index 8c022b5a28d..e8d7992d147 100644 --- a/processing/src/test/java/io/druid/query/aggregation/JavaScriptAggregatorBenchmark.java +++ b/processing/src/test/java/io/druid/query/aggregation/JavaScriptAggregatorBenchmark.java @@ -104,6 +104,7 @@ public class JavaScriptAggregatorBenchmark extends SimpleBenchmark return floats[(int) (index % floats.length)]; } + @Override public void increment() { ++index; diff --git a/processing/src/test/java/io/druid/query/aggregation/cardinality/CardinalityAggregatorBenchmark.java b/processing/src/test/java/io/druid/query/aggregation/cardinality/CardinalityAggregatorBenchmark.java index 718b358ea4b..fcd50885419 100644 --- a/processing/src/test/java/io/druid/query/aggregation/cardinality/CardinalityAggregatorBenchmark.java +++ b/processing/src/test/java/io/druid/query/aggregation/cardinality/CardinalityAggregatorBenchmark.java @@ -53,6 +53,7 @@ public class CardinalityAggregatorBenchmark extends SimpleBenchmark @Param({"true", "false"}) boolean byRow; + @Override protected void setUp() { Iterable values = FluentIterable diff --git a/processing/src/test/java/io/druid/query/groupby/GroupByQueryMergeBufferTest.java b/processing/src/test/java/io/druid/query/groupby/GroupByQueryMergeBufferTest.java index 53e81977e29..82180d29500 100644 --- a/processing/src/test/java/io/druid/query/groupby/GroupByQueryMergeBufferTest.java +++ b/processing/src/test/java/io/druid/query/groupby/GroupByQueryMergeBufferTest.java @@ -190,6 +190,7 @@ public class GroupByQueryMergeBufferTest GroupByQueryRunnerTest.DEFAULT_MAPPER, new GroupByQueryConfig() { + @Override public String getDefaultStrategy() { return "v2"; diff --git a/processing/src/test/java/io/druid/query/groupby/GroupByQueryRunnerFailureTest.java b/processing/src/test/java/io/druid/query/groupby/GroupByQueryRunnerFailureTest.java index 34907ca4013..11dd20b1507 100644 --- a/processing/src/test/java/io/druid/query/groupby/GroupByQueryRunnerFailureTest.java +++ b/processing/src/test/java/io/druid/query/groupby/GroupByQueryRunnerFailureTest.java @@ -154,6 +154,7 @@ public class GroupByQueryRunnerFailureTest GroupByQueryRunnerTest.DEFAULT_MAPPER, new GroupByQueryConfig() { + @Override public String getDefaultStrategy() { return "v2"; 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 09d121cedcd..032cf0e7a20 100644 --- a/processing/src/test/java/io/druid/query/groupby/GroupByTimeseriesQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/groupby/GroupByTimeseriesQueryRunnerTest.java @@ -136,6 +136,7 @@ public class GroupByTimeseriesQueryRunnerTest extends TimeseriesQueryRunnerTest } // GroupBy handles timestamps differently when granularity is ALL + @Override @Test public void testFullOnTimeseriesMaxMin() { diff --git a/processing/src/test/java/io/druid/query/lookup/LookupExtractorFactoryContainerTest.java b/processing/src/test/java/io/druid/query/lookup/LookupExtractorFactoryContainerTest.java index 58b939415a4..e248415f67a 100644 --- a/processing/src/test/java/io/druid/query/lookup/LookupExtractorFactoryContainerTest.java +++ b/processing/src/test/java/io/druid/query/lookup/LookupExtractorFactoryContainerTest.java @@ -110,6 +110,7 @@ public class LookupExtractorFactoryContainerTest return null; } + @Override public boolean equals(Object other) { return other instanceof TestLookupExtractorFactory; diff --git a/processing/src/test/java/io/druid/segment/CompressedVSizeIndexedV3SupplierTest.java b/processing/src/test/java/io/druid/segment/CompressedVSizeIndexedV3SupplierTest.java index a09dd68e088..717c00a7c38 100644 --- a/processing/src/test/java/io/druid/segment/CompressedVSizeIndexedV3SupplierTest.java +++ b/processing/src/test/java/io/druid/segment/CompressedVSizeIndexedV3SupplierTest.java @@ -36,6 +36,7 @@ import java.util.Arrays; public class CompressedVSizeIndexedV3SupplierTest extends CompressedVSizeIndexedSupplierTest { + @Override @Before public void setUpSimple(){ vals = Arrays.asList( @@ -61,6 +62,7 @@ public class CompressedVSizeIndexedV3SupplierTest extends CompressedVSizeIndexed ); } + @Override @After public void teardown(){ indexedSupplier = null; diff --git a/server/src/main/java/io/druid/client/BatchServerInventoryView.java b/server/src/main/java/io/druid/client/BatchServerInventoryView.java index c6a6352af1f..f09579eb6fc 100644 --- a/server/src/main/java/io/druid/client/BatchServerInventoryView.java +++ b/server/src/main/java/io/druid/client/BatchServerInventoryView.java @@ -169,6 +169,7 @@ public class BatchServerInventoryView extends ServerInventoryView return container; } + @Override public void registerSegmentCallback( final Executor exec, final SegmentCallback callback, diff --git a/server/src/main/java/io/druid/client/cache/MapCache.java b/server/src/main/java/io/druid/client/cache/MapCache.java index 7dfac4c233d..fe058523e5a 100644 --- a/server/src/main/java/io/druid/client/cache/MapCache.java +++ b/server/src/main/java/io/druid/client/cache/MapCache.java @@ -165,6 +165,7 @@ public class MapCache implements Cache return retVal; } + @Override public boolean isLocal() { return true; diff --git a/server/src/main/java/io/druid/client/cache/MemcachedCache.java b/server/src/main/java/io/druid/client/cache/MemcachedCache.java index 288fc6d25d5..91357c58971 100644 --- a/server/src/main/java/io/druid/client/cache/MemcachedCache.java +++ b/server/src/main/java/io/druid/client/cache/MemcachedCache.java @@ -603,6 +603,7 @@ public class MemcachedCache implements Cache return memcachedPrefix + ":" + DigestUtils.sha1Hex(key.namespace) + ":" + DigestUtils.sha1Hex(key.key); } + @Override public boolean isLocal() { return false; diff --git a/server/src/main/java/io/druid/client/cache/MemcachedCustomConnectionFactoryBuilder.java b/server/src/main/java/io/druid/client/cache/MemcachedCustomConnectionFactoryBuilder.java index 4cb4bf65469..ff765e7bfd7 100644 --- a/server/src/main/java/io/druid/client/cache/MemcachedCustomConnectionFactoryBuilder.java +++ b/server/src/main/java/io/druid/client/cache/MemcachedCustomConnectionFactoryBuilder.java @@ -113,6 +113,7 @@ class MemcachedCustomConnectionFactoryBuilder extends ConnectionFactoryBuilder return hashAlg == null ? super.getHashAlg() : hashAlg; } + @Override public Collection getInitialObservers() { return initialObservers; } diff --git a/server/src/main/java/io/druid/client/selector/ServerSelector.java b/server/src/main/java/io/druid/client/selector/ServerSelector.java index 3236c4f8829..a640fe59652 100644 --- a/server/src/main/java/io/druid/client/selector/ServerSelector.java +++ b/server/src/main/java/io/druid/client/selector/ServerSelector.java @@ -108,6 +108,7 @@ public class ServerSelector implements DiscoverySelector return result; } + @Override public QueryableDruidServer pick() { synchronized (this) { diff --git a/server/src/main/java/io/druid/indexer/SQLMetadataStorageUpdaterJobHandler.java b/server/src/main/java/io/druid/indexer/SQLMetadataStorageUpdaterJobHandler.java index d3eed4134e6..962aa3ccb54 100644 --- a/server/src/main/java/io/druid/indexer/SQLMetadataStorageUpdaterJobHandler.java +++ b/server/src/main/java/io/druid/indexer/SQLMetadataStorageUpdaterJobHandler.java @@ -48,6 +48,7 @@ public class SQLMetadataStorageUpdaterJobHandler implements MetadataStorageUpdat this.dbi = connector.getDBI(); } + @Override public void publishSegments(final String tableName, final List segments, final ObjectMapper mapper) { dbi.withHandle( diff --git a/server/src/main/java/io/druid/metadata/IndexerSQLMetadataStorageCoordinator.java b/server/src/main/java/io/druid/metadata/IndexerSQLMetadataStorageCoordinator.java index a776aefa6f0..9cc6fa41de0 100644 --- a/server/src/main/java/io/druid/metadata/IndexerSQLMetadataStorageCoordinator.java +++ b/server/src/main/java/io/druid/metadata/IndexerSQLMetadataStorageCoordinator.java @@ -275,6 +275,7 @@ public class IndexerSQLMetadataStorageCoordinator implements IndexerMetadataStor * * @return set of segments actually added */ + @Override public Set announceHistoricalSegments(final Set segments) throws IOException { final SegmentPublishResult result = announceHistoricalSegments(segments, null, null); @@ -657,6 +658,7 @@ public class IndexerSQLMetadataStorageCoordinator implements IndexerMetadataStor /** * Read dataSource metadata. Returns null if there is no metadata. */ + @Override public DataSourceMetadata getDataSourceMetadata(final String dataSource) { final byte[] bytes = connector.lookup( @@ -798,6 +800,7 @@ public class IndexerSQLMetadataStorageCoordinator implements IndexerMetadataStor return retVal; } + @Override public boolean deleteDataSourceMetadata(final String dataSource) { return connector.retryWithHandle( @@ -853,6 +856,7 @@ public class IndexerSQLMetadataStorageCoordinator implements IndexerMetadataStor ); } + @Override public void updateSegmentMetadata(final Set segments) throws IOException { connector.getDBI().inTransaction( @@ -871,6 +875,7 @@ public class IndexerSQLMetadataStorageCoordinator implements IndexerMetadataStor ); } + @Override public void deleteSegments(final Set segments) throws IOException { connector.getDBI().inTransaction( diff --git a/server/src/main/java/io/druid/metadata/MetadataRuleManagerProvider.java b/server/src/main/java/io/druid/metadata/MetadataRuleManagerProvider.java index 0ab82537ba9..c6b7922816a 100644 --- a/server/src/main/java/io/druid/metadata/MetadataRuleManagerProvider.java +++ b/server/src/main/java/io/druid/metadata/MetadataRuleManagerProvider.java @@ -25,5 +25,6 @@ import com.google.inject.Provider; */ public interface MetadataRuleManagerProvider extends Provider { + @Override public MetadataRuleManager get(); } diff --git a/server/src/main/java/io/druid/metadata/MetadataSegmentManagerProvider.java b/server/src/main/java/io/druid/metadata/MetadataSegmentManagerProvider.java index 4fabab54fe0..aef060a2cba 100644 --- a/server/src/main/java/io/druid/metadata/MetadataSegmentManagerProvider.java +++ b/server/src/main/java/io/druid/metadata/MetadataSegmentManagerProvider.java @@ -25,5 +25,6 @@ import com.google.inject.Provider; */ public interface MetadataSegmentManagerProvider extends Provider { + @Override public MetadataSegmentManager get(); } diff --git a/server/src/main/java/io/druid/metadata/MetadataSegmentPublisherProvider.java b/server/src/main/java/io/druid/metadata/MetadataSegmentPublisherProvider.java index 307dc4ba9af..fdf3a688e8a 100644 --- a/server/src/main/java/io/druid/metadata/MetadataSegmentPublisherProvider.java +++ b/server/src/main/java/io/druid/metadata/MetadataSegmentPublisherProvider.java @@ -21,5 +21,6 @@ package io.druid.metadata; public interface MetadataSegmentPublisherProvider extends SegmentPublisherProvider { + @Override public MetadataSegmentPublisher get(); } diff --git a/server/src/main/java/io/druid/metadata/SQLMetadataConnector.java b/server/src/main/java/io/druid/metadata/SQLMetadataConnector.java index a9beb514950..b3c1433679a 100644 --- a/server/src/main/java/io/druid/metadata/SQLMetadataConnector.java +++ b/server/src/main/java/io/druid/metadata/SQLMetadataConnector.java @@ -444,6 +444,7 @@ public abstract class SQLMetadataConnector implements MetadataStorageConnector public abstract DBI getDBI(); + @Override public void createDataSourceTable() { if (config.get().isCreateTables()) { @@ -633,6 +634,7 @@ public abstract class SQLMetadataConnector implements MetadataStorageConnector } } + @Override public void deleteAllRecords(final String tableName) { try { diff --git a/server/src/main/java/io/druid/metadata/SQLMetadataRuleManager.java b/server/src/main/java/io/druid/metadata/SQLMetadataRuleManager.java index a9605e7fec1..a6e5d01a133 100644 --- a/server/src/main/java/io/druid/metadata/SQLMetadataRuleManager.java +++ b/server/src/main/java/io/druid/metadata/SQLMetadataRuleManager.java @@ -172,6 +172,7 @@ public class SQLMetadataRuleManager implements MetadataRuleManager ); } + @Override @LifecycleStart public void start() { @@ -206,6 +207,7 @@ public class SQLMetadataRuleManager implements MetadataRuleManager } } + @Override @LifecycleStop public void stop() { @@ -224,6 +226,7 @@ public class SQLMetadataRuleManager implements MetadataRuleManager } } + @Override public void poll() { try { @@ -314,17 +317,20 @@ public class SQLMetadataRuleManager implements MetadataRuleManager } } + @Override public Map> getAllRules() { return rules.get(); } + @Override public List getRules(final String dataSource) { List retVal = rules.get().get(dataSource); return retVal == null ? Lists.newArrayList() : retVal; } + @Override public List getRulesWithDefault(final String dataSource) { List retVal = Lists.newArrayList(); @@ -338,6 +344,7 @@ public class SQLMetadataRuleManager implements MetadataRuleManager return retVal; } + @Override public boolean overrideRule(final String dataSource, final List newRules, final AuditInfo auditInfo) { final String ruleString; diff --git a/server/src/main/java/io/druid/metadata/SQLMetadataSegmentManager.java b/server/src/main/java/io/druid/metadata/SQLMetadataSegmentManager.java index 85a81479b10..9388c78a7ab 100644 --- a/server/src/main/java/io/druid/metadata/SQLMetadataSegmentManager.java +++ b/server/src/main/java/io/druid/metadata/SQLMetadataSegmentManager.java @@ -111,6 +111,7 @@ public class SQLMetadataSegmentManager implements MetadataSegmentManager this.connector = connector; } + @Override @LifecycleStart public void start() { @@ -145,6 +146,7 @@ public class SQLMetadataSegmentManager implements MetadataSegmentManager } } + @Override @LifecycleStop public void stop() { diff --git a/server/src/main/java/io/druid/metadata/SQLMetadataStorageActionHandler.java b/server/src/main/java/io/druid/metadata/SQLMetadataStorageActionHandler.java index 186ffc531b7..ac2c3df8ed0 100644 --- a/server/src/main/java/io/druid/metadata/SQLMetadataStorageActionHandler.java +++ b/server/src/main/java/io/druid/metadata/SQLMetadataStorageActionHandler.java @@ -87,6 +87,7 @@ public class SQLMetadataStorageActionHandler getEntry(final String entryId) { return connector.retryWithHandle( @@ -191,6 +194,7 @@ public class SQLMetadataStorageActionHandler getStatus(final String entryId) { return connector.retryWithHandle( @@ -214,6 +218,7 @@ public class SQLMetadataStorageActionHandler> getActiveEntriesWithStatus() { return connector.retryWithHandle( @@ -261,6 +266,7 @@ public class SQLMetadataStorageActionHandler getInactiveStatusesSince(final DateTime timestamp) { return connector.retryWithHandle( @@ -302,6 +308,7 @@ public class SQLMetadataStorageActionHandler getLogs(final String entryId) { return connector.retryWithHandle( @@ -413,6 +423,7 @@ public class SQLMetadataStorageActionHandler getLocks(final String entryId) { return connector.retryWithHandle( diff --git a/server/src/main/java/io/druid/metadata/SQLMetadataStorageActionHandlerFactory.java b/server/src/main/java/io/druid/metadata/SQLMetadataStorageActionHandlerFactory.java index 920a099e068..50037a5f7ef 100644 --- a/server/src/main/java/io/druid/metadata/SQLMetadataStorageActionHandlerFactory.java +++ b/server/src/main/java/io/druid/metadata/SQLMetadataStorageActionHandlerFactory.java @@ -40,6 +40,7 @@ public class SQLMetadataStorageActionHandlerFactory implements MetadataStorageAc this.jsonMapper = jsonMapper; } + @Override public MetadataStorageActionHandler create( final String entryType, MetadataStorageActionHandlerTypes payloadTypes diff --git a/server/src/main/java/io/druid/metadata/SQLMetadataSupervisorManager.java b/server/src/main/java/io/druid/metadata/SQLMetadataSupervisorManager.java index 1e3d8ddb760..bf2bc580a7d 100644 --- a/server/src/main/java/io/druid/metadata/SQLMetadataSupervisorManager.java +++ b/server/src/main/java/io/druid/metadata/SQLMetadataSupervisorManager.java @@ -71,6 +71,7 @@ public class SQLMetadataSupervisorManager implements MetadataSupervisorManager this.dbi = connector.getDBI(); } + @Override @LifecycleStart public void start() { diff --git a/server/src/main/java/io/druid/segment/indexing/RealtimeTuningConfig.java b/server/src/main/java/io/druid/segment/indexing/RealtimeTuningConfig.java index 640145d66cb..b95139bc9b0 100644 --- a/server/src/main/java/io/druid/segment/indexing/RealtimeTuningConfig.java +++ b/server/src/main/java/io/druid/segment/indexing/RealtimeTuningConfig.java @@ -143,12 +143,14 @@ public class RealtimeTuningConfig implements TuningConfig, AppenderatorConfig Preconditions.checkArgument(this.alertTimeout >= 0, "alertTimeout must be >= 0"); } + @Override @JsonProperty public int getMaxRowsInMemory() { return maxRowsInMemory; } + @Override @JsonProperty public Period getIntermediatePersistPeriod() { @@ -161,6 +163,7 @@ public class RealtimeTuningConfig implements TuningConfig, AppenderatorConfig return windowPeriod; } + @Override @JsonProperty public File getBasePersistDirectory() { @@ -179,6 +182,7 @@ public class RealtimeTuningConfig implements TuningConfig, AppenderatorConfig return rejectionPolicyFactory; } + @Override @JsonProperty public int getMaxPendingPersists() { @@ -191,6 +195,7 @@ public class RealtimeTuningConfig implements TuningConfig, AppenderatorConfig return shardSpec; } + @Override @JsonProperty public IndexSpec getIndexSpec() { @@ -215,6 +220,7 @@ public class RealtimeTuningConfig implements TuningConfig, AppenderatorConfig return this.mergeThreadPriority; } + @Override @JsonProperty public boolean isReportParseExceptions() { diff --git a/server/src/main/java/io/druid/segment/indexing/granularity/UniformGranularitySpec.java b/server/src/main/java/io/druid/segment/indexing/granularity/UniformGranularitySpec.java index 610329eaa7d..bc3aee77958 100644 --- a/server/src/main/java/io/druid/segment/indexing/granularity/UniformGranularitySpec.java +++ b/server/src/main/java/io/druid/segment/indexing/granularity/UniformGranularitySpec.java @@ -179,6 +179,7 @@ public class UniformGranularitySpec implements GranularitySpec '}'; } + @Override public GranularitySpec withIntervals(List inputIntervals) { return new UniformGranularitySpec(segmentGranularity, queryGranularity, rollup, inputIntervals); } 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 f13752b6006..ac158b31c3d 100644 --- a/server/src/main/java/io/druid/segment/realtime/RealtimeManager.java +++ b/server/src/main/java/io/druid/segment/realtime/RealtimeManager.java @@ -387,6 +387,7 @@ public class RealtimeManager implements QuerySegmentWalker return new FinalizeResultsQueryRunner(plumber.getQueryRunner(query), toolChest); } + @Override public void close() throws IOException { synchronized (this) { diff --git a/server/src/main/java/io/druid/segment/realtime/appenderator/Appenderator.java b/server/src/main/java/io/druid/segment/realtime/appenderator/Appenderator.java index be305c5c13e..f869ab6894c 100644 --- a/server/src/main/java/io/druid/segment/realtime/appenderator/Appenderator.java +++ b/server/src/main/java/io/druid/segment/realtime/appenderator/Appenderator.java @@ -148,5 +148,6 @@ public interface Appenderator extends QuerySegmentWalker, Closeable * Stop any currently-running processing and clean up after ourselves. This will not remove any on-disk persisted * data, but it will drop any data that has not yet been persisted. */ + @Override void close(); } diff --git a/server/src/main/java/io/druid/segment/realtime/plumber/SegmentHandoffNotifier.java b/server/src/main/java/io/druid/segment/realtime/plumber/SegmentHandoffNotifier.java index 6c76786fe02..d10b8c22864 100644 --- a/server/src/main/java/io/druid/segment/realtime/plumber/SegmentHandoffNotifier.java +++ b/server/src/main/java/io/druid/segment/realtime/plumber/SegmentHandoffNotifier.java @@ -48,6 +48,7 @@ public interface SegmentHandoffNotifier extends Closeable /** * Perform any final processing and clean up after ourselves. */ + @Override void close(); } diff --git a/server/src/main/java/io/druid/server/QueryManager.java b/server/src/main/java/io/druid/server/QueryManager.java index 49252c8c0ad..791e2cf2ecd 100644 --- a/server/src/main/java/io/druid/server/QueryManager.java +++ b/server/src/main/java/io/druid/server/QueryManager.java @@ -57,6 +57,7 @@ public class QueryManager implements QueryWatcher return success; } + @Override public void registerQuery(Query query, final ListenableFuture future) { final String id = query.getId(); diff --git a/server/src/main/java/io/druid/server/audit/AuditManagerProvider.java b/server/src/main/java/io/druid/server/audit/AuditManagerProvider.java index 8fbf8c85eae..cb3d1f2e7f4 100644 --- a/server/src/main/java/io/druid/server/audit/AuditManagerProvider.java +++ b/server/src/main/java/io/druid/server/audit/AuditManagerProvider.java @@ -24,5 +24,6 @@ import io.druid.audit.AuditManager; public interface AuditManagerProvider extends Provider { + @Override public AuditManager get(); } diff --git a/server/src/main/java/io/druid/server/coordinator/CostBalancerStrategy.java b/server/src/main/java/io/druid/server/coordinator/CostBalancerStrategy.java index 014bc231fb7..cf7e7a17527 100644 --- a/server/src/main/java/io/druid/server/coordinator/CostBalancerStrategy.java +++ b/server/src/main/java/io/druid/server/coordinator/CostBalancerStrategy.java @@ -211,6 +211,7 @@ public class CostBalancerStrategy implements BalancerStrategy } + @Override public BalancerSegmentHolder pickSegmentToMove(final List serverHolders) { ReservoirSegmentSampler sampler = new ReservoirSegmentSampler(); diff --git a/server/src/main/java/io/druid/server/coordinator/rules/IntervalLoadRule.java b/server/src/main/java/io/druid/server/coordinator/rules/IntervalLoadRule.java index 8a0e4a5679b..89d85397e91 100644 --- a/server/src/main/java/io/druid/server/coordinator/rules/IntervalLoadRule.java +++ b/server/src/main/java/io/druid/server/coordinator/rules/IntervalLoadRule.java @@ -58,6 +58,7 @@ public class IntervalLoadRule extends LoadRule return "loadByInterval"; } + @Override @JsonProperty public Map getTieredReplicants() { diff --git a/server/src/main/java/io/druid/server/http/security/StateResourceFilter.java b/server/src/main/java/io/druid/server/http/security/StateResourceFilter.java index 960b3c123cc..39d825130c3 100644 --- a/server/src/main/java/io/druid/server/http/security/StateResourceFilter.java +++ b/server/src/main/java/io/druid/server/http/security/StateResourceFilter.java @@ -82,6 +82,7 @@ public class StateResourceFilter extends AbstractResourceFilter return request; } + @Override public boolean isApplicable(String requestPath) { return requestPath.startsWith("druid/broker/v1") || diff --git a/server/src/main/java/io/druid/server/router/TieredBrokerHostSelector.java b/server/src/main/java/io/druid/server/router/TieredBrokerHostSelector.java index 85af3764ab9..72f0cd8c9e5 100644 --- a/server/src/main/java/io/druid/server/router/TieredBrokerHostSelector.java +++ b/server/src/main/java/io/druid/server/router/TieredBrokerHostSelector.java @@ -122,6 +122,7 @@ public class TieredBrokerHostSelector implements HostSelector return tierConfig.getDefaultBrokerServiceName(); } + @Override public Pair select(final Query query) { synchronized (lock) { diff --git a/server/src/main/java/io/druid/timeline/partition/SingleDimensionShardSpec.java b/server/src/main/java/io/druid/timeline/partition/SingleDimensionShardSpec.java index 41fe73fbe29..8cbefe40f8a 100644 --- a/server/src/main/java/io/druid/timeline/partition/SingleDimensionShardSpec.java +++ b/server/src/main/java/io/druid/timeline/partition/SingleDimensionShardSpec.java @@ -92,6 +92,7 @@ public class SingleDimensionShardSpec implements ShardSpec this.end = end; } + @Override @JsonProperty("partitionNum") public int getPartitionNum() { diff --git a/server/src/test/java/io/druid/query/lookup/LookupIntrospectionResourceImplTest.java b/server/src/test/java/io/druid/query/lookup/LookupIntrospectionResourceImplTest.java index 5e012a7e82f..67dd673677e 100644 --- a/server/src/test/java/io/druid/query/lookup/LookupIntrospectionResourceImplTest.java +++ b/server/src/test/java/io/druid/query/lookup/LookupIntrospectionResourceImplTest.java @@ -42,6 +42,7 @@ public class LookupIntrospectionResourceImplTest extends JerseyTest static LookupReferencesManager lookupReferencesManager = EasyMock.createMock(LookupReferencesManager.class); + @Override @Before public void setUp() throws Exception { diff --git a/server/src/test/java/io/druid/server/AsyncQueryForwardingServletTest.java b/server/src/test/java/io/druid/server/AsyncQueryForwardingServletTest.java index 0ac353aba18..6298ac10840 100644 --- a/server/src/test/java/io/druid/server/AsyncQueryForwardingServletTest.java +++ b/server/src/test/java/io/druid/server/AsyncQueryForwardingServletTest.java @@ -78,6 +78,7 @@ public class AsyncQueryForwardingServletTest extends BaseJettyTest private static int port1; private static int port2; + @Override @Before public void setup() throws Exception { diff --git a/server/src/test/java/io/druid/server/coordinator/LoadQueuePeonTester.java b/server/src/test/java/io/druid/server/coordinator/LoadQueuePeonTester.java index bb920a36198..a6e2e5673d4 100644 --- a/server/src/test/java/io/druid/server/coordinator/LoadQueuePeonTester.java +++ b/server/src/test/java/io/druid/server/coordinator/LoadQueuePeonTester.java @@ -41,6 +41,7 @@ public class LoadQueuePeonTester extends LoadQueuePeon segmentsToLoad.add(segment); } + @Override public ConcurrentSkipListSet getSegmentsToLoad() { return segmentsToLoad; diff --git a/server/src/test/java/io/druid/server/lookup/cache/LookupCoordinatorManagerTest.java b/server/src/test/java/io/druid/server/lookup/cache/LookupCoordinatorManagerTest.java index 1fd7a1ef7c8..1d1e8f93c8e 100644 --- a/server/src/test/java/io/druid/server/lookup/cache/LookupCoordinatorManagerTest.java +++ b/server/src/test/java/io/druid/server/lookup/cache/LookupCoordinatorManagerTest.java @@ -1117,11 +1117,13 @@ public class LookupCoordinatorManagerTest LookupCoordinatorManagerConfig lookupCoordinatorManagerConfig = new LookupCoordinatorManagerConfig() { + @Override public long getInitialDelay() { return 1; } + @Override public int getThreadPoolSize() { return 2; diff --git a/sql/src/main/java/io/druid/sql/calcite/rule/DruidSemiJoinRule.java b/sql/src/main/java/io/druid/sql/calcite/rule/DruidSemiJoinRule.java index 1febd2ea343..5dc6a1f272d 100644 --- a/sql/src/main/java/io/druid/sql/calcite/rule/DruidSemiJoinRule.java +++ b/sql/src/main/java/io/druid/sql/calcite/rule/DruidSemiJoinRule.java @@ -54,6 +54,7 @@ public class DruidSemiJoinRule extends RelOptRule private static final Predicate IS_LEFT_OR_INNER = new Predicate() { + @Override public boolean apply(Join join) { final JoinRelType joinType = join.getJoinType(); @@ -64,6 +65,7 @@ public class DruidSemiJoinRule extends RelOptRule private static final Predicate IS_GROUP_BY = new Predicate() { + @Override public boolean apply(DruidRel druidRel) { return druidRel.getQueryBuilder().getGrouping() != null; diff --git a/sql/src/main/java/io/druid/sql/calcite/view/InProcessViewManager.java b/sql/src/main/java/io/druid/sql/calcite/view/InProcessViewManager.java index 792c0f3b649..d569e4c2fc1 100644 --- a/sql/src/main/java/io/druid/sql/calcite/view/InProcessViewManager.java +++ b/sql/src/main/java/io/druid/sql/calcite/view/InProcessViewManager.java @@ -42,6 +42,7 @@ public class InProcessViewManager implements ViewManager this.views = new ConcurrentHashMap<>(); } + @Override public void createView(final PlannerFactory plannerFactory, final String viewName, final String viewSql) { final TableMacro oldValue = views.putIfAbsent(viewName, new DruidViewMacro(plannerFactory, viewSql)); @@ -50,6 +51,7 @@ public class InProcessViewManager implements ViewManager } } + @Override public void alterView(final PlannerFactory plannerFactory, final String viewName, final String viewSql) { final TableMacro oldValue = views.replace(viewName, new DruidViewMacro(plannerFactory, viewSql)); @@ -58,6 +60,7 @@ public class InProcessViewManager implements ViewManager } } + @Override public void dropView(final String viewName) { final TableMacro oldValue = views.remove(viewName);