diff --git a/processing/src/main/java/org/apache/druid/timeline/partition/NoneShardSpec.java b/processing/src/main/java/org/apache/druid/timeline/partition/NoneShardSpec.java
index 4661b3ab73b..e29d843c98b 100644
--- a/processing/src/main/java/org/apache/druid/timeline/partition/NoneShardSpec.java
+++ b/processing/src/main/java/org/apache/druid/timeline/partition/NoneShardSpec.java
@@ -29,6 +29,16 @@ import java.util.List;
import java.util.Map;
/**
+ * {@link ShardSpec} with no partitioning in a time chunk, i.e. a single segment
+ * per time chunk. This shard spec has been deprecated and is not generated by
+ * the Druid code anymore. The class has been retained only for backward
+ * compatibility reasons.
+ *
+ * For more information, refer to
+ * PR #6883.
+ *
+ * @deprecated Since Druid 0.15.0. Segments generated by Druid 0.15.0 onwards
+ * do not use this shard spec.
*/
@Deprecated
public class NoneShardSpec implements ShardSpec
diff --git a/server/src/main/java/org/apache/druid/metadata/SQLMetadataSegmentPublisher.java b/server/src/main/java/org/apache/druid/metadata/SQLMetadataSegmentPublisher.java
index b69f15edb6b..48a92ecba4e 100644
--- a/server/src/main/java/org/apache/druid/metadata/SQLMetadataSegmentPublisher.java
+++ b/server/src/main/java/org/apache/druid/metadata/SQLMetadataSegmentPublisher.java
@@ -20,7 +20,6 @@
package org.apache.druid.metadata;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.common.annotations.VisibleForTesting;
import com.google.inject.Inject;
import org.apache.druid.java.util.common.DateTimes;
import org.apache.druid.java.util.common.StringUtils;
@@ -28,8 +27,6 @@ import org.apache.druid.java.util.common.logger.Logger;
import org.apache.druid.timeline.DataSegment;
import org.apache.druid.timeline.partition.NoneShardSpec;
import org.skife.jdbi.v2.DBI;
-import org.skife.jdbi.v2.Handle;
-import org.skife.jdbi.v2.tweak.HandleCallback;
import java.io.IOException;
import java.util.List;
@@ -79,8 +76,7 @@ public class SQLMetadataSegmentPublisher implements MetadataSegmentPublisher
);
}
- @VisibleForTesting
- void publishSegment(
+ private void publishSegment(
final String segmentId,
final String dataSource,
final String createdDate,
@@ -96,31 +92,18 @@ public class SQLMetadataSegmentPublisher implements MetadataSegmentPublisher
try {
final DBI dbi = connector.getDBI();
List