This is an automated email from the ASF dual-hosted git repository.
FrankChen021 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 490cbf0035e minor: Use /** not /// style comments. (#20849)
490cbf0035e is described below
commit 490cbf0035e0c988c141ef146566706854811097
Author: Gian Merlino <[email protected]>
AuthorDate: Fri Nov 6 19:09:24 2026 -0800
minor: Use /** not /// style comments. (#20849)
* minor: Use /** not /// style comments.
* Couple additional updates.
---
codestyle/checkstyle.xml | 7 +++
.../indexing/kafka/supervisor/KafkaSupervisor.java | 8 ++--
.../druid/indexing/overlord/OverlordMode.java | 50 ++++++++++++---------
.../query/context/QueryContextParameters.java | 52 ++++++++++++----------
.../sql/calcite/planner/DruidRexExecutor.java | 28 ++++++------
5 files changed, 83 insertions(+), 62 deletions(-)
diff --git a/codestyle/checkstyle.xml b/codestyle/checkstyle.xml
index b9aff24a535..a285918d4ba 100644
--- a/codestyle/checkstyle.xml
+++ b/codestyle/checkstyle.xml
@@ -43,6 +43,13 @@
<property name="message" value="Prohibit @author tags in Javadoc"/>
<property name="fileExtensions" value="java"/>
</module>
+ <module name="RegexpSingleline">
+ <property name="format" value="^\s*///"/>
+ <property name="minimum" value="0"/>
+ <property name="maximum" value="0"/>
+ <property name="message" value="Use /** */ Javadoc comments, not ///
Markdown documentation comments"/>
+ <property name="fileExtensions" value="java"/>
+ </module>
<module name="TreeWalker">
<module name="SuppressionCommentFilter">
diff --git
a/extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/indexing/kafka/supervisor/KafkaSupervisor.java
b/extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/indexing/kafka/supervisor/KafkaSupervisor.java
index ef9b87573a5..4a6ef75cd4d 100644
---
a/extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/indexing/kafka/supervisor/KafkaSupervisor.java
+++
b/extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/indexing/kafka/supervisor/KafkaSupervisor.java
@@ -99,9 +99,11 @@ public class KafkaSupervisor extends
SeekableStreamSupervisor<KafkaTopicPartitio
private final Pattern pattern;
- /// Position of each selected partition ID in the sorted `partitionIds`,
e.g. `[0, 3, 6]` gives `{0=0, 3=1, 6=2}`.
- /// Used to spread selected partitions evenly across task groups (`rank %
taskCount`), where
- /// `partition % taskCount` could put them all in one group. Empty when no
selection is configured.
+ /**
+ * Position of each selected partition ID in the sorted {@code
partitionIds}, e.g. {@code [0, 3, 6]} gives
+ * {@code {0=0, 3=1, 6=2}}. Used to spread selected partitions evenly across
task groups ({@code rank % taskCount}),
+ * where {@code partition % taskCount} could put them all in one group.
Empty when no selection is configured.
+ */
private final Map<Integer, Integer> selectedPartitionRanks;
private volatile Map<KafkaTopicPartition, Long> partitionToTimeLag;
diff --git
a/indexing-service/src/main/java/org/apache/druid/indexing/overlord/OverlordMode.java
b/indexing-service/src/main/java/org/apache/druid/indexing/overlord/OverlordMode.java
index 2c78b292733..addff791de8 100644
---
a/indexing-service/src/main/java/org/apache/druid/indexing/overlord/OverlordMode.java
+++
b/indexing-service/src/main/java/org/apache/druid/indexing/overlord/OverlordMode.java
@@ -19,30 +19,38 @@
package org.apache.druid.indexing.overlord;
-/// Deployment mode of the Overlord in the current process.
-///
-/// The mode is bound by `CliOverlord#getModules(boolean)`, which already
knows how
-/// the process was started: as the `overlord` service, or with the Overlord
modules
-/// loaded into a Coordinator by `CliCoordinator`.
-///
-/// Overlord code must use this binding rather than
`druid.coordinator.asOverlord.enabled`
-/// to find out how it is deployed. That property is meant for the Coordinator
only, and a
-/// standalone Overlord may still see it set to `true`, for example when it
shares a
-/// `runtime.properties` file with the Coordinator.
-///
-/// Components that the Overlord shares with the Coordinator in the same
process use the mode
-/// to decide who owns their lifecycle:
-///
-/// - [DruidOverlord] starts and stops the segment metadata cache only when
[#STANDALONE].
-/// - `OverlordCompactionScheduler` polls segments itself only when
[#STANDALONE].
+/**
+ * Deployment mode of the Overlord in the current process.
+ *
+ * <p>The mode is bound by {@code CliOverlord#getModules(boolean)}, which
already knows how
+ * the process was started: as the {@code overlord} service, or with the
Overlord modules
+ * loaded into a Coordinator by {@code CliCoordinator}.
+ *
+ * <p>Overlord code must use this binding rather than {@code
druid.coordinator.asOverlord.enabled}
+ * to find out how it is deployed. That property is meant for the Coordinator
only, and a
+ * standalone Overlord may still see it set to {@code true}, for example when
it shares a
+ * {@code runtime.properties} file with the Coordinator.
+ *
+ * <p>Components that the Overlord shares with the Coordinator in the same
process use the mode
+ * to decide who owns their lifecycle:
+ *
+ * <ul>
+ * <li>{@link DruidOverlord} starts and stops the segment metadata cache
only when {@link #STANDALONE}.</li>
+ * <li>{@code OverlordCompactionScheduler} polls segments itself only when
{@link #STANDALONE}.</li>
+ * </ul>
+ */
public enum OverlordMode
{
- /// The Overlord runs as its own service, started by `CliOverlord`. It owns
the lifecycle
- /// of every component it uses.
+ /**
+ * The Overlord runs as its own service, started by {@code CliOverlord}. It
owns the lifecycle
+ * of every component it uses.
+ */
STANDALONE,
- /// The Overlord runs inside a Coordinator process
(`druid.coordinator.asOverlord.enabled=true`
- /// on the Coordinator). Components shared with the Coordinator, such as the
segment metadata cache
- /// and segment polling, are started and stopped by the Coordinator.
+ /**
+ * The Overlord runs inside a Coordinator process ({@code
druid.coordinator.asOverlord.enabled=true}
+ * on the Coordinator). Components shared with the Coordinator, such as the
segment metadata cache
+ * and segment polling, are started and stopped by the Coordinator.
+ */
EMBEDDED_IN_COORDINATOR
}
diff --git
a/processing/src/main/java/org/apache/druid/query/context/QueryContextParameters.java
b/processing/src/main/java/org/apache/druid/query/context/QueryContextParameters.java
index 2f82c66933f..0254713e079 100644
---
a/processing/src/main/java/org/apache/druid/query/context/QueryContextParameters.java
+++
b/processing/src/main/java/org/apache/druid/query/context/QueryContextParameters.java
@@ -54,30 +54,34 @@ import java.util.concurrent.TimeUnit;
import java.util.function.Function;
import java.util.function.Supplier;
-/// Central catalog of query context parameter descriptors.
-///
-/// Define user-facing metadata here, including descriptions, default values,
constraints,
-/// applicability, and introduction versions. The
-/// {@link
org.apache.druid.query.context.docs.ParameterDocumentationGenerator} generates
a table row
-/// for every public parameter wherever a managed document has a marker for it.
-///
-/// Descriptors are grouped into the sections below, each wrapped in `//
region` and `// endregion` comments.
-/// IDEs can fold the sections and list them for navigation, such as
IntelliJ's Navigate > Custom Folding.
-///
-/// - General query parameters
-/// - SQL planner parameters
-/// - GroupBy query parameters
-/// - Scan, search and timeseries query parameters
-/// - MSQ and Dart parameters
-/// - Other query context parameters
-///
-/// When adding or changing a descriptor, including introducing a new
parameter, run this command
-/// from the repository root to regenerate the checked-in documentation. The
default Maven mode
-/// verifies that the generated documentation is up to date.
-///
-/// ```shell
-/// mvn -ntp -pl processing -am -Pskip-static-checks -Dweb.console.skip=true
-DskipTests -Dquery.context.docs.mode=generate -T1C process-classes
-/// ```
+/**
+ * Central catalog of query context parameter descriptors.
+ *
+ * <p>Define user-facing metadata here, including descriptions, default
values, constraints,
+ * applicability, and introduction versions. The
+ * {@link org.apache.druid.query.context.docs.ParameterDocumentationGenerator}
generates a table row
+ * for every public parameter wherever a managed document has a marker for it.
+ *
+ * <p>Descriptors are grouped into the sections below, each wrapped in {@code
// region} and {@code // endregion} comments.
+ * IDEs can fold the sections and list them for navigation, such as IntelliJ's
Navigate > Custom Folding.
+ *
+ * <ul>
+ * <li>General query parameters</li>
+ * <li>SQL planner parameters</li>
+ * <li>GroupBy query parameters</li>
+ * <li>Scan, search and timeseries query parameters</li>
+ * <li>MSQ and Dart parameters</li>
+ * <li>Other query context parameters</li>
+ * </ul>
+ *
+ * <p>When adding or changing a descriptor, including introducing a new
parameter, run this command
+ * from the repository root to regenerate the checked-in documentation. The
default Maven mode
+ * verifies that the generated documentation is up to date.
+ *
+ * <pre>{@code
+ * mvn -ntp -pl processing -am -Pskip-static-checks -Dweb.console.skip=true
-DskipTests -Dquery.context.docs.mode=generate -T1C process-classes
+ * }</pre>
+ */
public final class QueryContextParameters
{
// region General query parameters
diff --git
a/sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidRexExecutor.java
b/sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidRexExecutor.java
index e79f4ccd142..a8efed5a88d 100644
---
a/sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidRexExecutor.java
+++
b/sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidRexExecutor.java
@@ -251,9 +251,9 @@ public class DruidRexExecutor implements RexExecutor
}
}
- ///
- /// Whether the leaf element type of an array type, looking through any
nested arrays, is a complex type.
- ///
+ /**
+ * Whether the leaf element type of an array type, looking through any
nested arrays, is a complex type.
+ */
private static boolean isArrayOfComplex(final RelDataType arrayType)
{
RelDataType elementType = arrayType.getComponentType();
@@ -274,17 +274,17 @@ public class DruidRexExecutor implements RexExecutor
return constExp.toString();
}
- ///
- /// Reduces literal string and integer arrays without formatting, parsing,
or evaluating a Druid expression.
- ///
- /// Reuses the original array call when every literal's type matches the
array component type, ignoring nullability.
- /// These literals already have the required types and values, so rebuilding
them would only add allocations.
- /// Nullability differences do not require conversion: a non-null literal
may belong to an array with nullable elements,
- /// and reusing the call preserves both null values and the original array
type.
- ///
- /// Returns null for mismatched element types, unsupported types, or
non-literal operands (including CAST calls).
- /// These retain the existing Druid expression evaluation path, including
any required type normalization.
- ///
+ /**
+ * Reduces literal string and integer arrays without formatting, parsing, or
evaluating a Druid expression.
+ *
+ * <p>Reuses the original array call when every literal's type matches the
array component type, ignoring nullability.
+ * These literals already have the required types and values, so rebuilding
them would only add allocations.
+ * Nullability differences do not require conversion: a non-null literal may
belong to an array with nullable elements,
+ * and reusing the call preserves both null values and the original array
type.
+ *
+ * <p>Returns null for mismatched element types, unsupported types, or
non-literal operands (including CAST calls).
+ * These retain the existing Druid expression evaluation path, including any
required type normalization.
+ */
@Nullable
@VisibleForTesting
static RexNode tryReduceLiteralArray(final RexBuilder rexBuilder, final
RexNode expression)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]