diff --git a/.idea/inspectionProfiles/Druid.xml b/.idea/inspectionProfiles/Druid.xml index d1f72dd2763f..0889de4cc67a 100644 --- a/.idea/inspectionProfiles/Druid.xml +++ b/.idea/inspectionProfiles/Druid.xml @@ -120,6 +120,7 @@ + diff --git a/indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/LegacySinglePhaseSubTask.java b/indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/LegacySinglePhaseSubTask.java index 27a242885c36..d2694c7afd92 100644 --- a/indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/LegacySinglePhaseSubTask.java +++ b/indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/LegacySinglePhaseSubTask.java @@ -20,20 +20,11 @@ package org.apache.druid.indexing.common.task.batch.parallel; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import com.google.common.collect.ImmutableSet; import org.apache.druid.indexing.common.task.TaskResource; -import org.apache.druid.server.security.Action; -import org.apache.druid.server.security.Resource; -import org.apache.druid.server.security.ResourceAction; -import org.apache.druid.server.security.ResourceType; -import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; public class LegacySinglePhaseSubTask extends SinglePhaseSubTask { @@ -66,16 +57,4 @@ public String getType() return SinglePhaseSubTask.OLD_TYPE_NAME; } - @Nonnull - @JsonIgnore - @Override - public Set getInputSourceResources() - { - return getIngestionSchema().getIOConfig().getInputSource() != null ? - getIngestionSchema().getIOConfig().getInputSource().getTypes() - .stream() - .map(i -> new ResourceAction(new Resource(i, ResourceType.EXTERNAL), Action.READ)) - .collect(Collectors.toSet()) : - ImmutableSet.of(); - } } diff --git a/integration-tests-ex/tools/src/main/java/org/apache/druid/testing/tools/CustomNodeRoleClientModule.java b/integration-tests-ex/tools/src/main/java/org/apache/druid/testing/tools/CustomNodeRoleClientModule.java index f1171ffa4a61..df73a8c7d805 100644 --- a/integration-tests-ex/tools/src/main/java/org/apache/druid/testing/tools/CustomNodeRoleClientModule.java +++ b/integration-tests-ex/tools/src/main/java/org/apache/druid/testing/tools/CustomNodeRoleClientModule.java @@ -19,13 +19,9 @@ package org.apache.druid.testing.tools; -import com.fasterxml.jackson.databind.Module; import com.google.inject.Binder; import org.apache.druid.initialization.DruidModule; -import java.util.Collections; -import java.util.List; - /** * Super-simple "client" for the custom node role which defines * the node role so that REST APIs and the system tables are @@ -40,9 +36,4 @@ public void configure(Binder binder) // NodeRoles.addRole(binder, CliCustomNodeRole.NODE_ROLE); } - @Override - public List extends Module> getJacksonModules() - { - return Collections.emptyList(); - } } diff --git a/integration-tests-ex/tools/src/main/java/org/apache/druid/testing/tools/SleepModule.java b/integration-tests-ex/tools/src/main/java/org/apache/druid/testing/tools/SleepModule.java index a8028f6920f3..6e7362b3b389 100644 --- a/integration-tests-ex/tools/src/main/java/org/apache/druid/testing/tools/SleepModule.java +++ b/integration-tests-ex/tools/src/main/java/org/apache/druid/testing/tools/SleepModule.java @@ -19,22 +19,13 @@ package org.apache.druid.testing.tools; -import com.fasterxml.jackson.databind.Module; import com.google.inject.Binder; import org.apache.druid.guice.ExpressionModule; import org.apache.druid.initialization.DruidModule; import org.apache.druid.sql.guice.SqlBindings; -import java.util.Collections; -import java.util.List; - public class SleepModule implements DruidModule { - @Override - public List extends Module> getJacksonModules() - { - return Collections.emptyList(); - } @Override public void configure(Binder binder) diff --git a/processing/src/main/java/org/apache/druid/math/expr/ConstantExpr.java b/processing/src/main/java/org/apache/druid/math/expr/ConstantExpr.java index 85cebd478ee0..f6007512f6c7 100644 --- a/processing/src/main/java/org/apache/druid/math/expr/ConstantExpr.java +++ b/processing/src/main/java/org/apache/druid/math/expr/ConstantExpr.java @@ -246,12 +246,6 @@ class LongExpr extends ConstantExpr super(ExpressionType.LONG, Preconditions.checkNotNull(value, "value")); } - @Override - public String toString() - { - return String.valueOf(value); - } - @Override protected ExprEval realEval() { @@ -329,12 +323,6 @@ class DoubleExpr extends ConstantExpr super(ExpressionType.DOUBLE, Preconditions.checkNotNull(value, "value")); } - @Override - public String toString() - { - return String.valueOf(value); - } - @Override protected ExprEval realEval() { diff --git a/processing/src/main/java/org/apache/druid/math/expr/Function.java b/processing/src/main/java/org/apache/druid/math/expr/Function.java index a7fc7f8c186e..3f0a6e7aa9b2 100644 --- a/processing/src/main/java/org/apache/druid/math/expr/Function.java +++ b/processing/src/main/java/org/apache/druid/math/expr/Function.java @@ -530,11 +530,6 @@ ExprEval doApply(ExprEval arrayExpr, ExprEval scalarExpr) */ abstract class ArraysMergeFunction extends ArraysFunction { - @Override - public Set getArrayInputs(List args) - { - return ImmutableSet.copyOf(args); - } @Override public boolean hasArrayOutput() @@ -1183,16 +1178,6 @@ public String name() return NAME; } - @Nullable - @Override - public ExpressionType getOutputType(Expr.InputBindingInspector inspector, List args) - { - return ExpressionTypeConversion.function( - args.get(0).getOutputType(inspector), - args.get(1).getOutputType(inspector) - ); - } - @Override public boolean canVectorize(Expr.InputBindingInspector inspector, List args) { @@ -2315,18 +2300,6 @@ public ExprEval apply(List args, Expr.ObjectBinding bindings) return ExprEval.ofLongBoolean(!super.apply(args, bindings).asBoolean()); } - @Override - public void validateArguments(List args) - { - validationHelperCheckArgumentCount(args, 2); - } - - @Nullable - @Override - public ExpressionType getOutputType(Expr.InputBindingInspector inspector, List args) - { - return ExpressionType.LONG; - } } /** @@ -3399,18 +3372,6 @@ public ExprEval apply(List args, Expr.ObjectBinding bindings) return ExprEval.ofArray(arrayType, out); } - @Override - public Set getScalarInputs(List args) - { - return ImmutableSet.copyOf(args); - } - - @Override - public Set getArrayInputs(List args) - { - return Collections.emptySet(); - } - @Override public boolean hasArrayOutput() { @@ -3544,12 +3505,6 @@ public ExprEval apply(List args, Expr.ObjectBinding bindings) return ExprEval.ofStringArray(arrayString.split(split != null ? split : "")); } - @Override - public Set getScalarInputs(List args) - { - return ImmutableSet.copyOf(args); - } - @Override public boolean hasArrayOutput() { diff --git a/processing/src/main/java/org/apache/druid/query/aggregation/CountBufferAggregator.java b/processing/src/main/java/org/apache/druid/query/aggregation/CountBufferAggregator.java index 7f30fa0006e3..7b966d6f1e12 100644 --- a/processing/src/main/java/org/apache/druid/query/aggregation/CountBufferAggregator.java +++ b/processing/src/main/java/org/apache/druid/query/aggregation/CountBufferAggregator.java @@ -19,8 +19,6 @@ package org.apache.druid.query.aggregation; -import org.apache.druid.query.monomorphicprocessing.RuntimeShapeInspector; - import java.nio.ByteBuffer; /** @@ -71,9 +69,4 @@ public void close() // no resources to cleanup } - @Override - public void inspectRuntimeShape(RuntimeShapeInspector inspector) - { - // nothing to inspect - } } diff --git a/processing/src/main/java/org/apache/druid/query/aggregation/NoopBufferAggregator.java b/processing/src/main/java/org/apache/druid/query/aggregation/NoopBufferAggregator.java index 95774203d03e..ab348273e3b2 100644 --- a/processing/src/main/java/org/apache/druid/query/aggregation/NoopBufferAggregator.java +++ b/processing/src/main/java/org/apache/druid/query/aggregation/NoopBufferAggregator.java @@ -19,8 +19,6 @@ package org.apache.druid.query.aggregation; -import org.apache.druid.query.monomorphicprocessing.RuntimeShapeInspector; - import java.nio.ByteBuffer; public final class NoopBufferAggregator implements BufferAggregator @@ -75,9 +73,4 @@ public void close() { } - @Override - public void inspectRuntimeShape(RuntimeShapeInspector inspector) - { - // nothing to inspect - } } diff --git a/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/BufferHashGrouper.java b/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/BufferHashGrouper.java index c4d046977168..182a48577609 100644 --- a/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/BufferHashGrouper.java +++ b/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/BufferHashGrouper.java @@ -32,7 +32,6 @@ import java.util.Collections; import java.util.List; import java.util.NoSuchElementException; -import java.util.function.ToIntFunction; public class BufferHashGrouper extends AbstractBufferHashGrouper { @@ -128,12 +127,6 @@ public boolean isInitialized() return initialized; } - @Override - public ToIntFunction hashFunction() - { - return Groupers::hashObject; - } - @Override public void newBucketHook(int bucketOffset) { diff --git a/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/RowBasedGrouperHelper.java b/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/RowBasedGrouperHelper.java index 0e73d5db6f48..8c42bb935d84 100644 --- a/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/RowBasedGrouperHelper.java +++ b/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/RowBasedGrouperHelper.java @@ -1815,12 +1815,6 @@ private class ArrayStringRowBasedKeySerdeHelper extends DictionaryBuildingSingle ); } - @Override - public int getKeyBufferValueSize() - { - return Integer.BYTES; - } - @Override public BufferComparator getBufferComparator() { diff --git a/processing/src/main/java/org/apache/druid/segment/AutoTypeColumnMerger.java b/processing/src/main/java/org/apache/druid/segment/AutoTypeColumnMerger.java index 801eaf112a5f..7ce9709f30f6 100644 --- a/processing/src/main/java/org/apache/druid/segment/AutoTypeColumnMerger.java +++ b/processing/src/main/java/org/apache/druid/segment/AutoTypeColumnMerger.java @@ -445,11 +445,6 @@ public int getCardinality() return counter; } - @Override - public void remove() - { - throw new UnsupportedOperationException("remove"); - } } public static class IdLookupArrayIterator implements Iterator diff --git a/processing/src/main/java/org/apache/druid/segment/DictionaryMergingIterator.java b/processing/src/main/java/org/apache/druid/segment/DictionaryMergingIterator.java index 2e570c7d3deb..bfbfe1aee388 100644 --- a/processing/src/main/java/org/apache/druid/segment/DictionaryMergingIterator.java +++ b/processing/src/main/java/org/apache/druid/segment/DictionaryMergingIterator.java @@ -162,12 +162,6 @@ protected T writeTranslate(Pair> smallest, int count return value; } - @Override - public void remove() - { - throw new UnsupportedOperationException("remove"); - } - @Override public void close() { diff --git a/processing/src/main/java/org/apache/druid/segment/SimpleDictionaryMergingIterator.java b/processing/src/main/java/org/apache/druid/segment/SimpleDictionaryMergingIterator.java index d38506fe7241..75c47f707664 100644 --- a/processing/src/main/java/org/apache/druid/segment/SimpleDictionaryMergingIterator.java +++ b/processing/src/main/java/org/apache/druid/segment/SimpleDictionaryMergingIterator.java @@ -106,12 +106,6 @@ public int getCardinality() return counter; } - @Override - public void remove() - { - throw new UnsupportedOperationException("remove"); - } - @Override public void close() { diff --git a/processing/src/main/java/org/apache/druid/segment/column/StringUtf8DictionaryEncodedColumn.java b/processing/src/main/java/org/apache/druid/segment/column/StringUtf8DictionaryEncodedColumn.java index c3ebde1854c0..a5966096a6e2 100644 --- a/processing/src/main/java/org/apache/druid/segment/column/StringUtf8DictionaryEncodedColumn.java +++ b/processing/src/main/java/org/apache/druid/segment/column/StringUtf8DictionaryEncodedColumn.java @@ -222,13 +222,6 @@ public ValueMatcher makeValueMatcher(DruidPredicateFactory predicateFactory) return DimensionSelectorUtils.makeValueMatcherGeneric(this, predicateFactory); } - @Nullable - @Override - public Object getObject() - { - return defaultGetObject(); - } - @Override public Class classOfObject() { diff --git a/processing/src/main/java/org/apache/druid/segment/join/table/FrameBasedIndexedTable.java b/processing/src/main/java/org/apache/druid/segment/join/table/FrameBasedIndexedTable.java index 080a3c920aee..ceaffe846e28 100644 --- a/processing/src/main/java/org/apache/druid/segment/join/table/FrameBasedIndexedTable.java +++ b/processing/src/main/java/org/apache/druid/segment/join/table/FrameBasedIndexedTable.java @@ -263,12 +263,6 @@ public void close() throws IOException }; } - @Override - public boolean isCacheable() - { - return false; - } - @Override public void close() { diff --git a/processing/src/main/java/org/apache/druid/segment/virtual/NestedFieldVirtualColumn.java b/processing/src/main/java/org/apache/druid/segment/virtual/NestedFieldVirtualColumn.java index 160415924a39..aa7dd8b88b7e 100644 --- a/processing/src/main/java/org/apache/druid/segment/virtual/NestedFieldVirtualColumn.java +++ b/processing/src/main/java/org/apache/druid/segment/virtual/NestedFieldVirtualColumn.java @@ -1423,13 +1423,6 @@ public long getLong() return Numbers.tryParseLong(o, 0L); } - @Override - public void inspectRuntimeShape(RuntimeShapeInspector inspector) - { - inspector.visit("baseSelector", baseSelector); - inspector.visit("parts", parts); - } - @Override public boolean isNull() { @@ -1461,11 +1454,6 @@ public Object getObject() return null; } - @Override - public Class> classOfObject() - { - return Object.class; - } } /** diff --git a/server/src/main/java/org/apache/druid/catalog/model/table/DatasourceDefn.java b/server/src/main/java/org/apache/druid/catalog/model/table/DatasourceDefn.java index b3dc953cf8e7..cca497f0b7ff 100644 --- a/server/src/main/java/org/apache/druid/catalog/model/table/DatasourceDefn.java +++ b/server/src/main/java/org/apache/druid/catalog/model/table/DatasourceDefn.java @@ -21,7 +21,6 @@ import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; -import org.apache.druid.catalog.model.CatalogUtils; import org.apache.druid.catalog.model.ColumnSpec; import org.apache.druid.catalog.model.Columns; import org.apache.druid.catalog.model.ModelProperties; @@ -78,12 +77,6 @@ public SegmentGranularityFieldDefn() super(SEGMENT_GRANULARITY_PROPERTY); } - @Override - public void validate(Object value, ObjectMapper jsonMapper) - { - String gran = decode(value, jsonMapper); - CatalogUtils.validateGranularity(gran); - } } public static class HiddenColumnsDefn extends StringListPropertyDefn