This is an automated email from the ASF dual-hosted git repository.
cwylie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git
The following commit(s) were added to refs/heads/master by this push:
new 069f7ac0e1f update checkstyle version (#19064)
069f7ac0e1f is described below
commit 069f7ac0e1fc8c39977f0cd50bde59afba9de957
Author: Clint Wylie <[email protected]>
AuthorDate: Thu Mar 5 10:05:43 2026 -0800
update checkstyle version (#19064)
---
codestyle/checkstyle.xml | 42 ++--
.../embedded/compact/AutoCompactionTest.java | 48 ++---
.../testing/embedded/query/JdbcQueryTest.java | 4 +-
.../query/ServerManagerForQueryErrorTest.java | 232 ++++++++++-----------
...ListBasedDruidToTimelineEventConverterTest.java | 42 ++--
.../graphite/WhiteListBasedConverterTest.java | 42 ++--
.../sql/ArrayOfDoublesSketchSqlAggregatorTest.java | 4 +-
.../druid/query/filter/BloomKFilterTest.java | 8 +-
.../org/apache/druid/catalog/CatalogException.java | 8 +-
.../security/kerberos/KerberosAuthenticator.java | 4 +-
.../ApproximateHistogramVectorAggregatorTest.java | 15 +-
.../data/input/kafkainput/KafkaHeaderFormat.java | 2 +-
.../kinesis/supervisor/KinesisSupervisorTest.java | 14 +-
.../indexer/DetermineRangePartitionsJobTest.java | 4 +-
.../tools/ServerManagerForQueryErrorTest.java | 232 ++++++++++-----------
.../org/apache/druid/msq/exec/MSQArraysTest.java | 8 +-
.../org/apache/druid/msq/exec/MSQReplaceTest.java | 2 +-
pom.xml | 8 +-
.../druid/query/context/ResponseContext.java | 4 +-
.../query/groupby/orderby/OrderByColumnSpec.java | 1 +
.../query/search/SearchQueryQueryToolChest.java | 112 +++++-----
.../druid/segment/vector/VectorObjectSelector.java | 2 +-
.../partition/DimensionRangeBucketShardSpec.java | 31 +--
.../org/apache/druid/utils/CompressionUtils.java | 1 +
.../druid/data/input/impl/JSONParseSpecTest.java | 26 +--
.../druid/data/input/impl/JsonInputFormatTest.java | 16 +-
.../druid/data/input/impl/TimestampSpecTest.java | 4 +-
.../frame/field/DoubleArrayFieldReaderTest.java | 4 +-
.../frame/key/RowKeyComparisonRunLengthsTest.java | 30 +--
.../common/FastIntervalStringFormatterTest.java | 8 +-
.../druid/java/util/common/GranularityTest.java | 4 +-
.../common/concurrent/ScheduledExecutorsTest.java | 8 +-
.../java/util/common/guava/ComparatorsTest.java | 2 +-
.../java/util/metrics/OshiSysMonitorTest.java | 4 +-
.../SerializablePairLongDoubleBufferStoreTest.java | 8 +-
.../SerializablePairLongFloatBufferStoreTest.java | 8 +-
.../SerializablePairLongLongBufferStoreTest.java | 8 +-
.../SerializablePairLongStringBufferStoreTest.java | 8 +-
.../groupby/GroupByQueryRunnerFactoryTest.java | 4 +-
.../query/groupby/GroupByQueryRunnerTest.java | 4 +-
.../semantic/FramedOnHeapAggregatableTest.java | 44 ++--
.../semantic/RowsAndColumnsDecoratorTest.java | 10 +-
.../timeboundary/TimeBoundaryQueryRunnerTest.java | 8 +-
.../apache/druid/segment/IndexMergerTestBase.java | 4 +-
.../druid/catalog/model/table/TableBuilder.java | 4 +-
.../apache/druid/guice/DruidInjectorBuilder.java | 4 +-
.../druid/server/QuerySwappingQueryRunner.java | 2 +-
.../druid/segment/indexing/DataSchemaTest.java | 4 +-
.../server/compaction/CompactionStatusTest.java | 44 ++--
.../compaction/NewestSegmentFirstPolicyTest.java | 6 +-
.../BroadcastDatasourceLoadingSpecTest.java | 95 ++++++---
.../coordinator/duty/CompactSegmentsTest.java | 54 +++--
.../coordinator/duty/KillCompactionConfigTest.java | 24 ++-
.../lookup/cache/LookupCoordinatorManagerTest.java | 28 +--
.../server/lookup/cache/LookupLoadingSpecTest.java | 28 ++-
55 files changed, 722 insertions(+), 653 deletions(-)
diff --git a/codestyle/checkstyle.xml b/codestyle/checkstyle.xml
index 2be3aa292bf..b9aff24a535 100644
--- a/codestyle/checkstyle.xml
+++ b/codestyle/checkstyle.xml
@@ -20,8 +20,8 @@
-->
<!DOCTYPE module PUBLIC
- "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
- "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+ "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
+ "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<module name="Header">
@@ -37,11 +37,11 @@
</module>
<!-- Added as per the issue #7384 - Prohibit @author tags in Javadoc -->
<module name="RegexpSingleline">
- <property name="format" value="^\s*\*\s*@author" />
- <property name="minimum" value="0" />
- <property name="maximum" value="0" />
- <property name="message" value="Prohibit @author tags in Javadoc" />
- <property name="fileExtensions" value="java" />
+ <property name="format" value="^\s*\*\s*@author"/>
+ <property name="minimum" value="0"/>
+ <property name="maximum" value="0"/>
+ <property name="message" value="Prohibit @author tags in Javadoc"/>
+ <property name="fileExtensions" value="java"/>
</module>
<module name="TreeWalker">
@@ -51,19 +51,27 @@
<property name="checkFormat" value="$1"/>
</module>
+ <!-- Suppress Indentation for anonymous class opening/closing braces.
+ Anonymous classes passed as arguments sit at +4 from the enclosing
call
+ rather than +2, which is correct style but conflicts with
lineWrappingIndentation=2. -->
+ <module name="SuppressionXpathSingleFilter">
+ <property name="checks" value="Indentation"/>
+ <property name="query" value="//LITERAL_NEW/OBJBLOCK/LCURLY |
//LITERAL_NEW/OBJBLOCK/RCURLY"/>
+ </module>
+
<module name="RedundantModifier">
<property name="tokens" value="INTERFACE_DEF,ENUM_DEF,METHOD_DEF"/>
</module>
<!-- See http://checkstyle.sourceforge.net/checks.html for examples -->
- <!--<module name="LineLength">-->
- <!--<property name="max" value="120"/>-->
- <!--</module>-->
+<!-- <module name="LineLength">-->
+<!-- <property name="max" value="120"/>-->
+<!-- </module>-->
<module name="AvoidStarImport"/>
<module name="AvoidStaticImport"/>
<module name="RedundantImport"/>
- <module name="UnusedImports" />
+ <module name="UnusedImports"/>
<module name="NeedBraces"/>
<module name="LeftCurly">
<property name="option" value="nl"/>
@@ -115,6 +123,8 @@
<module name="Indentation">
<property name="basicOffset" value="2"/>
<property name="caseIndent" value="2"/>
+ <property name="lineWrappingIndentation" value="2"/>
+ <property name="braceAdjustment" value="0"/>
</module>
<module name="MethodParamPad">
@@ -123,7 +133,7 @@
<module name="OneStatementPerLine"/>
<module name="EmptyStatement"/>
- <module name="ModifierOrder" />
+ <module name="ModifierOrder"/>
<module name="Regexp">
<property name="format" value="com\.google\.common\.io\.Closer"/>
@@ -300,10 +310,10 @@ codestyle/checkstyle.xml. "/>
<property name="message" value="Duplicate line"/>
</module>
- <!-- Added as per the issue #6936 - Prohibit method names starting with
capital letters -->
- <module name="MethodName">
- <property name = "format" value = "^[a-z_]*[a-z0-9][a-zA-Z0-9_]*$"/>
- </module>
+ <!-- Added as per the issue #6936 - Prohibit method names starting with
capital letters -->
+ <module name="MethodName">
+ <property name="format" value="^[a-z_]*[a-z0-9][a-zA-Z0-9_]*$"/>
+ </module>
<!-- Added as per the issue #7609 - Local variable names shouldn't start
with capital -->
<module name="LocalVariableName">
diff --git
a/embedded-tests/src/test/java/org/apache/druid/testing/embedded/compact/AutoCompactionTest.java
b/embedded-tests/src/test/java/org/apache/druid/testing/embedded/compact/AutoCompactionTest.java
index ba8df1b802c..d7d12b397dc 100644
---
a/embedded-tests/src/test/java/org/apache/druid/testing/embedded/compact/AutoCompactionTest.java
+++
b/embedded-tests/src/test/java/org/apache/druid/testing/embedded/compact/AutoCompactionTest.java
@@ -1780,35 +1780,35 @@ public class AutoCompactionTest extends
CompactionTestBase
.forDataSource(fullDatasourceName)
.withSkipOffsetFromLatest(skipOffsetFromLatest)
.withTuningConfig(
- new
UserCompactionTaskQueryTuningConfig(
- null,
- null,
- null,
- null,
- new MaxSizeSplitHintSpec(null,
1),
- partitionsSpec,
- null,
- null,
- null,
- null,
- null,
- 1,
- null,
- null,
- null,
- null,
- null,
- 1,
- null
- )
- )
+ new
UserCompactionTaskQueryTuningConfig(
+ null,
+ null,
+ null,
+ null,
+ new
MaxSizeSplitHintSpec(null, 1),
+ partitionsSpec,
+ null,
+ null,
+ null,
+ null,
+ null,
+ 1,
+ null,
+ null,
+ null,
+ null,
+ null,
+ 1,
+ null
+ )
+ )
.withGranularitySpec(granularitySpec)
.withDimensionsSpec(dimensionsSpec)
.withMetricsSpec(metricsSpec)
.withTransformSpec(transformSpec)
.withIoConfig(
- !dropExisting ? null : new
UserCompactionTaskIOConfig(true)
- )
+ !dropExisting ? null : new
UserCompactionTaskIOConfig(true)
+ )
.withEngine(engine)
.withTaskContext(ImmutableMap.of("maxNumTasks", 2))
.build();
diff --git
a/embedded-tests/src/test/java/org/apache/druid/testing/embedded/query/JdbcQueryTest.java
b/embedded-tests/src/test/java/org/apache/druid/testing/embedded/query/JdbcQueryTest.java
index 32020853753..9fc52f915bf 100644
---
a/embedded-tests/src/test/java/org/apache/druid/testing/embedded/query/JdbcQueryTest.java
+++
b/embedded-tests/src/test/java/org/apache/druid/testing/embedded/query/JdbcQueryTest.java
@@ -70,8 +70,8 @@ public class JdbcQueryTest extends QueryTestBase
connectionProperties.setProperty("password", "priest");
connections = new String[]{
StringUtils.format(CONNECTION_TEMPLATE, getServerUrl(router)),
- StringUtils.format(CONNECTION_TEMPLATE, getServerUrl(broker)),
- };
+ StringUtils.format(CONNECTION_TEMPLATE, getServerUrl(broker))
+ };
dataSourceName = ingestBasicData();
}
diff --git
a/embedded-tests/src/test/java/org/apache/druid/testing/embedded/query/ServerManagerForQueryErrorTest.java
b/embedded-tests/src/test/java/org/apache/druid/testing/embedded/query/ServerManagerForQueryErrorTest.java
index de0c62d52a9..6ff7c67b1ef 100644
---
a/embedded-tests/src/test/java/org/apache/druid/testing/embedded/query/ServerManagerForQueryErrorTest.java
+++
b/embedded-tests/src/test/java/org/apache/druid/testing/embedded/query/ServerManagerForQueryErrorTest.java
@@ -261,128 +261,128 @@ public class ServerManagerForQueryErrorTest extends
ServerManager
ref ->
ref.getSegmentReference()
.map(segment -> {
- final QueryContext queryContext = query.context();
- if
(queryContext.getBoolean(QUERY_TIMEOUT_TEST_CONTEXT_KEY, false)) {
- return (QueryRunner<T>) (queryPlus,
responseContext) -> new Sequence<>()
- {
- @Override
- public <OutType> OutType accumulate(
- OutType initValue,
- Accumulator<OutType, T> accumulator
- )
- {
- throw new QueryTimeoutException("query timeout
test");
- }
+ final QueryContext queryContext = query.context();
+ if
(queryContext.getBoolean(QUERY_TIMEOUT_TEST_CONTEXT_KEY, false)) {
+ return (QueryRunner<T>) (queryPlus, responseContext) ->
new Sequence<>()
+ {
+ @Override
+ public <OutType> OutType accumulate(
+ OutType initValue,
+ Accumulator<OutType, T> accumulator
+ )
+ {
+ throw new QueryTimeoutException("query timeout
test");
+ }
- @Override
- public <OutType> Yielder<OutType> toYielder(
- OutType initValue,
- YieldingAccumulator<OutType, T> accumulator
- )
- {
- throw new QueryTimeoutException("query timeout
test");
- }
- };
- } else if
(queryContext.getBoolean(QUERY_CAPACITY_EXCEEDED_TEST_CONTEXT_KEY, false)) {
- return (QueryRunner<T>) (queryPlus,
responseContext) -> new Sequence<>()
- {
- @Override
- public <OutType> OutType accumulate(
- OutType initValue,
- Accumulator<OutType, T> accumulator
- )
- {
- throw
QueryCapacityExceededException.withErrorMessageAndResolvedHost(
- "query capacity exceeded test"
- );
- }
+ @Override
+ public <OutType> Yielder<OutType> toYielder(
+ OutType initValue,
+ YieldingAccumulator<OutType, T> accumulator
+ )
+ {
+ throw new QueryTimeoutException("query timeout
test");
+ }
+ };
+ } else if
(queryContext.getBoolean(QUERY_CAPACITY_EXCEEDED_TEST_CONTEXT_KEY, false)) {
+ return (QueryRunner<T>) (queryPlus, responseContext) ->
new Sequence<>()
+ {
+ @Override
+ public <OutType> OutType accumulate(
+ OutType initValue,
+ Accumulator<OutType, T> accumulator
+ )
+ {
+ throw
QueryCapacityExceededException.withErrorMessageAndResolvedHost(
+ "query capacity exceeded test"
+ );
+ }
- @Override
- public <OutType> Yielder<OutType> toYielder(
- OutType initValue,
- YieldingAccumulator<OutType, T> accumulator
- )
- {
- throw
QueryCapacityExceededException.withErrorMessageAndResolvedHost(
- "query capacity exceeded test"
- );
- }
- };
- } else if
(queryContext.getBoolean(QUERY_UNSUPPORTED_TEST_CONTEXT_KEY, false)) {
- return (QueryRunner<T>) (queryPlus,
responseContext) -> new Sequence<>()
- {
- @Override
- public <OutType> OutType accumulate(
- OutType initValue,
- Accumulator<OutType, T> accumulator
- )
- {
- throw new QueryUnsupportedException("query
unsupported test");
- }
+ @Override
+ public <OutType> Yielder<OutType> toYielder(
+ OutType initValue,
+ YieldingAccumulator<OutType, T> accumulator
+ )
+ {
+ throw
QueryCapacityExceededException.withErrorMessageAndResolvedHost(
+ "query capacity exceeded test"
+ );
+ }
+ };
+ } else if
(queryContext.getBoolean(QUERY_UNSUPPORTED_TEST_CONTEXT_KEY, false)) {
+ return (QueryRunner<T>) (queryPlus, responseContext) ->
new Sequence<>()
+ {
+ @Override
+ public <OutType> OutType accumulate(
+ OutType initValue,
+ Accumulator<OutType, T> accumulator
+ )
+ {
+ throw new QueryUnsupportedException("query
unsupported test");
+ }
- @Override
- public <OutType> Yielder<OutType> toYielder(
- OutType initValue,
- YieldingAccumulator<OutType, T> accumulator
- )
- {
- throw new QueryUnsupportedException("query
unsupported test");
- }
- };
- } else if
(queryContext.getBoolean(RESOURCE_LIMIT_EXCEEDED_TEST_CONTEXT_KEY, false)) {
- return (QueryRunner<T>) (queryPlus,
responseContext) -> new Sequence<>()
- {
- @Override
- public <OutType> OutType accumulate(
- OutType initValue,
- Accumulator<OutType, T> accumulator
- )
- {
- throw new
ResourceLimitExceededException("resource limit exceeded test");
- }
+ @Override
+ public <OutType> Yielder<OutType> toYielder(
+ OutType initValue,
+ YieldingAccumulator<OutType, T> accumulator
+ )
+ {
+ throw new QueryUnsupportedException("query
unsupported test");
+ }
+ };
+ } else if
(queryContext.getBoolean(RESOURCE_LIMIT_EXCEEDED_TEST_CONTEXT_KEY, false)) {
+ return (QueryRunner<T>) (queryPlus, responseContext) ->
new Sequence<>()
+ {
+ @Override
+ public <OutType> OutType accumulate(
+ OutType initValue,
+ Accumulator<OutType, T> accumulator
+ )
+ {
+ throw new ResourceLimitExceededException("resource
limit exceeded test");
+ }
- @Override
- public <OutType> Yielder<OutType> toYielder(
- OutType initValue,
- YieldingAccumulator<OutType, T> accumulator
- )
- {
- throw new
ResourceLimitExceededException("resource limit exceeded test");
- }
- };
- } else if
(queryContext.getBoolean(QUERY_FAILURE_TEST_CONTEXT_KEY, false)) {
- return (QueryRunner<T>) (queryPlus,
responseContext) -> new Sequence<>()
- {
- @Override
- public <OutType> OutType accumulate(
- OutType initValue,
- Accumulator<OutType, T> accumulator
- )
- {
- throw new RuntimeException("query failure
test");
- }
+ @Override
+ public <OutType> Yielder<OutType> toYielder(
+ OutType initValue,
+ YieldingAccumulator<OutType, T> accumulator
+ )
+ {
+ throw new ResourceLimitExceededException("resource
limit exceeded test");
+ }
+ };
+ } else if
(queryContext.getBoolean(QUERY_FAILURE_TEST_CONTEXT_KEY, false)) {
+ return (QueryRunner<T>) (queryPlus, responseContext) ->
new Sequence<>()
+ {
+ @Override
+ public <OutType> OutType accumulate(
+ OutType initValue,
+ Accumulator<OutType, T> accumulator
+ )
+ {
+ throw new RuntimeException("query failure test");
+ }
- @Override
- public <OutType> Yielder<OutType> toYielder(
- OutType initValue,
- YieldingAccumulator<OutType, T> accumulator
- )
- {
- throw new RuntimeException("query failure
test");
- }
- };
- }
+ @Override
+ public <OutType> Yielder<OutType> toYielder(
+ OutType initValue,
+ YieldingAccumulator<OutType, T> accumulator
+ )
+ {
+ throw new RuntimeException("query failure test");
+ }
+ };
+ }
- return buildQueryRunnerForSegment(
- ref.getSegmentDescriptor(),
- segment,
- factory,
- toolChest,
- cpuTimeAccumulator,
- cacheKeyPrefix
- );
- }
- ).orElseThrow(
+ return buildQueryRunnerForSegment(
+ ref.getSegmentDescriptor(),
+ segment,
+ factory,
+ toolChest,
+ cpuTimeAccumulator,
+ cacheKeyPrefix
+ );
+ })
+ .orElseThrow(
() -> DruidException.defensive("Unexpected missing
segment[%s]", ref.getSegmentDescriptor())
)
);
diff --git
a/extensions-contrib/ambari-metrics-emitter/src/test/java/org/apache/druid/emitter/ambari/metrics/WhiteListBasedDruidToTimelineEventConverterTest.java
b/extensions-contrib/ambari-metrics-emitter/src/test/java/org/apache/druid/emitter/ambari/metrics/WhiteListBasedDruidToTimelineEventConverterTest.java
index eded587fb2e..90512efc52a 100644
---
a/extensions-contrib/ambari-metrics-emitter/src/test/java/org/apache/druid/emitter/ambari/metrics/WhiteListBasedDruidToTimelineEventConverterTest.java
+++
b/extensions-contrib/ambari-metrics-emitter/src/test/java/org/apache/druid/emitter/ambari/metrics/WhiteListBasedDruidToTimelineEventConverterTest.java
@@ -46,28 +46,26 @@ public class WhiteListBasedDruidToTimelineEventConverterTest
private final String defaultNamespace = prefix + "." + serviceName;
@Test
- @Parameters(
- {
- "query/time, true",
- "query/node/ttfb, true",
- "query/segmentAndCache/time, true",
- "query/time/balaba, true",
- "query/tim, false",
- "segment/added/bytes, true",
- "segment/count, true",
- "segment/size, true",
- "segment/cost/raw, false",
- "coordinator/TIER_1 /cost/raw, false",
- "segment/Kost/raw, false",
- ", false",
- "word, false",
- "coordinator, false",
- "server/, false",
- "ingest/persists/time, true",
- "jvm/mem/init, true",
- "jvm/gc/count, true"
- }
- )
+ @Parameters({
+ "query/time, true",
+ "query/node/ttfb, true",
+ "query/segmentAndCache/time, true",
+ "query/time/balaba, true",
+ "query/tim, false",
+ "segment/added/bytes, true",
+ "segment/count, true",
+ "segment/size, true",
+ "segment/cost/raw, false",
+ "coordinator/TIER_1 /cost/raw, false",
+ "segment/Kost/raw, false",
+ ", false",
+ "word, false",
+ "coordinator, false",
+ "server/, false",
+ "ingest/persists/time, true",
+ "jvm/mem/init, true",
+ "jvm/gc/count, true"
+ })
public void testDefaultIsInWhiteList(String key, boolean expectedValue)
{
ServiceMetricEvent event = ServiceMetricEvent
diff --git
a/extensions-contrib/graphite-emitter/src/test/java/org/apache/druid/emitter/graphite/WhiteListBasedConverterTest.java
b/extensions-contrib/graphite-emitter/src/test/java/org/apache/druid/emitter/graphite/WhiteListBasedConverterTest.java
index a1a4f999549..8f2780ee894 100644
---
a/extensions-contrib/graphite-emitter/src/test/java/org/apache/druid/emitter/graphite/WhiteListBasedConverterTest.java
+++
b/extensions-contrib/graphite-emitter/src/test/java/org/apache/druid/emitter/graphite/WhiteListBasedConverterTest.java
@@ -52,28 +52,26 @@ public class WhiteListBasedConverterTest
private final String defaultNamespace = prefix + "." + serviceName + "." +
GraphiteEmitter.sanitize(hostname);
@Test
- @Parameters(
- {
- "query/time, true",
- "query/node/ttfb, true",
- "query/segmentAndCache/time, true",
- "query/time/balaba, true",
- "query/tim, false",
- "segment/added/bytes, false",
- "segment/count, true",
- "segment/size, true",
- "segment/cost/raw, false",
- "coordinator/TIER_1 /cost/raw, false",
- "segment/Kost/raw, false",
- ", false",
- "word, false",
- "coordinator, false",
- "server/, false",
- "ingest/persists/time, true",
- "jvm/mem/init, true",
- "jvm/gc/count, true"
- }
- )
+ @Parameters({
+ "query/time, true",
+ "query/node/ttfb, true",
+ "query/segmentAndCache/time, true",
+ "query/time/balaba, true",
+ "query/tim, false",
+ "segment/added/bytes, false",
+ "segment/count, true",
+ "segment/size, true",
+ "segment/cost/raw, false",
+ "coordinator/TIER_1 /cost/raw, false",
+ "segment/Kost/raw, false",
+ ", false",
+ "word, false",
+ "coordinator, false",
+ "server/, false",
+ "ingest/persists/time, true",
+ "jvm/mem/init, true",
+ "jvm/gc/count, true"
+ })
public void testDefaultIsInWhiteList(String key, boolean expectedValue)
{
ServiceMetricEvent event = ServiceMetricEvent
diff --git
a/extensions-core/datasketches/src/test/java/org/apache/druid/query/aggregation/datasketches/tuple/sql/ArrayOfDoublesSketchSqlAggregatorTest.java
b/extensions-core/datasketches/src/test/java/org/apache/druid/query/aggregation/datasketches/tuple/sql/ArrayOfDoublesSketchSqlAggregatorTest.java
index 003c959a49d..131c7b0b505 100644
---
a/extensions-core/datasketches/src/test/java/org/apache/druid/query/aggregation/datasketches/tuple/sql/ArrayOfDoublesSketchSqlAggregatorTest.java
+++
b/extensions-core/datasketches/src/test/java/org/apache/druid/query/aggregation/datasketches/tuple/sql/ArrayOfDoublesSketchSqlAggregatorTest.java
@@ -355,8 +355,8 @@ public class ArrayOfDoublesSketchSqlAggregatorTest extends
BaseCalciteQueryTest
null,
"\"AQEJAwQBzJP/////////fw==\"",
"\"AQEJAwgBzJP/////////fwIAAAAAAAAAjFnadZuMrkg6WYAWZ8t1NgAAAAAAACBAAAAAAAAANkA=\"",
-
"\"AQEJAwgBzJP/////////fwIAAAAAAAAAjFnadZuMrkg6WYAWZ8t1NgAAAAAAACBAAAAAAAAANkA=\"",
- }
+
"\"AQEJAwgBzJP/////////fwIAAAAAAAAAjFnadZuMrkg6WYAWZ8t1NgAAAAAAACBAAAAAAAAANkA=\""
+ }
);
testQuery(
diff --git
a/extensions-core/druid-bloom-filter/src/test/java/org/apache/druid/query/filter/BloomKFilterTest.java
b/extensions-core/druid-bloom-filter/src/test/java/org/apache/druid/query/filter/BloomKFilterTest.java
index 605634ad54e..63bd658cfc7 100644
---
a/extensions-core/druid-bloom-filter/src/test/java/org/apache/druid/query/filter/BloomKFilterTest.java
+++
b/extensions-core/druid-bloom-filter/src/test/java/org/apache/druid/query/filter/BloomKFilterTest.java
@@ -455,15 +455,15 @@ public class BloomKFilterTest
"bloo",
"bloom fil",
"bloom filter",
- "cuckoo filter",
- };
+ "cuckoo filter"
+ };
String[] inputs2 = {
"2_bloo",
"2_bloom fil",
"2_bloom filter",
- "2_cuckoo filter",
- };
+ "2_cuckoo filter"
+ };
for (String val : inputs1) {
bf1.addString(val);
diff --git
a/extensions-core/druid-catalog/src/main/java/org/apache/druid/catalog/CatalogException.java
b/extensions-core/druid-catalog/src/main/java/org/apache/druid/catalog/CatalogException.java
index c09fe35a5a1..3b71af7af0c 100644
---
a/extensions-core/druid-catalog/src/main/java/org/apache/druid/catalog/CatalogException.java
+++
b/extensions-core/druid-catalog/src/main/java/org/apache/druid/catalog/CatalogException.java
@@ -41,7 +41,7 @@ public class CatalogException extends Exception
*/
public static class NotFoundException extends CatalogException
{
- public NotFoundException(String msg, Object...args)
+ public NotFoundException(String msg, Object... args)
{
super(NOT_FOUND_ERROR, Response.Status.NOT_FOUND, msg, args);
}
@@ -55,7 +55,7 @@ public class CatalogException extends Exception
*/
public static class DuplicateKeyException extends CatalogException
{
- public DuplicateKeyException(String msg, Object...args)
+ public DuplicateKeyException(String msg, Object... args)
{
super(DUPLICATE_ERROR, Response.Status.BAD_REQUEST, msg, args);
}
@@ -68,7 +68,7 @@ public class CatalogException extends Exception
final String errorCode,
final Response.Status responseCode,
final String message,
- final Object...args
+ final Object... args
)
{
super(StringUtils.format(message, args));
@@ -76,7 +76,7 @@ public class CatalogException extends Exception
this.responseCode = responseCode;
}
- public static CatalogException badRequest(String msg, Object...args)
+ public static CatalogException badRequest(String msg, Object... args)
{
return new CatalogException(
CatalogException.INVALID_ERROR,
diff --git
a/extensions-core/druid-kerberos/src/main/java/org/apache/druid/security/kerberos/KerberosAuthenticator.java
b/extensions-core/druid-kerberos/src/main/java/org/apache/druid/security/kerberos/KerberosAuthenticator.java
index a6c0d7245eb..6ef391610c3 100644
---
a/extensions-core/druid-kerberos/src/main/java/org/apache/druid/security/kerberos/KerberosAuthenticator.java
+++
b/extensions-core/druid-kerberos/src/main/java/org/apache/druid/security/kerberos/KerberosAuthenticator.java
@@ -487,8 +487,8 @@ public class KerberosAuthenticator implements Authenticator
KerberosUtil.getKrb5LoginModuleName(),
AppConfigurationEntry.LoginModuleControlFlag.REQUIRED,
options
- ),
- };
+ )
+ };
}
}
diff --git
a/extensions-core/histogram/src/test/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogramVectorAggregatorTest.java
b/extensions-core/histogram/src/test/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogramVectorAggregatorTest.java
index ade91819f03..51bcb1ec61e 100644
---
a/extensions-core/histogram/src/test/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogramVectorAggregatorTest.java
+++
b/extensions-core/histogram/src/test/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogramVectorAggregatorTest.java
@@ -38,8 +38,19 @@ import static org.easymock.EasyMock.expect;
public class ApproximateHistogramVectorAggregatorTest
{
private static final float[] FLOATS = {23, 19, 10, 16, 36, 2, 9, 32, 30, 45,
33}; // Last value is never included
- private static final boolean[] NULL_VECTOR =
- {false, false, false, false, false, false, false, false, false, false,
true};
+ private static final boolean[] NULL_VECTOR = {
+ false,
+ false,
+ false,
+ false,
+ false,
+ false,
+ false,
+ false,
+ false,
+ false,
+ true
+ };
private VectorColumnSelectorFactory vectorColumnSelectorFactory;
@Before
diff --git
a/extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/data/input/kafkainput/KafkaHeaderFormat.java
b/extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/data/input/kafkainput/KafkaHeaderFormat.java
index b94b34c57e9..913193fb32d 100644
---
a/extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/data/input/kafkainput/KafkaHeaderFormat.java
+++
b/extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/data/input/kafkainput/KafkaHeaderFormat.java
@@ -25,7 +25,7 @@ import org.apache.kafka.common.header.Headers;
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
@JsonSubTypes(value = {
- @JsonSubTypes.Type(name = "string", value =
KafkaStringHeaderFormat.class)
+ @JsonSubTypes.Type(name = "string", value = KafkaStringHeaderFormat.class)
})
public interface KafkaHeaderFormat
diff --git
a/extensions-core/kinesis-indexing-service/src/test/java/org/apache/druid/indexing/kinesis/supervisor/KinesisSupervisorTest.java
b/extensions-core/kinesis-indexing-service/src/test/java/org/apache/druid/indexing/kinesis/supervisor/KinesisSupervisorTest.java
index 0039f730ec2..78d3c6791ab 100644
---
a/extensions-core/kinesis-indexing-service/src/test/java/org/apache/druid/indexing/kinesis/supervisor/KinesisSupervisorTest.java
+++
b/extensions-core/kinesis-indexing-service/src/test/java/org/apache/druid/indexing/kinesis/supervisor/KinesisSupervisorTest.java
@@ -3309,10 +3309,9 @@ public class KinesisSupervisorTest extends
EasyMockSupport
EasyMock.expect(taskStorage.getTask("id1")).andReturn(Optional.of(id1)).anyTimes();
EasyMock.expect(taskStorage.getTask("id2")).andReturn(Optional.of(id2)).anyTimes();
EasyMock.expect(taskStorage.getTask("id3")).andReturn(Optional.of(id3)).anyTimes();
- EasyMock.expect(
-
indexerMetadataStorageCoordinator.retrieveDataSourceMetadata(DATASOURCE)).andReturn(new
KinesisDataSourceMetadata(
- null)
- ).anyTimes();
+
EasyMock.expect(indexerMetadataStorageCoordinator.retrieveDataSourceMetadata(DATASOURCE))
+ .andReturn(new KinesisDataSourceMetadata(null))
+ .anyTimes();
EasyMock.expect(taskClient.getStatusAsync("id1"))
.andReturn(Futures.immediateFuture(SeekableStreamIndexTaskRunner.Status.READING));
EasyMock.expect(taskClient.getStatusAsync("id2"))
@@ -3461,10 +3460,9 @@ public class KinesisSupervisorTest extends
EasyMockSupport
EasyMock.expect(taskStorage.getTask("id1")).andReturn(Optional.of(id1)).anyTimes();
EasyMock.expect(taskStorage.getTask("id2")).andReturn(Optional.of(id2)).anyTimes();
EasyMock.expect(taskStorage.getTask("id3")).andReturn(Optional.of(id3)).anyTimes();
- EasyMock.expect(
-
indexerMetadataStorageCoordinator.retrieveDataSourceMetadata(DATASOURCE)).andReturn(new
KinesisDataSourceMetadata(
- null)
- ).anyTimes();
+
EasyMock.expect(indexerMetadataStorageCoordinator.retrieveDataSourceMetadata(DATASOURCE))
+ .andReturn(new KinesisDataSourceMetadata(null))
+ .anyTimes();
replayAll();
diff --git
a/indexing-hadoop/src/test/java/org/apache/druid/indexer/DetermineRangePartitionsJobTest.java
b/indexing-hadoop/src/test/java/org/apache/druid/indexer/DetermineRangePartitionsJobTest.java
index 9869ff46561..e26d9e7d15b 100644
---
a/indexing-hadoop/src/test/java/org/apache/druid/indexer/DetermineRangePartitionsJobTest.java
+++
b/indexing-hadoop/src/test/java/org/apache/druid/indexer/DetermineRangePartitionsJobTest.java
@@ -81,8 +81,8 @@ public class DetermineRangePartitionsJobTest
{null, {"d.example.com"}},
{{"d.example.com"}, {"g.example.com"}},
{{"g.example.com"}, {"j.example.com"}},
- {{"j.example.com"}, null},
- }
+ {{"j.example.com"}, null}
+ }
},
ImmutableList.of(
"2014102000,a.example.com,CN,100",
diff --git
a/integration-tests-ex/tools/src/main/java/org/apache/druid/testing/tools/ServerManagerForQueryErrorTest.java
b/integration-tests-ex/tools/src/main/java/org/apache/druid/testing/tools/ServerManagerForQueryErrorTest.java
index 6d1893c9991..b39b567dd58 100644
---
a/integration-tests-ex/tools/src/main/java/org/apache/druid/testing/tools/ServerManagerForQueryErrorTest.java
+++
b/integration-tests-ex/tools/src/main/java/org/apache/druid/testing/tools/ServerManagerForQueryErrorTest.java
@@ -261,128 +261,128 @@ public class ServerManagerForQueryErrorTest extends
ServerManager
ref ->
ref.getSegmentReference()
.map(segment -> {
- final QueryContext queryContext = query.context();
- if
(queryContext.getBoolean(QUERY_TIMEOUT_TEST_CONTEXT_KEY, false)) {
- return (QueryRunner<T>) (queryPlus,
responseContext) -> new Sequence<>()
- {
- @Override
- public <OutType> OutType accumulate(
- OutType initValue,
- Accumulator<OutType, T> accumulator
- )
- {
- throw new QueryTimeoutException("query timeout
test");
- }
+ final QueryContext queryContext = query.context();
+ if
(queryContext.getBoolean(QUERY_TIMEOUT_TEST_CONTEXT_KEY, false)) {
+ return (QueryRunner<T>) (queryPlus, responseContext) ->
new Sequence<>()
+ {
+ @Override
+ public <OutType> OutType accumulate(
+ OutType initValue,
+ Accumulator<OutType, T> accumulator
+ )
+ {
+ throw new QueryTimeoutException("query timeout
test");
+ }
- @Override
- public <OutType> Yielder<OutType> toYielder(
- OutType initValue,
- YieldingAccumulator<OutType, T> accumulator
- )
- {
- throw new QueryTimeoutException("query timeout
test");
- }
- };
- } else if
(queryContext.getBoolean(QUERY_CAPACITY_EXCEEDED_TEST_CONTEXT_KEY, false)) {
- return (QueryRunner<T>) (queryPlus,
responseContext) -> new Sequence<>()
- {
- @Override
- public <OutType> OutType accumulate(
- OutType initValue,
- Accumulator<OutType, T> accumulator
- )
- {
- throw
QueryCapacityExceededException.withErrorMessageAndResolvedHost(
- "query capacity exceeded test"
- );
- }
+ @Override
+ public <OutType> Yielder<OutType> toYielder(
+ OutType initValue,
+ YieldingAccumulator<OutType, T> accumulator
+ )
+ {
+ throw new QueryTimeoutException("query timeout
test");
+ }
+ };
+ } else if
(queryContext.getBoolean(QUERY_CAPACITY_EXCEEDED_TEST_CONTEXT_KEY, false)) {
+ return (QueryRunner<T>) (queryPlus, responseContext) ->
new Sequence<>()
+ {
+ @Override
+ public <OutType> OutType accumulate(
+ OutType initValue,
+ Accumulator<OutType, T> accumulator
+ )
+ {
+ throw
QueryCapacityExceededException.withErrorMessageAndResolvedHost(
+ "query capacity exceeded test"
+ );
+ }
- @Override
- public <OutType> Yielder<OutType> toYielder(
- OutType initValue,
- YieldingAccumulator<OutType, T> accumulator
- )
- {
- throw
QueryCapacityExceededException.withErrorMessageAndResolvedHost(
- "query capacity exceeded test"
- );
- }
- };
- } else if
(queryContext.getBoolean(QUERY_UNSUPPORTED_TEST_CONTEXT_KEY, false)) {
- return (QueryRunner<T>) (queryPlus,
responseContext) -> new Sequence<>()
- {
- @Override
- public <OutType> OutType accumulate(
- OutType initValue,
- Accumulator<OutType, T> accumulator
- )
- {
- throw new QueryUnsupportedException("query
unsupported test");
- }
+ @Override
+ public <OutType> Yielder<OutType> toYielder(
+ OutType initValue,
+ YieldingAccumulator<OutType, T> accumulator
+ )
+ {
+ throw
QueryCapacityExceededException.withErrorMessageAndResolvedHost(
+ "query capacity exceeded test"
+ );
+ }
+ };
+ } else if
(queryContext.getBoolean(QUERY_UNSUPPORTED_TEST_CONTEXT_KEY, false)) {
+ return (QueryRunner<T>) (queryPlus, responseContext) ->
new Sequence<>()
+ {
+ @Override
+ public <OutType> OutType accumulate(
+ OutType initValue,
+ Accumulator<OutType, T> accumulator
+ )
+ {
+ throw new QueryUnsupportedException("query
unsupported test");
+ }
- @Override
- public <OutType> Yielder<OutType> toYielder(
- OutType initValue,
- YieldingAccumulator<OutType, T> accumulator
- )
- {
- throw new QueryUnsupportedException("query
unsupported test");
- }
- };
- } else if
(queryContext.getBoolean(RESOURCE_LIMIT_EXCEEDED_TEST_CONTEXT_KEY, false)) {
- return (QueryRunner<T>) (queryPlus,
responseContext) -> new Sequence<>()
- {
- @Override
- public <OutType> OutType accumulate(
- OutType initValue,
- Accumulator<OutType, T> accumulator
- )
- {
- throw new
ResourceLimitExceededException("resource limit exceeded test");
- }
+ @Override
+ public <OutType> Yielder<OutType> toYielder(
+ OutType initValue,
+ YieldingAccumulator<OutType, T> accumulator
+ )
+ {
+ throw new QueryUnsupportedException("query
unsupported test");
+ }
+ };
+ } else if
(queryContext.getBoolean(RESOURCE_LIMIT_EXCEEDED_TEST_CONTEXT_KEY, false)) {
+ return (QueryRunner<T>) (queryPlus, responseContext) ->
new Sequence<>()
+ {
+ @Override
+ public <OutType> OutType accumulate(
+ OutType initValue,
+ Accumulator<OutType, T> accumulator
+ )
+ {
+ throw new ResourceLimitExceededException("resource
limit exceeded test");
+ }
- @Override
- public <OutType> Yielder<OutType> toYielder(
- OutType initValue,
- YieldingAccumulator<OutType, T> accumulator
- )
- {
- throw new
ResourceLimitExceededException("resource limit exceeded test");
- }
- };
- } else if
(queryContext.getBoolean(QUERY_FAILURE_TEST_CONTEXT_KEY, false)) {
- return (QueryRunner<T>) (queryPlus,
responseContext) -> new Sequence<>()
- {
- @Override
- public <OutType> OutType accumulate(
- OutType initValue,
- Accumulator<OutType, T> accumulator
- )
- {
- throw new RuntimeException("query failure
test");
- }
+ @Override
+ public <OutType> Yielder<OutType> toYielder(
+ OutType initValue,
+ YieldingAccumulator<OutType, T> accumulator
+ )
+ {
+ throw new ResourceLimitExceededException("resource
limit exceeded test");
+ }
+ };
+ } else if
(queryContext.getBoolean(QUERY_FAILURE_TEST_CONTEXT_KEY, false)) {
+ return (QueryRunner<T>) (queryPlus, responseContext) ->
new Sequence<>()
+ {
+ @Override
+ public <OutType> OutType accumulate(
+ OutType initValue,
+ Accumulator<OutType, T> accumulator
+ )
+ {
+ throw new RuntimeException("query failure test");
+ }
- @Override
- public <OutType> Yielder<OutType> toYielder(
- OutType initValue,
- YieldingAccumulator<OutType, T> accumulator
- )
- {
- throw new RuntimeException("query failure
test");
- }
- };
- }
+ @Override
+ public <OutType> Yielder<OutType> toYielder(
+ OutType initValue,
+ YieldingAccumulator<OutType, T> accumulator
+ )
+ {
+ throw new RuntimeException("query failure test");
+ }
+ };
+ }
- return buildQueryRunnerForSegment(
- ref.getSegmentDescriptor(),
- segment,
- factory,
- toolChest,
- cpuTimeAccumulator,
- cacheKeyPrefix
- );
- }
- ).orElseThrow(
+ return buildQueryRunnerForSegment(
+ ref.getSegmentDescriptor(),
+ segment,
+ factory,
+ toolChest,
+ cpuTimeAccumulator,
+ cacheKeyPrefix
+ );
+ })
+ .orElseThrow(
() -> DruidException.defensive("Unexpected missing
segment[%s]", ref.getSegmentDescriptor())
)
);
diff --git
a/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQArraysTest.java
b/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQArraysTest.java
index 824508f280c..2b9a5ca707a 100644
---
a/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQArraysTest.java
+++
b/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQArraysTest.java
@@ -611,8 +611,8 @@ public class MSQArraysTest extends MSQTestBase
Arrays.asList(2L, 3L),
null,
Arrays.asList(3.3d, 4.4d, 5.5d),
- Arrays.asList(999.0d, null, 5.5d),
- },
+ Arrays.asList(999.0d, null, 5.5d)
+ },
new Object[]{
1672531200000L,
Arrays.asList("b", "c"),
@@ -719,8 +719,8 @@ public class MSQArraysTest extends MSQTestBase
null,
Arrays.asList(2L, 3L),
null,
- Arrays.asList(null, 1.1d),
- }
+ Arrays.asList(null, 1.1d)
+ }
);
RowSignature rowSignatureWithoutTimeColumn =
diff --git
a/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQReplaceTest.java
b/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQReplaceTest.java
index c532e833474..9d4ddde70ca 100644
---
a/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQReplaceTest.java
+++
b/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQReplaceTest.java
@@ -111,7 +111,7 @@ public class MSQReplaceTest extends MSQTestBase
{PARALLEL_MERGE, PARALLEL_MERGE_MSQ_CONTEXT},
{SUPERUSER, SUPERUSER_MSQ_CONTEXT},
{WITH_REPLACE_LOCK_AND_COMPACTION_STATE,
QUERY_CONTEXT_WITH_REPLACE_LOCK_AND_COMPACTION_STATE}
- };
+ };
return Arrays.asList(data);
}
diff --git a/pom.xml b/pom.xml
index e0e7cdb73c8..019098b7413 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1573,7 +1573,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
- <version>3.0.0</version>
+ <version>3.6.0</version>
<configuration>
<sourceDirectories>
<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
@@ -1582,19 +1582,19 @@
<configLocation>codestyle/checkstyle.xml</configLocation>
<suppressionsLocation>codestyle/checkstyle-suppressions.xml</suppressionsLocation>
<suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
- <encoding>UTF-8</encoding>
+ <inputEncoding>UTF-8</inputEncoding>
<headerLocation>codestyle/LICENSE.txt</headerLocation>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
<excludes>
-
*com/fasterxml/jackson/databind/*,**/NestedDataFormatsTest.java
+ *com/fasterxml/jackson/databind/*
</excludes>
</configuration>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
- <version>8.21</version>
+ <version>12.3.1</version>
</dependency>
</dependencies>
<executions>
diff --git
a/processing/src/main/java/org/apache/druid/query/context/ResponseContext.java
b/processing/src/main/java/org/apache/druid/query/context/ResponseContext.java
index a2a06820718..4a7868445be 100644
---
a/processing/src/main/java/org/apache/druid/query/context/ResponseContext.java
+++
b/processing/src/main/java/org/apache/druid/query/context/ResponseContext.java
@@ -488,8 +488,8 @@ public abstract class ResponseContext
TIMEOUT_AT,
NUM_SCANNED_ROWS,
CPU_CONSUMED_NANOS,
- TRUNCATED,
- }
+ TRUNCATED
+ }
);
}
diff --git
a/processing/src/main/java/org/apache/druid/query/groupby/orderby/OrderByColumnSpec.java
b/processing/src/main/java/org/apache/druid/query/groupby/orderby/OrderByColumnSpec.java
index 5dbe2abf94f..8186a3f151f 100644
---
a/processing/src/main/java/org/apache/druid/query/groupby/orderby/OrderByColumnSpec.java
+++
b/processing/src/main/java/org/apache/druid/query/groupby/orderby/OrderByColumnSpec.java
@@ -53,6 +53,7 @@ public class OrderByColumnSpec
* of an exception thrown.
*/
private static final Map<String, Direction> STUPID_ENUM_MAP;
+
static {
final ImmutableMap.Builder<String, Direction> bob =
ImmutableMap.builder();
for (Direction direction : Direction.values()) {
diff --git
a/processing/src/main/java/org/apache/druid/query/search/SearchQueryQueryToolChest.java
b/processing/src/main/java/org/apache/druid/query/search/SearchQueryQueryToolChest.java
index 7efdf0e9e48..28ff5113363 100644
---
a/processing/src/main/java/org/apache/druid/query/search/SearchQueryQueryToolChest.java
+++
b/processing/src/main/java/org/apache/druid/query/search/SearchQueryQueryToolChest.java
@@ -216,64 +216,66 @@ public class SearchQueryQueryToolChest extends
QueryToolChest<Result<SearchResul
}
}
- return !needsRename
- ? new Result<>(
- DateTimes.utc(((Number) result.get(0)).longValue()),
- new SearchResultValue(
- Lists.transform(
- (List) result.get(1),
- new Function<Object, SearchHit>()
- {
- @Override
- public SearchHit apply(@Nullable Object input)
+ if (needsRename) {
+ return new Result<>(
+ DateTimes.utc(((Number) result.get(0)).longValue()),
+ new SearchResultValue(
+ Lists.transform(
+ (List) result.get(1),
+ new Function<Object, SearchHit>()
{
- if (input instanceof Map) {
- return new SearchHit(
- (String) ((Map) input).get("dimension"),
- (String) ((Map) input).get("value"),
- (Integer) ((Map) input).get("count")
- );
- } else if (input instanceof SearchHit) {
- return (SearchHit) input;
- } else {
- throw new IAE("Unknown format [%s]",
input.getClass());
+ @Override
+ public SearchHit apply(@Nullable Object input)
+ {
+ String dim;
+ String val;
+ Integer count;
+ if (input instanceof Map) {
+ dim = outputNameMap.get((String) ((Map)
input).get("dimension"));
+ val = (String) ((Map) input).get("value");
+ count = (Integer) ((Map) input).get("count");
+ } else if (input instanceof SearchHit) {
+ SearchHit cached = (SearchHit) input;
+ dim = outputNameMap.get(cached.getDimension());
+ val = cached.getValue();
+ count = cached.getCount();
+ } else {
+ throw new IAE("Unknown format [%s]",
input.getClass());
+ }
+ return new SearchHit(dim, val, count);
}
}
- }
- )
- )
- )
- : new Result<>(
- DateTimes.utc(((Number) result.get(0)).longValue()),
- new SearchResultValue(
- Lists.transform(
- (List) result.get(1),
- new Function<Object, SearchHit>()
- {
- @Override
- public SearchHit apply(@Nullable Object input)
- {
- String dim;
- String val;
- Integer count;
- if (input instanceof Map) {
- dim = outputNameMap.get((String) ((Map)
input).get("dimension"));
- val = (String) ((Map) input).get("value");
- count = (Integer) ((Map)
input).get("count");
- } else if (input instanceof SearchHit) {
- SearchHit cached = (SearchHit) input;
- dim =
outputNameMap.get(cached.getDimension());
- val = cached.getValue();
- count = cached.getCount();
- } else {
- throw new IAE("Unknown format [%s]",
input.getClass());
- }
- return new SearchHit(dim, val, count);
- }
- }
- )
- )
- );
+ )
+ )
+ );
+ } else {
+ return new Result<>(
+ DateTimes.utc(((Number) result.get(0)).longValue()),
+ new SearchResultValue(
+ Lists.transform(
+ (List) result.get(1),
+ new Function<Object, SearchHit>()
+ {
+ @Override
+ public SearchHit apply(@Nullable Object input)
+ {
+ if (input instanceof Map) {
+ return new SearchHit(
+ (String) ((Map) input).get("dimension"),
+ (String) ((Map) input).get("value"),
+ (Integer) ((Map) input).get("count")
+ );
+ } else if (input instanceof SearchHit) {
+ return (SearchHit) input;
+ } else {
+ throw new IAE("Unknown format [%s]",
input.getClass());
+ }
+ }
+ }
+ )
+ )
+ );
+ }
}
};
}
diff --git
a/processing/src/main/java/org/apache/druid/segment/vector/VectorObjectSelector.java
b/processing/src/main/java/org/apache/druid/segment/vector/VectorObjectSelector.java
index 37adf93224d..b1c65e1c95c 100644
---
a/processing/src/main/java/org/apache/druid/segment/vector/VectorObjectSelector.java
+++
b/processing/src/main/java/org/apache/druid/segment/vector/VectorObjectSelector.java
@@ -31,7 +31,7 @@ import org.apache.druid.segment.data.IndexedInts;
*
* Typically created by {@link
VectorColumnSelectorFactory#makeObjectSelector(String)}.
*
- * @see ColumnValueSelector, the non-vectorized version.
+ * @see ColumnValueSelector the non-vectorized version.
*/
public interface VectorObjectSelector extends VectorSizeInspector
{
diff --git
a/processing/src/main/java/org/apache/druid/timeline/partition/DimensionRangeBucketShardSpec.java
b/processing/src/main/java/org/apache/druid/timeline/partition/DimensionRangeBucketShardSpec.java
index 6d187eef8ae..c37ea140057 100644
---
a/processing/src/main/java/org/apache/druid/timeline/partition/DimensionRangeBucketShardSpec.java
+++
b/processing/src/main/java/org/apache/druid/timeline/partition/DimensionRangeBucketShardSpec.java
@@ -95,20 +95,23 @@ public class DimensionRangeBucketShardSpec extends
BaseDimensionRangeShardSpec
@Override
public BuildingDimensionRangeShardSpec convert(int partitionId)
{
- return dimensions != null && dimensions.size() == 1
- ? new BuildingSingleDimensionShardSpec(
- bucketId,
- dimensions.get(0),
- StringTuple.firstOrNull(start),
- StringTuple.firstOrNull(end),
- partitionId
- ) : new BuildingDimensionRangeShardSpec(
- bucketId,
- dimensions,
- start,
- end,
- partitionId
- );
+ if (dimensions != null && dimensions.size() == 1) {
+ return new BuildingSingleDimensionShardSpec(
+ bucketId,
+ dimensions.get(0),
+ StringTuple.firstOrNull(start),
+ StringTuple.firstOrNull(end),
+ partitionId
+ );
+ } else {
+ return new BuildingDimensionRangeShardSpec(
+ bucketId,
+ dimensions,
+ start,
+ end,
+ partitionId
+ );
+ }
}
@Override
diff --git
a/processing/src/main/java/org/apache/druid/utils/CompressionUtils.java
b/processing/src/main/java/org/apache/druid/utils/CompressionUtils.java
index eabec58ef15..b6cca325b33 100644
--- a/processing/src/main/java/org/apache/druid/utils/CompressionUtils.java
+++ b/processing/src/main/java/org/apache/druid/utils/CompressionUtils.java
@@ -128,6 +128,7 @@ public class CompressionUtils
private final String suffix;
private final String extension;
+
Format(String suffix, String extension)
{
this.suffix = suffix;
diff --git
a/processing/src/test/java/org/apache/druid/data/input/impl/JSONParseSpecTest.java
b/processing/src/test/java/org/apache/druid/data/input/impl/JSONParseSpecTest.java
index 08c3f4dd154..91f6b5084bc 100644
---
a/processing/src/test/java/org/apache/druid/data/input/impl/JSONParseSpecTest.java
+++
b/processing/src/test/java/org/apache/druid/data/input/impl/JSONParseSpecTest.java
@@ -178,18 +178,18 @@ public class JSONParseSpecTest
public void testEquals()
{
EqualsVerifier.forClass(JSONParseSpec.class)
- .usingGetClass()
- .withPrefabValues(
- DimensionsSpec.class,
- new
DimensionsSpec(DimensionsSpec.getDefaultSchemas(ImmutableList.of("bar",
"foo"))),
- new
DimensionsSpec(DimensionsSpec.getDefaultSchemas(ImmutableList.of("baz",
"buzz")))
- )
- .withPrefabValues(
- ObjectMapper.class,
- new ObjectMapper(),
- new ObjectMapper()
- )
- .withIgnoredFields("objectMapper")
- .verify();
+ .usingGetClass()
+ .withPrefabValues(
+ DimensionsSpec.class,
+ new
DimensionsSpec(DimensionsSpec.getDefaultSchemas(ImmutableList.of("bar",
"foo"))),
+ new
DimensionsSpec(DimensionsSpec.getDefaultSchemas(ImmutableList.of("baz",
"buzz")))
+ )
+ .withPrefabValues(
+ ObjectMapper.class,
+ new ObjectMapper(),
+ new ObjectMapper()
+ )
+ .withIgnoredFields("objectMapper")
+ .verify();
}
}
diff --git
a/processing/src/test/java/org/apache/druid/data/input/impl/JsonInputFormatTest.java
b/processing/src/test/java/org/apache/druid/data/input/impl/JsonInputFormatTest.java
index 3c58145df31..490362fab4c 100644
---
a/processing/src/test/java/org/apache/druid/data/input/impl/JsonInputFormatTest.java
+++
b/processing/src/test/java/org/apache/druid/data/input/impl/JsonInputFormatTest.java
@@ -130,14 +130,14 @@ public class JsonInputFormatTest
public void testEquals()
{
EqualsVerifier.forClass(JsonInputFormat.class)
- .usingGetClass()
- .withPrefabValues(
- ObjectMapper.class,
- new ObjectMapper(),
- new ObjectMapper()
- )
- .withIgnoredFields("objectMapper")
- .verify();
+ .usingGetClass()
+ .withPrefabValues(
+ ObjectMapper.class,
+ new ObjectMapper(),
+ new ObjectMapper()
+ )
+ .withIgnoredFields("objectMapper")
+ .verify();
}
@Test
diff --git
a/processing/src/test/java/org/apache/druid/data/input/impl/TimestampSpecTest.java
b/processing/src/test/java/org/apache/druid/data/input/impl/TimestampSpecTest.java
index b736d77e01b..0ccbe87685e 100644
---
a/processing/src/test/java/org/apache/druid/data/input/impl/TimestampSpecTest.java
+++
b/processing/src/test/java/org/apache/druid/data/input/impl/TimestampSpecTest.java
@@ -57,8 +57,8 @@ public class TimestampSpecTest
"2000-01-01T05:00:01",
"2000-01-01T05:00:01",
"2000-01-01T05:00:02",
- "2000-01-01T05:00:03",
- };
+ "2000-01-01T05:00:03"
+ };
TimestampSpec spec = new TimestampSpec("TIMEstamp", dateFormat, null);
DateTimes.UtcFormatter formatter =
DateTimes.wrapFormatter(ISODateTimeFormat.dateHourMinuteSecond());
diff --git
a/processing/src/test/java/org/apache/druid/frame/field/DoubleArrayFieldReaderTest.java
b/processing/src/test/java/org/apache/druid/frame/field/DoubleArrayFieldReaderTest.java
index 06f6e39e3b8..280b9393992 100644
---
a/processing/src/test/java/org/apache/druid/frame/field/DoubleArrayFieldReaderTest.java
+++
b/processing/src/test/java/org/apache/druid/frame/field/DoubleArrayFieldReaderTest.java
@@ -94,8 +94,8 @@ public class DoubleArrayFieldReaderTest extends
InitializedNullHandlingTest
null,
1111.0,
23.0,
- null,
- };
+ null
+ };
private static final Object[] DOUBLES_ARRAY_2 = new Object[]{
null,
diff --git
a/processing/src/test/java/org/apache/druid/frame/key/RowKeyComparisonRunLengthsTest.java
b/processing/src/test/java/org/apache/druid/frame/key/RowKeyComparisonRunLengthsTest.java
index 4db0f25b787..fd074bf9ae2 100644
---
a/processing/src/test/java/org/apache/druid/frame/key/RowKeyComparisonRunLengthsTest.java
+++
b/processing/src/test/java/org/apache/druid/frame/key/RowKeyComparisonRunLengthsTest.java
@@ -327,8 +327,8 @@ public class RowKeyComparisonRunLengthsTest
new RunLengthEntry[]{
new RunLengthEntry(false, KeyOrder.ASCENDING, 1),
new RunLengthEntry(false, KeyOrder.DESCENDING, 1),
- new RunLengthEntry(true, KeyOrder.ASCENDING, 1),
- }
+ new RunLengthEntry(true, KeyOrder.ASCENDING, 1)
+ }
);
// index = 15; KeyColumns = COMPLEX DESC, COMPLEX DESC, STRING ASC
@@ -344,7 +344,7 @@ public class RowKeyComparisonRunLengthsTest
expectedResultsBuilder.add(
new RunLengthEntry[]{
new RunLengthEntry(true, KeyOrder.ASCENDING, 2),
- new RunLengthEntry(true, KeyOrder.DESCENDING, 1),
+ new RunLengthEntry(true, KeyOrder.DESCENDING, 1)
}
);
@@ -429,8 +429,8 @@ public class RowKeyComparisonRunLengthsTest
new RunLengthEntry[]{
new RunLengthEntry(false, KeyOrder.ASCENDING, 1),
new RunLengthEntry(false, KeyOrder.ASCENDING, 1),
- new RunLengthEntry(true, KeyOrder.DESCENDING, 1),
- }
+ new RunLengthEntry(true, KeyOrder.DESCENDING, 1)
+ }
);
// index = 27; KeyColumns = COMPLEX DESC, COMPLEX ASC, STRING DESC
@@ -465,8 +465,8 @@ public class RowKeyComparisonRunLengthsTest
new RunLengthEntry[]{
new RunLengthEntry(false, KeyOrder.ASCENDING, 1),
new RunLengthEntry(false, KeyOrder.DESCENDING, 1),
- new RunLengthEntry(true, KeyOrder.DESCENDING, 1),
- }
+ new RunLengthEntry(true, KeyOrder.DESCENDING, 1)
+ }
);
// index = 31; KeyColumns = COMPLEX DESC, COMPLEX DESC, STRING DESC
@@ -571,8 +571,8 @@ public class RowKeyComparisonRunLengthsTest
new RunLengthEntry[]{
new RunLengthEntry(false, KeyOrder.ASCENDING, 1),
new RunLengthEntry(false, KeyOrder.ASCENDING, 1),
- new RunLengthEntry(false, KeyOrder.ASCENDING, 1),
- }
+ new RunLengthEntry(false, KeyOrder.ASCENDING, 1)
+ }
);
// index = 43; KeyColumns = COMPLEX DESC, COMPLEX ASC, COMPLEX ASC
@@ -607,8 +607,8 @@ public class RowKeyComparisonRunLengthsTest
new RunLengthEntry[]{
new RunLengthEntry(false, KeyOrder.ASCENDING, 1),
new RunLengthEntry(false, KeyOrder.DESCENDING, 1),
- new RunLengthEntry(false, KeyOrder.ASCENDING, 1),
- }
+ new RunLengthEntry(false, KeyOrder.ASCENDING, 1)
+ }
);
// index = 47; KeyColumns = COMPLEX DESC, COMPLEX DESC, COMPLEX ASC
@@ -714,8 +714,8 @@ public class RowKeyComparisonRunLengthsTest
new RunLengthEntry[]{
new RunLengthEntry(false, KeyOrder.ASCENDING, 1),
new RunLengthEntry(false, KeyOrder.ASCENDING, 1),
- new RunLengthEntry(false, KeyOrder.DESCENDING, 1),
- }
+ new RunLengthEntry(false, KeyOrder.DESCENDING, 1)
+ }
);
// index = 59; KeyColumns = COMPLEX DESC, COMPLEX ASC, COMPLEX DESC
@@ -750,8 +750,8 @@ public class RowKeyComparisonRunLengthsTest
new RunLengthEntry[]{
new RunLengthEntry(false, KeyOrder.ASCENDING, 1),
new RunLengthEntry(false, KeyOrder.DESCENDING, 1),
- new RunLengthEntry(false, KeyOrder.DESCENDING, 1),
- }
+ new RunLengthEntry(false, KeyOrder.DESCENDING, 1)
+ }
);
// index = 63; KeyColumns = COMPLEX DESC, COMPLEX DESC, COMPLEX DESC
diff --git
a/processing/src/test/java/org/apache/druid/java/util/common/FastIntervalStringFormatterTest.java
b/processing/src/test/java/org/apache/druid/java/util/common/FastIntervalStringFormatterTest.java
index 8cc5439d1ba..65ee704f2bd 100644
---
a/processing/src/test/java/org/apache/druid/java/util/common/FastIntervalStringFormatterTest.java
+++
b/processing/src/test/java/org/apache/druid/java/util/common/FastIntervalStringFormatterTest.java
@@ -50,8 +50,8 @@ public class FastIntervalStringFormatterTest
Intervals.of("2013-02-17T15:22:08.427Z/2073-08-31T16:56:23.603Z"),
Intervals.of("2073-02-10T23:47:58.800Z/2099-03-11T19:08:38.458Z"),
Intervals.of("2035-08-09T12:33:43.951Z/2076-12-08T23:59:50.690Z"),
- Intervals.of("2030-01-22T18:39:08.566Z/2092-02-15T02:40:52.702Z"),
- };
+ Intervals.of("2030-01-22T18:39:08.566Z/2092-02-15T02:40:52.702Z")
+ };
for (Interval interval : validIntervals) {
Assert.assertEquals(interval.toString(),
FastIntervalStringFormatter.format(interval));
@@ -95,8 +95,8 @@ public class FastIntervalStringFormatterTest
Intervals.of("1954-11-07T14:38:33.857Z/1972-09-27T04:52:42.821Z"),
Intervals.of("1977-08-10T18:45:18.676Z/1983-05-13T07:00:59.266Z"),
Intervals.of("2429-02-19T08:27:26.173Z/2568-02-16T06:53:16.887Z"),
- Intervals.of("2447-07-10T12:48:18.234Z/2489-08-24T01:22:00.056Z"),
- };
+ Intervals.of("2447-07-10T12:48:18.234Z/2489-08-24T01:22:00.056Z")
+ };
for (Interval interval : fallbackIntervals) {
Assert.assertEquals(interval.toString(),
FastIntervalStringFormatter.format(interval));
diff --git
a/processing/src/test/java/org/apache/druid/java/util/common/GranularityTest.java
b/processing/src/test/java/org/apache/druid/java/util/common/GranularityTest.java
index f4106fe99d1..a4deac7b597 100644
---
a/processing/src/test/java/org/apache/druid/java/util/common/GranularityTest.java
+++
b/processing/src/test/java/org/apache/druid/java/util/common/GranularityTest.java
@@ -85,8 +85,8 @@ public class GranularityTest
new PathDate(null, IllegalFieldValueException.class,
"error/dt=2011-10-20-20-42-72/Test11"),
new PathDate(null, IllegalFieldValueException.class,
"error/dt=2011-10-20-42-90-24/Test11"),
new PathDate(null, IllegalFieldValueException.class,
"error/dt=2011-10-33-20-42-24/Test11"),
- new PathDate(null, IllegalFieldValueException.class,
"error/dt=2011-13-20-20-42-24/Test11"),
- };
+ new PathDate(null, IllegalFieldValueException.class,
"error/dt=2011-13-20-20-42-24/Test11")
+ };
checkToDate(SECOND, Granularity.Formatter.HIVE, secondChecks);
}
diff --git
a/processing/src/test/java/org/apache/druid/java/util/common/concurrent/ScheduledExecutorsTest.java
b/processing/src/test/java/org/apache/druid/java/util/common/concurrent/ScheduledExecutorsTest.java
index 9bc67ead02b..78ed41a85c9 100644
---
a/processing/src/test/java/org/apache/druid/java/util/common/concurrent/ScheduledExecutorsTest.java
+++
b/processing/src/test/java/org/apache/druid/java/util/common/concurrent/ScheduledExecutorsTest.java
@@ -33,11 +33,11 @@ public class ScheduledExecutorsTest
Duration delay = new Duration(1000);
ScheduledExecutorService exec =
Execs.scheduledSingleThreaded("BasicAuthenticatorCacheManager-Exec--%d");
ScheduledExecutors.scheduleWithFixedDelay(
- exec,
- initialDelay,
- delay,
+ exec,
+ initialDelay,
+ delay,
() -> {
- System.out.println("TEST!");
+ System.out.println("TEST!");
}
);
Thread.sleep(5 * 1000);
diff --git
a/processing/src/test/java/org/apache/druid/java/util/common/guava/ComparatorsTest.java
b/processing/src/test/java/org/apache/druid/java/util/common/guava/ComparatorsTest.java
index 53530852653..d445feaf0df 100644
---
a/processing/src/test/java/org/apache/druid/java/util/common/guava/ComparatorsTest.java
+++
b/processing/src/test/java/org/apache/druid/java/util/common/guava/ComparatorsTest.java
@@ -98,7 +98,7 @@ public class ComparatorsTest
Intervals.of("2011-04-02/2011-04-03T06"),
Intervals.of("2011-04-01/2011-04-04"),
Intervals.of("2011-04-02/2011-04-04")
- },
+ },
intervals
);
}
diff --git
a/processing/src/test/java/org/apache/druid/java/util/metrics/OshiSysMonitorTest.java
b/processing/src/test/java/org/apache/druid/java/util/metrics/OshiSysMonitorTest.java
index bfc28f99ee9..337d96868b9 100644
---
a/processing/src/test/java/org/apache/druid/java/util/metrics/OshiSysMonitorTest.java
+++
b/processing/src/test/java/org/apache/druid/java/util/metrics/OshiSysMonitorTest.java
@@ -464,8 +464,8 @@ public class OshiSysMonitorTest
CentralProcessor processor = Mockito.mock(CentralProcessor.class);
long[][] procTicks = new long[][]{
{1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L},
- {2L, 4L, 6L, 8L, 10L, 12L, 14L, 16L},
- };
+ {2L, 4L, 6L, 8L, 10L, 12L, 14L, 16L}
+ };
Mockito.when(processor.getProcessorCpuLoadTicks()).thenReturn(procTicks);
Mockito.when(hal.getProcessor()).thenReturn(processor);
diff --git
a/processing/src/test/java/org/apache/druid/query/aggregation/SerializablePairLongDoubleBufferStoreTest.java
b/processing/src/test/java/org/apache/druid/query/aggregation/SerializablePairLongDoubleBufferStoreTest.java
index 0e9ab9b4b80..479491f8280 100644
---
a/processing/src/test/java/org/apache/druid/query/aggregation/SerializablePairLongDoubleBufferStoreTest.java
+++
b/processing/src/test/java/org/apache/druid/query/aggregation/SerializablePairLongDoubleBufferStoreTest.java
@@ -49,16 +49,16 @@ public class SerializablePairLongDoubleBufferStoreTest
private final SerializablePairLongDouble[] integerRangeArr = new
SerializablePairLongDouble[]{
new SerializablePairLongDouble((long) MIN_INTEGER, 10D),
new SerializablePairLongDouble(101L, 20D),
- new SerializablePairLongDouble(102L, 30D),
- };
+ new SerializablePairLongDouble(102L, 30D)
+ };
private final SerializablePairLongDouble[] longRangeArr = new
SerializablePairLongDouble[]{
new SerializablePairLongDouble((long) MIN_LONG, 10D),
new SerializablePairLongDouble(101L, 20D),
new SerializablePairLongDouble(102L, 30D),
new SerializablePairLongDouble((long) Integer.MAX_VALUE, 40D),
- new SerializablePairLongDouble(Long.MAX_VALUE, 50D),
- };
+ new SerializablePairLongDouble(Long.MAX_VALUE, 50D)
+ };
private final SegmentWriteOutMedium writeOutMedium = new
OnHeapMemorySegmentWriteOutMedium();
private SerializablePairLongDoubleBufferStore bufferStore;
diff --git
a/processing/src/test/java/org/apache/druid/query/aggregation/SerializablePairLongFloatBufferStoreTest.java
b/processing/src/test/java/org/apache/druid/query/aggregation/SerializablePairLongFloatBufferStoreTest.java
index c670bca9684..a6f7090c8a5 100644
---
a/processing/src/test/java/org/apache/druid/query/aggregation/SerializablePairLongFloatBufferStoreTest.java
+++
b/processing/src/test/java/org/apache/druid/query/aggregation/SerializablePairLongFloatBufferStoreTest.java
@@ -49,16 +49,16 @@ public class SerializablePairLongFloatBufferStoreTest
private final SerializablePairLongFloat[] integerRangeArr = new
SerializablePairLongFloat[]{
new SerializablePairLongFloat((long) MIN_INTEGER, 10F),
new SerializablePairLongFloat(101L, 20F),
- new SerializablePairLongFloat(102L, 30F),
- };
+ new SerializablePairLongFloat(102L, 30F)
+ };
private final SerializablePairLongFloat[] longRangeArr = new
SerializablePairLongFloat[]{
new SerializablePairLongFloat((long) MIN_LONG, 10F),
new SerializablePairLongFloat(101L, 20F),
new SerializablePairLongFloat(102L, 30F),
new SerializablePairLongFloat((long) Integer.MAX_VALUE, 40F),
- new SerializablePairLongFloat(Long.MAX_VALUE, 50F),
- };
+ new SerializablePairLongFloat(Long.MAX_VALUE, 50F)
+ };
private final SegmentWriteOutMedium writeOutMedium = new
OnHeapMemorySegmentWriteOutMedium();
private SerializablePairLongFloatBufferStore bufferStore;
diff --git
a/processing/src/test/java/org/apache/druid/query/aggregation/SerializablePairLongLongBufferStoreTest.java
b/processing/src/test/java/org/apache/druid/query/aggregation/SerializablePairLongLongBufferStoreTest.java
index 22ffd82a168..054cabb303a 100644
---
a/processing/src/test/java/org/apache/druid/query/aggregation/SerializablePairLongLongBufferStoreTest.java
+++
b/processing/src/test/java/org/apache/druid/query/aggregation/SerializablePairLongLongBufferStoreTest.java
@@ -49,16 +49,16 @@ public class SerializablePairLongLongBufferStoreTest
private final SerializablePairLongLong[] integerRangeArr = new
SerializablePairLongLong[]{
new SerializablePairLongLong((long) MIN_INTEGER, 10L),
new SerializablePairLongLong(101L, 20L),
- new SerializablePairLongLong(102L, 30L),
- };
+ new SerializablePairLongLong(102L, 30L)
+ };
private final SerializablePairLongLong[] longRangeArr = new
SerializablePairLongLong[]{
new SerializablePairLongLong((long) MIN_LONG, 10L),
new SerializablePairLongLong(101L, 20L),
new SerializablePairLongLong(102L, 30L),
new SerializablePairLongLong((long) Integer.MAX_VALUE, 40L),
- new SerializablePairLongLong(Long.MAX_VALUE, 50L),
- };
+ new SerializablePairLongLong(Long.MAX_VALUE, 50L)
+ };
private final SegmentWriteOutMedium writeOutMedium = new
OnHeapMemorySegmentWriteOutMedium();
private SerializablePairLongLongBufferStore bufferStore;
diff --git
a/processing/src/test/java/org/apache/druid/query/aggregation/SerializablePairLongStringBufferStoreTest.java
b/processing/src/test/java/org/apache/druid/query/aggregation/SerializablePairLongStringBufferStoreTest.java
index 8b05f8a094c..a48e719a8bd 100644
---
a/processing/src/test/java/org/apache/druid/query/aggregation/SerializablePairLongStringBufferStoreTest.java
+++
b/processing/src/test/java/org/apache/druid/query/aggregation/SerializablePairLongStringBufferStoreTest.java
@@ -50,14 +50,14 @@ public class SerializablePairLongStringBufferStoreTest
private final SerializablePairLongString[] integerRangeArr = new
SerializablePairLongString[]{
new SerializablePairLongString((long) MIN_INTEGER, "fuu"),
new SerializablePairLongString(101L, "bar"),
- new SerializablePairLongString(102L, "baz"),
- };
+ new SerializablePairLongString(102L, "baz")
+ };
private final SerializablePairLongString[] longRangeArr = new
SerializablePairLongString[]{
new SerializablePairLongString(MIN_LONG, "fuu"),
new SerializablePairLongString(100L, "bar"),
new SerializablePairLongString((long) Integer.MAX_VALUE, "baz"),
- new SerializablePairLongString(Long.MAX_VALUE, "fuubarbaz"),
- };
+ new SerializablePairLongString(Long.MAX_VALUE, "fuubarbaz")
+ };
private final SegmentWriteOutMedium writeOutMedium = new
OnHeapMemorySegmentWriteOutMedium();
diff --git
a/processing/src/test/java/org/apache/druid/query/groupby/GroupByQueryRunnerFactoryTest.java
b/processing/src/test/java/org/apache/druid/query/groupby/GroupByQueryRunnerFactoryTest.java
index 2cf0f9eefcc..89167bd95c0 100644
---
a/processing/src/test/java/org/apache/druid/query/groupby/GroupByQueryRunnerFactoryTest.java
+++
b/processing/src/test/java/org/apache/druid/query/groupby/GroupByQueryRunnerFactoryTest.java
@@ -161,8 +161,8 @@ public class GroupByQueryRunnerFactoryTest
String[] rows = new String[]{
"2011-01-12T00:00:00.000Z,product_1,t1",
"2011-01-13T00:00:00.000Z,product_2,t2",
- "2011-01-14T00:00:00.000Z,product_3,t2",
- };
+ "2011-01-14T00:00:00.000Z,product_3,t2"
+ };
for (String row : rows) {
incrementalIndex.add(parser.parse(row));
diff --git
a/processing/src/test/java/org/apache/druid/query/groupby/GroupByQueryRunnerTest.java
b/processing/src/test/java/org/apache/druid/query/groupby/GroupByQueryRunnerTest.java
index f4e4d1dbd24..9679d9e8602 100644
---
a/processing/src/test/java/org/apache/druid/query/groupby/GroupByQueryRunnerTest.java
+++
b/processing/src/test/java/org/apache/druid/query/groupby/GroupByQueryRunnerTest.java
@@ -4247,8 +4247,8 @@ public class GroupByQueryRunnerTest extends
InitializedNullHandlingTest
new DefaultLimitSpec(OrderByColumnSpec.ascending("idx"), null),
new DefaultLimitSpec(OrderByColumnSpec.ascending("rows", "idx"), null),
new DefaultLimitSpec(OrderByColumnSpec.descending("idx"), null),
- new DefaultLimitSpec(OrderByColumnSpec.descending("rows", "idx"),
null),
- };
+ new DefaultLimitSpec(OrderByColumnSpec.descending("rows", "idx"), null)
+ };
GroupByQuery baseQuery = makeQueryBuilder()
.setDataSource(QueryRunnerTestHelper.DATA_SOURCE)
diff --git
a/processing/src/test/java/org/apache/druid/query/rowsandcols/semantic/FramedOnHeapAggregatableTest.java
b/processing/src/test/java/org/apache/druid/query/rowsandcols/semantic/FramedOnHeapAggregatableTest.java
index 41ceb315a04..77c1a126a30 100644
---
a/processing/src/test/java/org/apache/druid/query/rowsandcols/semantic/FramedOnHeapAggregatableTest.java
+++
b/processing/src/test/java/org/apache/druid/query/rowsandcols/semantic/FramedOnHeapAggregatableTest.java
@@ -66,8 +66,8 @@ public class FramedOnHeapAggregatableTest extends
SemanticTestBase
WindowFrame.rows(0, 0),
new AggregatorFactory[]{
new LongSumAggregatorFactory("sumFromLong", "intCol"),
- new DoubleMaxAggregatorFactory("maxFromInt", "intCol"),
- }
+ new DoubleMaxAggregatorFactory("maxFromInt", "intCol")
+ }
);
new RowsAndColumnsHelper()
@@ -92,8 +92,8 @@ public class FramedOnHeapAggregatableTest extends
SemanticTestBase
WindowFrame.rows(-1, 2),
new AggregatorFactory[]{
new LongSumAggregatorFactory("sumFromLong", "intCol"),
- new DoubleMaxAggregatorFactory("maxFromInt", "intCol"),
- }
+ new DoubleMaxAggregatorFactory("maxFromInt", "intCol")
+ }
);
new RowsAndColumnsHelper()
@@ -118,8 +118,8 @@ public class FramedOnHeapAggregatableTest extends
SemanticTestBase
WindowFrame.rows(0, 2),
new AggregatorFactory[]{
new LongSumAggregatorFactory("sumFromLong", "intCol"),
- new DoubleMaxAggregatorFactory("maxFromInt", "intCol"),
- }
+ new DoubleMaxAggregatorFactory("maxFromInt", "intCol")
+ }
);
new RowsAndColumnsHelper()
@@ -144,8 +144,8 @@ public class FramedOnHeapAggregatableTest extends
SemanticTestBase
WindowFrame.rows(-2, 0),
new AggregatorFactory[]{
new LongSumAggregatorFactory("sumFromLong", "intCol"),
- new DoubleMaxAggregatorFactory("maxFromInt", "intCol"),
- }
+ new DoubleMaxAggregatorFactory("maxFromInt", "intCol")
+ }
);
new RowsAndColumnsHelper()
@@ -171,8 +171,8 @@ public class FramedOnHeapAggregatableTest extends
SemanticTestBase
new AggregatorFactory[]{
new LongSumAggregatorFactory("sumFromLong", "intCol"),
new DoubleMaxAggregatorFactory("maxFromInt", "intCol"),
- new LongMinAggregatorFactory("longMin", "intCol"),
- }
+ new LongMinAggregatorFactory("longMin", "intCol")
+ }
);
new RowsAndColumnsHelper()
@@ -199,8 +199,8 @@ public class FramedOnHeapAggregatableTest extends
SemanticTestBase
new AggregatorFactory[]{
new LongSumAggregatorFactory("sumFromLong", "intCol"),
new DoubleMaxAggregatorFactory("maxFromInt", "intCol"),
- new LongMinAggregatorFactory("longMin", "intCol"),
- }
+ new LongMinAggregatorFactory("longMin", "intCol")
+ }
);
new RowsAndColumnsHelper()
@@ -227,8 +227,8 @@ public class FramedOnHeapAggregatableTest extends
SemanticTestBase
new AggregatorFactory[]{
new LongSumAggregatorFactory("sumFromLong", "intCol"),
new DoubleMaxAggregatorFactory("maxFromInt", "intCol"),
- new LongMinAggregatorFactory("longMin", "intCol"),
- }
+ new LongMinAggregatorFactory("longMin", "intCol")
+ }
);
new RowsAndColumnsHelper()
@@ -255,8 +255,8 @@ public class FramedOnHeapAggregatableTest extends
SemanticTestBase
new AggregatorFactory[]{
new LongSumAggregatorFactory("sumFromLong", "intCol"),
new DoubleMaxAggregatorFactory("maxFromInt", "intCol"),
- new LongMinAggregatorFactory("longMin", "intCol"),
- }
+ new LongMinAggregatorFactory("longMin", "intCol")
+ }
);
new RowsAndColumnsHelper()
@@ -283,8 +283,8 @@ public class FramedOnHeapAggregatableTest extends
SemanticTestBase
new AggregatorFactory[]{
new LongSumAggregatorFactory("sumFromLong", "intCol"),
new DoubleMaxAggregatorFactory("maxFromInt", "intCol"),
- new LongMinAggregatorFactory("longMin", "intCol"),
- }
+ new LongMinAggregatorFactory("longMin", "intCol")
+ }
);
new RowsAndColumnsHelper()
@@ -311,8 +311,8 @@ public class FramedOnHeapAggregatableTest extends
SemanticTestBase
new AggregatorFactory[]{
new LongSumAggregatorFactory("sumFromLong", "intCol"),
new DoubleMaxAggregatorFactory("maxFromInt", "intCol"),
- new LongMinAggregatorFactory("longMin", "intCol"),
- }
+ new LongMinAggregatorFactory("longMin", "intCol")
+ }
);
new RowsAndColumnsHelper()
@@ -339,8 +339,8 @@ public class FramedOnHeapAggregatableTest extends
SemanticTestBase
new AggregatorFactory[]{
new LongSumAggregatorFactory("sumFromLong", "intCol"),
new DoubleMaxAggregatorFactory("maxFromInt", "intCol"),
- new LongMinAggregatorFactory("longMin", "intCol"),
- }
+ new LongMinAggregatorFactory("longMin", "intCol")
+ }
);
new RowsAndColumnsHelper()
diff --git
a/processing/src/test/java/org/apache/druid/query/rowsandcols/semantic/RowsAndColumnsDecoratorTest.java
b/processing/src/test/java/org/apache/druid/query/rowsandcols/semantic/RowsAndColumnsDecoratorTest.java
index 4553a0a2e67..87c2793693d 100644
---
a/processing/src/test/java/org/apache/druid/query/rowsandcols/semantic/RowsAndColumnsDecoratorTest.java
+++
b/processing/src/test/java/org/apache/druid/query/rowsandcols/semantic/RowsAndColumnsDecoratorTest.java
@@ -86,8 +86,8 @@ public class RowsAndColumnsDecoratorTest extends
SemanticTestBase
{9L, "e", 789L, 8L},
{10L, "f", 123L, 9L},
{11L, "f", 456L, 10L},
- {12L, "g", 789L, 11L},
- };
+ {12L, "g", 789L, 11L}
+ };
RowSignature siggy = RowSignature.builder()
.add("__time", ColumnType.LONG)
@@ -172,8 +172,8 @@ public class RowsAndColumnsDecoratorTest extends
SemanticTestBase
{9L, 9L, 789L, 8L},
{10L, 10L, 123L, 9L},
{11L, 11L, 456L, 10L},
- {12L, 12L, 789L, 11L},
- };
+ {12L, 12L, 789L, 11L}
+ };
Interval[] intervals = new Interval[]{Intervals.utc(0, 6),
Intervals.utc(6, 13), Intervals.utc(4, 8)};
Filter[] filters = new Filter[]{
@@ -237,7 +237,7 @@ public class RowsAndColumnsDecoratorTest extends
SemanticTestBase
{8L, 4L},
{9L, 0L},
{10L, 0L}
- };
+ };
MapOfColumnsRowsAndColumns input = MapOfColumnsRowsAndColumns.fromMap(
ImmutableMap.of(
diff --git
a/processing/src/test/java/org/apache/druid/query/timeboundary/TimeBoundaryQueryRunnerTest.java
b/processing/src/test/java/org/apache/druid/query/timeboundary/TimeBoundaryQueryRunnerTest.java
index b388af0eb82..ded2a1fb0b3 100644
---
a/processing/src/test/java/org/apache/druid/query/timeboundary/TimeBoundaryQueryRunnerTest.java
+++
b/processing/src/test/java/org/apache/druid/query/timeboundary/TimeBoundaryQueryRunnerTest.java
@@ -109,8 +109,8 @@ public class TimeBoundaryQueryRunnerTest extends
InitializedNullHandlingTest
"2011-01-12T01:00:00.000Z\tspot\tbusiness\t1100\t11000.0\t110000\tpreferred\tbpreferred\t100.000000",
"2011-01-12T02:00:00.000Z\tspot\tentertainment\t1200\t12000.0\t120000\tpreferred\tepreferred\t100.000000",
"2011-01-13T00:00:00.000Z\tspot\tautomotive\t1000\t10000.0\t100000\tpreferred\tapreferred\t100.000000",
-
"2011-01-13T01:00:00.000Z\tspot\tbusiness\t1100\t11000.0\t110000\tpreferred\tbpreferred\t100.000000",
- };
+
"2011-01-13T01:00:00.000Z\tspot\tbusiness\t1100\t11000.0\t110000\tpreferred\tbpreferred\t100.000000"
+ };
public static final String[] V_0113 = {
"2011-01-14T00:00:00.000Z\tspot\tautomotive\t1000\t10000.0\t100000\tpreferred\tapreferred\t94.874713",
"2011-01-14T02:00:00.000Z\tspot\tentertainment\t1200\t12000.0\t120000\tpreferred\tepreferred\t110.087299",
@@ -120,8 +120,8 @@ public class TimeBoundaryQueryRunnerTest extends
InitializedNullHandlingTest
"2011-01-16T01:00:00.000Z\tspot\tbusiness\t1100\t11000.0\t110000\tpreferred\tbpreferred\t103.629399",
"2011-01-16T02:00:00.000Z\tspot\tentertainment\t1200\t12000.0\t120000\tpreferred\tepreferred\t110.087299",
"2011-01-17T01:00:00.000Z\tspot\tbusiness\t1100\t11000.0\t110000\tpreferred\tbpreferred\t103.629399",
-
"2011-01-17T02:00:00.000Z\tspot\tentertainment\t1200\t12000.0\t120000\tpreferred\tepreferred\t110.087299",
- };
+
"2011-01-17T02:00:00.000Z\tspot\tentertainment\t1200\t12000.0\t120000\tpreferred\tepreferred\t110.087299"
+ };
private static IncrementalIndex newIndex(String minTimeStamp)
{
diff --git
a/processing/src/test/java/org/apache/druid/segment/IndexMergerTestBase.java
b/processing/src/test/java/org/apache/druid/segment/IndexMergerTestBase.java
index c6abe654975..ffe22d38b14 100644
--- a/processing/src/test/java/org/apache/druid/segment/IndexMergerTestBase.java
+++ b/processing/src/test/java/org/apache/druid/segment/IndexMergerTestBase.java
@@ -1625,8 +1625,8 @@ public abstract class IndexMergerTestBase extends
InitializedNullHandlingTest
true,
new AggregatorFactory[]{
new LongSumAggregatorFactory("A", "A"),
- new LongSumAggregatorFactory("C", "C"),
- },
+ new LongSumAggregatorFactory("C", "C")
+ },
tmpDirMerged,
null,
indexSpec,
diff --git
a/server/src/main/java/org/apache/druid/catalog/model/table/TableBuilder.java
b/server/src/main/java/org/apache/druid/catalog/model/table/TableBuilder.java
index 488de63190c..e2a9cbe6537 100644
---
a/server/src/main/java/org/apache/druid/catalog/model/table/TableBuilder.java
+++
b/server/src/main/java/org/apache/druid/catalog/model/table/TableBuilder.java
@@ -136,7 +136,7 @@ public class TableBuilder
return property(DatasourceDefn.SEGMENT_GRANULARITY_PROPERTY,
segmentGranularity);
}
- public TableBuilder clusterColumns(ClusterKeySpec...clusterKeys)
+ public TableBuilder clusterColumns(ClusterKeySpec... clusterKeys)
{
return property(DatasourceDefn.CLUSTER_KEYS_PROPERTY,
Arrays.asList(clusterKeys));
}
@@ -151,7 +151,7 @@ public class TableBuilder
return property(DatasourceDefn.SEALED_PROPERTY, sealed);
}
- public TableBuilder hiddenColumns(String...hiddenColumns)
+ public TableBuilder hiddenColumns(String... hiddenColumns)
{
return hiddenColumns(Arrays.asList(hiddenColumns));
}
diff --git
a/server/src/main/java/org/apache/druid/guice/DruidInjectorBuilder.java
b/server/src/main/java/org/apache/druid/guice/DruidInjectorBuilder.java
index 1d7c26feeb5..c9180e542c4 100644
--- a/server/src/main/java/org/apache/druid/guice/DruidInjectorBuilder.java
+++ b/server/src/main/java/org/apache/druid/guice/DruidInjectorBuilder.java
@@ -100,7 +100,7 @@ public class DruidInjectorBuilder
/**
* Add an arbitrary set of modules.
*/
- public DruidInjectorBuilder add(Object...input)
+ public DruidInjectorBuilder add(Object... input)
{
for (Object o : input) {
addInput(o);
@@ -108,7 +108,7 @@ public class DruidInjectorBuilder
return this;
}
- public DruidInjectorBuilder addModules(Module...inputs)
+ public DruidInjectorBuilder addModules(Module... inputs)
{
for (Object o : inputs) {
addInput(o);
diff --git
a/server/src/main/java/org/apache/druid/server/QuerySwappingQueryRunner.java
b/server/src/main/java/org/apache/druid/server/QuerySwappingQueryRunner.java
index 51c140be037..8796d17c629 100644
--- a/server/src/main/java/org/apache/druid/server/QuerySwappingQueryRunner.java
+++ b/server/src/main/java/org/apache/druid/server/QuerySwappingQueryRunner.java
@@ -29,7 +29,7 @@ import org.apache.druid.query.context.ResponseContext;
/**
* A {@link QueryRunner} which validates that a *specific* query is passed in,
and then swaps it with another one.
- * Useful in passing the modified query to the underlying runners, since the
{@link QuerySegmentWalker#}
+ * Useful in passing the modified query to the underlying runners, since the
{@link QuerySegmentWalker}
* Useful since walkers might need to enrich the query with additional
parameters and the callers actually calling the
* `run()` won't know about this modification.
*
diff --git
a/server/src/test/java/org/apache/druid/segment/indexing/DataSchemaTest.java
b/server/src/test/java/org/apache/druid/segment/indexing/DataSchemaTest.java
index d810b9c95db..9e83ab71ccf 100644
--- a/server/src/test/java/org/apache/druid/segment/indexing/DataSchemaTest.java
+++ b/server/src/test/java/org/apache/druid/segment/indexing/DataSchemaTest.java
@@ -781,8 +781,8 @@ class DataSchemaTest extends InitializedNullHandlingTest
null,
new AggregatorFactory[]{
new DoubleSumAggregatorFactory("metric1", "col1"),
- new DoubleSumAggregatorFactory("metric2", "col2"),
- },
+ new DoubleSumAggregatorFactory("metric2", "col2")
+ },
ARBITRARY_GRANULARITY,
null,
parser,
diff --git
a/server/src/test/java/org/apache/druid/server/compaction/CompactionStatusTest.java
b/server/src/test/java/org/apache/druid/server/compaction/CompactionStatusTest.java
index e466f92f265..cdabf99198b 100644
---
a/server/src/test/java/org/apache/druid/server/compaction/CompactionStatusTest.java
+++
b/server/src/test/java/org/apache/druid/server/compaction/CompactionStatusTest.java
@@ -154,28 +154,28 @@ public class CompactionStatusTest
.forDataSource("datasource")
.withMaxRowsPerSegment(100)
.withTuningConfig(
- new
UserCompactionTaskQueryTuningConfig(
- null,
- null,
- null,
- 1000L,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null
- )
- )
+ new
UserCompactionTaskQueryTuningConfig(
+ null,
+ null,
+ null,
+ 1000L,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null
+ )
+ )
.build();
Assert.assertEquals(
new DynamicPartitionsSpec(100, 1000L),
diff --git
a/server/src/test/java/org/apache/druid/server/compaction/NewestSegmentFirstPolicyTest.java
b/server/src/test/java/org/apache/druid/server/compaction/NewestSegmentFirstPolicyTest.java
index ee2a442d292..dc18ed3f18b 100644
---
a/server/src/test/java/org/apache/druid/server/compaction/NewestSegmentFirstPolicyTest.java
+++
b/server/src/test/java/org/apache/druid/server/compaction/NewestSegmentFirstPolicyTest.java
@@ -773,8 +773,7 @@ public class NewestSegmentFirstPolicyTest
null));
// Create segments that were compacted (CompactionState != null) and have
segmentGranularity=DAY
- final CompactionState compactionState
- = new CompactionState(
+ final CompactionState compactionState = new CompactionState(
partitionsSpec,
null,
null,
@@ -857,8 +856,7 @@ public class NewestSegmentFirstPolicyTest
null));
// Create segments that were compacted (CompactionState != null) and have
segmentGranularity=DAY
- final CompactionState compactionState
- = new CompactionState(
+ final CompactionState compactionState = new CompactionState(
partitionsSpec,
null,
null,
diff --git
a/server/src/test/java/org/apache/druid/server/coordination/BroadcastDatasourceLoadingSpecTest.java
b/server/src/test/java/org/apache/druid/server/coordination/BroadcastDatasourceLoadingSpecTest.java
index ddec0901965..146862135b6 100644
---
a/server/src/test/java/org/apache/druid/server/coordination/BroadcastDatasourceLoadingSpecTest.java
+++
b/server/src/test/java/org/apache/druid/server/coordination/BroadcastDatasourceLoadingSpecTest.java
@@ -63,7 +63,10 @@ public class BroadcastDatasourceLoadingSpecTest
@Test
public void testLoadingOnlyRequiredLookupsWithNullList()
{
- DruidException exception = Assert.assertThrows(DruidException.class, () ->
BroadcastDatasourceLoadingSpec.loadOnly(null));
+ DruidException exception = Assert.assertThrows(
+ DruidException.class,
+ () -> BroadcastDatasourceLoadingSpec.loadOnly(null)
+ );
Assert.assertEquals("Expected non-null set of broadcast datasources to
load.", exception.getMessage());
}
@@ -96,8 +99,10 @@ public class BroadcastDatasourceLoadingSpecTest
BroadcastDatasourceLoadingSpec.loadOnly(ImmutableSet.of("ds1", "ds2")),
BroadcastDatasourceLoadingSpec.createFromContext(
ImmutableMap.of(
-
BroadcastDatasourceLoadingSpec.CTX_BROADCAST_DATASOURCES_TO_LOAD,
Arrays.asList("ds1", "ds2"),
-
BroadcastDatasourceLoadingSpec.CTX_BROADCAST_DATASOURCE_LOADING_MODE,
BroadcastDatasourceLoadingSpec.Mode.ONLY_REQUIRED
+
BroadcastDatasourceLoadingSpec.CTX_BROADCAST_DATASOURCES_TO_LOAD,
+ Arrays.asList("ds1", "ds2"),
+
BroadcastDatasourceLoadingSpec.CTX_BROADCAST_DATASOURCE_LOADING_MODE,
+ BroadcastDatasourceLoadingSpec.Mode.ONLY_REQUIRED
),
BroadcastDatasourceLoadingSpec.ALL
)
@@ -108,7 +113,9 @@ public class BroadcastDatasourceLoadingSpecTest
BroadcastDatasourceLoadingSpec.NONE,
BroadcastDatasourceLoadingSpec.createFromContext(
ImmutableMap.of(
-
BroadcastDatasourceLoadingSpec.CTX_BROADCAST_DATASOURCE_LOADING_MODE,
BroadcastDatasourceLoadingSpec.Mode.NONE),
+
BroadcastDatasourceLoadingSpec.CTX_BROADCAST_DATASOURCE_LOADING_MODE,
+ BroadcastDatasourceLoadingSpec.Mode.NONE
+ ),
BroadcastDatasourceLoadingSpec.ALL
)
);
@@ -117,50 +124,70 @@ public class BroadcastDatasourceLoadingSpecTest
Assert.assertEquals(
BroadcastDatasourceLoadingSpec.ALL,
BroadcastDatasourceLoadingSpec.createFromContext(
-
ImmutableMap.of(BroadcastDatasourceLoadingSpec.CTX_BROADCAST_DATASOURCE_LOADING_MODE,
BroadcastDatasourceLoadingSpec.Mode.ALL),
+ ImmutableMap.of(
+
BroadcastDatasourceLoadingSpec.CTX_BROADCAST_DATASOURCE_LOADING_MODE,
+ BroadcastDatasourceLoadingSpec.Mode.ALL
+ ),
BroadcastDatasourceLoadingSpec.NONE
)
);
}
@Test
- @Parameters(
- {
- "NONE1",
- "A",
- "Random mode",
- "all",
- "only required",
- "none"
- }
- )
+ @Parameters({
+ "NONE1",
+ "A",
+ "Random mode",
+ "all",
+ "only required",
+ "none"
+ })
public void testSpecFromInvalidModeInContext(final String mode)
{
- final DruidException exception = Assert.assertThrows(DruidException.class,
() -> BroadcastDatasourceLoadingSpec.createFromContext(
-
ImmutableMap.of(BroadcastDatasourceLoadingSpec.CTX_BROADCAST_DATASOURCE_LOADING_MODE,
mode), BroadcastDatasourceLoadingSpec.ALL));
- Assert.assertEquals(StringUtils.format("Invalid value of %s[%s]. Allowed
values are [ALL, NONE, ONLY_REQUIRED]",
-
BroadcastDatasourceLoadingSpec.CTX_BROADCAST_DATASOURCE_LOADING_MODE, mode),
exception.getMessage());
+ final DruidException exception = Assert.assertThrows(
+ DruidException.class,
+ () -> BroadcastDatasourceLoadingSpec.createFromContext(
+
ImmutableMap.of(BroadcastDatasourceLoadingSpec.CTX_BROADCAST_DATASOURCE_LOADING_MODE,
mode),
+ BroadcastDatasourceLoadingSpec.ALL
+ )
+ );
+ Assert.assertEquals(
+ StringUtils.format(
+ "Invalid value of %s[%s]. Allowed values are [ALL, NONE,
ONLY_REQUIRED]",
+
BroadcastDatasourceLoadingSpec.CTX_BROADCAST_DATASOURCE_LOADING_MODE, mode
+ ),
+ exception.getMessage()
+ );
}
@Test
- @Parameters(
- {
- "foo bar",
- "foo]"
- }
- )
+ @Parameters({
+ "foo bar",
+ "foo]"
+ })
public void testSpecFromInvalidBroadcastDatasourcesInContext(final Object
lookupsToLoad)
{
- final DruidException exception = Assert.assertThrows(DruidException.class,
() ->
- BroadcastDatasourceLoadingSpec.createFromContext(
- ImmutableMap.of(
-
BroadcastDatasourceLoadingSpec.CTX_BROADCAST_DATASOURCES_TO_LOAD, lookupsToLoad,
-
BroadcastDatasourceLoadingSpec.CTX_BROADCAST_DATASOURCE_LOADING_MODE,
BroadcastDatasourceLoadingSpec.Mode.ONLY_REQUIRED),
- BroadcastDatasourceLoadingSpec.ALL)
+ final DruidException exception = Assert.assertThrows(
+ DruidException.class,
+ () ->
+ BroadcastDatasourceLoadingSpec.createFromContext(
+ ImmutableMap.of(
+
BroadcastDatasourceLoadingSpec.CTX_BROADCAST_DATASOURCES_TO_LOAD,
+ lookupsToLoad,
+
BroadcastDatasourceLoadingSpec.CTX_BROADCAST_DATASOURCE_LOADING_MODE,
+ BroadcastDatasourceLoadingSpec.Mode.ONLY_REQUIRED
+ ),
+ BroadcastDatasourceLoadingSpec.ALL
+ )
+ );
+ Assert.assertEquals(
+ StringUtils.format(
+ "Invalid value of %s[%s]. Please provide a comma-separated list of
"
+ + "broadcast datasource names. For example: [\"datasourceName1\",
\"datasourceName2\"]",
+ BroadcastDatasourceLoadingSpec.CTX_BROADCAST_DATASOURCES_TO_LOAD,
lookupsToLoad
+ ),
+ exception.getMessage()
);
- Assert.assertEquals(StringUtils.format("Invalid value of %s[%s]. Please
provide a comma-separated list of "
- + "broadcast datasource names. For
example: [\"datasourceName1\", \"datasourceName2\"]",
-
BroadcastDatasourceLoadingSpec.CTX_BROADCAST_DATASOURCES_TO_LOAD,
lookupsToLoad), exception.getMessage());
}
}
diff --git
a/server/src/test/java/org/apache/druid/server/coordinator/duty/CompactSegmentsTest.java
b/server/src/test/java/org/apache/druid/server/coordinator/duty/CompactSegmentsTest.java
index 24da185296c..b7f01cf57d2 100644
---
a/server/src/test/java/org/apache/druid/server/coordinator/duty/CompactSegmentsTest.java
+++
b/server/src/test/java/org/apache/druid/server/coordinator/duty/CompactSegmentsTest.java
@@ -865,8 +865,8 @@ public class CompactSegmentsTest
.withTuningConfig(getTuningConfig(3))
.withEngine(engine)
.withGranularitySpec(
- new
UserCompactionTaskGranularityConfig(Granularities.YEAR, null, null)
- )
+ new
UserCompactionTaskGranularityConfig(Granularities.YEAR, null, null)
+ )
.build()
);
doCompactSegments(compactSegments, compactionConfigs);
@@ -901,10 +901,10 @@ public class CompactSegmentsTest
.withSkipOffsetFromLatest(new
Period("PT0H")) // smaller than segment interval
.withTuningConfig(getTuningConfig(3))
.withDimensionsSpec(
- new
UserCompactionTaskDimensionsConfig(
-
DimensionsSpec.getDefaultSchemas(ImmutableList.of("bar", "foo"))
- )
- )
+ new
UserCompactionTaskDimensionsConfig(
+
DimensionsSpec.getDefaultSchemas(ImmutableList.of("bar", "foo"))
+ )
+ )
.withEngine(engine)
.build()
);
@@ -968,10 +968,10 @@ public class CompactSegmentsTest
.withSkipOffsetFromLatest(new
Period("PT0H")) // smaller than segment interval
.withTuningConfig(getTuningConfig(3))
.withDimensionsSpec(
- new
UserCompactionTaskDimensionsConfig(
-
DimensionsSpec.getDefaultSchemas(ImmutableList.of("bar", "foo"))
- )
- )
+ new
UserCompactionTaskDimensionsConfig(
+
DimensionsSpec.getDefaultSchemas(ImmutableList.of("bar", "foo"))
+ )
+ )
.withProjections(projections)
.withEngine(engine)
.build()
@@ -1056,8 +1056,12 @@ public class CompactSegmentsTest
.withSkipOffsetFromLatest(new
Period("PT0H")) // smaller than segment interval
.withTuningConfig(getTuningConfig(3))
.withGranularitySpec(
- new
UserCompactionTaskGranularityConfig(Granularities.YEAR, null, true)
- )
+ new
UserCompactionTaskGranularityConfig(
+ Granularities.YEAR,
+ null,
+ true
+ )
+ )
.withEngine(engine)
.build()
);
@@ -1146,8 +1150,12 @@ public class CompactSegmentsTest
.withSkipOffsetFromLatest(new
Period("PT0H")) // smaller than segment interval
.withTuningConfig(getTuningConfig(3))
.withGranularitySpec(
- new
UserCompactionTaskGranularityConfig(Granularities.YEAR, null, null)
- )
+ new
UserCompactionTaskGranularityConfig(
+ Granularities.YEAR,
+ null,
+ null
+ )
+ )
.withEngine(engine)
.build()
);
@@ -1288,11 +1296,11 @@ public class CompactSegmentsTest
.withSkipOffsetFromLatest(new
Period("PT0H")) // smaller than segment interval
.withTuningConfig(getTuningConfig(3))
.withTransformSpec(
- new CompactionTransformSpec(
- new SelectorDimFilter("dim1",
"foo", null),
- null
- )
- )
+ new CompactionTransformSpec(
+ new
SelectorDimFilter("dim1", "foo", null),
+ null
+ )
+ )
.withEngine(engine)
.build()
);
@@ -1458,8 +1466,12 @@ public class CompactSegmentsTest
.withSkipOffsetFromLatest(new
Period("PT0H")) // smaller than segment interval
.withTuningConfig(getTuningConfig(3))
.withGranularitySpec(
- new
UserCompactionTaskGranularityConfig(Granularities.YEAR, null, null)
- )
+ new
UserCompactionTaskGranularityConfig(
+ Granularities.YEAR,
+ null,
+ null
+ )
+ )
.withEngine(engine)
.build()
);
diff --git
a/server/src/test/java/org/apache/druid/server/coordinator/duty/KillCompactionConfigTest.java
b/server/src/test/java/org/apache/druid/server/coordinator/duty/KillCompactionConfigTest.java
index 5e840d98fb6..f0380914d34 100644
---
a/server/src/test/java/org/apache/druid/server/coordinator/duty/KillCompactionConfigTest.java
+++
b/server/src/test/java/org/apache/druid/server/coordinator/duty/KillCompactionConfigTest.java
@@ -154,8 +154,12 @@ public class KillCompactionConfigTest
.withInputSegmentSizeBytes(500L)
.withSkipOffsetFromLatest(new
Period(3600))
.withGranularitySpec(
- new
UserCompactionTaskGranularityConfig(Granularities.HOUR, null, null)
- )
+ new
UserCompactionTaskGranularityConfig(
+ Granularities.HOUR,
+ null,
+ null
+ )
+ )
.withTaskContext(ImmutableMap.of("key", "val"))
.build();
@@ -165,8 +169,12 @@ public class KillCompactionConfigTest
.withInputSegmentSizeBytes(500L)
.withSkipOffsetFromLatest(new
Period(3600))
.withGranularitySpec(
- new
UserCompactionTaskGranularityConfig(Granularities.HOUR, null, null)
- )
+ new
UserCompactionTaskGranularityConfig(
+ Granularities.HOUR,
+ null,
+ null
+ )
+ )
.withTaskContext(ImmutableMap.of("key", "val"))
.build();
DruidCompactionConfig originalCurrentConfig =
DruidCompactionConfig.empty().withDatasourceConfigs(
@@ -245,8 +253,12 @@ public class KillCompactionConfigTest
.withInputSegmentSizeBytes(500L)
.withSkipOffsetFromLatest(new
Period(3600))
.withGranularitySpec(
- new
UserCompactionTaskGranularityConfig(Granularities.HOUR, null, null)
- )
+ new
UserCompactionTaskGranularityConfig(
+ Granularities.HOUR,
+ null,
+ null
+ )
+ )
.withTaskContext(ImmutableMap.of("key", "val"))
.build();
diff --git
a/server/src/test/java/org/apache/druid/server/lookup/cache/LookupCoordinatorManagerTest.java
b/server/src/test/java/org/apache/druid/server/lookup/cache/LookupCoordinatorManagerTest.java
index 735d19bd95f..3791969f01a 100644
---
a/server/src/test/java/org/apache/druid/server/lookup/cache/LookupCoordinatorManagerTest.java
+++
b/server/src/test/java/org/apache/druid/server/lookup/cache/LookupCoordinatorManagerTest.java
@@ -1311,12 +1311,13 @@ public class LookupCoordinatorManagerTest
{
EasyMock.reset(configManager);
- EasyMock.expect(configManager.watch(
-
EasyMock.eq(LookupCoordinatorManager.LOOKUP_CONFIG_KEY),
- EasyMock.<TypeReference>anyObject(),
- EasyMock.<AtomicReference>isNull()
- )).andReturn(
- new AtomicReference<>(Collections.emptyMap())).anyTimes();
+ EasyMock.expect(
+ configManager.watch(
+ EasyMock.eq(LookupCoordinatorManager.LOOKUP_CONFIG_KEY),
+ EasyMock.<TypeReference>anyObject(),
+ EasyMock.<AtomicReference>isNull()
+ )
+ ).andReturn(new AtomicReference<>(Collections.emptyMap())).anyTimes();
EasyMock.replay(configManager);
@@ -1414,7 +1415,8 @@ public class LookupCoordinatorManagerTest
HostAndPort.fromParts("h1", 8080),
HostAndPort.fromParts("h2", 8080)
),
- ImmutableSet.copyOf(manager.discoverNodesInTier("tier")));
+ ImmutableSet.copyOf(manager.discoverNodesInTier("tier"))
+ );
EasyMock.verify(lookupNodeDiscovery);
}
@@ -1424,12 +1426,12 @@ public class LookupCoordinatorManagerTest
{
EasyMock.reset(configManager);
- EasyMock.expect(configManager.watch(
-
EasyMock.eq(LookupCoordinatorManager.LOOKUP_CONFIG_KEY),
- EasyMock.<TypeReference>anyObject(),
- EasyMock.<AtomicReference>isNull()
- )).andReturn(
- new AtomicReference<Map<String, Map<String, Map<String,
Object>>>>(null)).once();
+ EasyMock.expect(
+ configManager.watch(
+ EasyMock.eq(LookupCoordinatorManager.LOOKUP_CONFIG_KEY),
+ EasyMock.<TypeReference>anyObject(),
+ EasyMock.<AtomicReference>isNull()
+ )).andReturn(new AtomicReference<Map<String, Map<String, Map<String,
Object>>>>(null)).once();
EasyMock.expect(
configManager.watch(
diff --git
a/server/src/test/java/org/apache/druid/server/lookup/cache/LookupLoadingSpecTest.java
b/server/src/test/java/org/apache/druid/server/lookup/cache/LookupLoadingSpecTest.java
index d36aff6914c..edd2f7e0268 100644
---
a/server/src/test/java/org/apache/druid/server/lookup/cache/LookupLoadingSpecTest.java
+++
b/server/src/test/java/org/apache/druid/server/lookup/cache/LookupLoadingSpecTest.java
@@ -145,16 +145,14 @@ public class LookupLoadingSpecTest
}
@Test
- @Parameters(
- {
- "NONE1",
- "A",
- "Random mode",
- "all",
- "only required",
- "none"
- }
- )
+ @Parameters({
+ "NONE1",
+ "A",
+ "Random mode",
+ "all",
+ "only required",
+ "none"
+ })
public void testCreateLookupLoadingSpecFromInvalidModeInContext(String mode)
{
final DruidException exception = Assert.assertThrows(DruidException.class,
() -> LookupLoadingSpec.createFromContext(
@@ -164,12 +162,10 @@ public class LookupLoadingSpecTest
}
@Test
- @Parameters(
- {
- "foo bar",
- "foo]"
- }
- )
+ @Parameters({
+ "foo bar",
+ "foo]"
+ })
public void testCreateLookupLoadingSpecFromInvalidLookupsInContext(Object
lookupsToLoad)
{
final DruidException exception = Assert.assertThrows(DruidException.class,
() ->
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]