Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
bcb38f8
Add forward index compression ratio and per-column compression stats …
jsol-splunk Apr 11, 2026
63910fb
Add comprehensive tests and fix redundant loop for compression stats …
jsol-splunk Apr 11, 2026
5b069e0
Restructure compression stats API: nested DTOs, feature flag gating, …
jsol-splunk Apr 11, 2026
886072f
Add writer tracking gating, per-column compression stats in metadata …
jsol-splunk Apr 11, 2026
5aee8a6
Restructure columnCompressionStats to standard array DTO and gate on …
jsol-splunk Apr 11, 2026
ea073d1
Fix default codec persistence, dictionary column stats, stale metrics…
jsol-splunk Apr 11, 2026
43f32ee
Fix compression stats API structure, field names, and dict-only suppr…
jsol-splunk Apr 11, 2026
5cf6f14
Add compressionStats and storageBreakdown as proper DTO fields on met…
jsol-splunk Apr 11, 2026
65ab3ff
Fix metadata endpoint DTO immutability, coverage fields, and writer t…
jsol-splunk Apr 11, 2026
fe2553a
Exclude old segments without stats from compression ratio denominator
jsol-splunk Apr 11, 2026
b1b73c3
Fix writer uncompressed size tracking and harden compression stats API
jsol-splunk Apr 11, 2026
0a4caf1
Fix negative ratio, tier gauge leak, and CLP codec persistence
jsol-splunk Apr 11, 2026
6e0b955
Consolidate CLP codec compression resolution into ForwardIndexType
jsol-splunk Apr 11, 2026
2492d9e
Preserve tier info when compression stats flag is off, skip stale col…
jsol-splunk Apr 12, 2026
52e6a21
Fix replica normalization for dict column sentinels and empty summaries
jsol-splunk Apr 12, 2026
1cf4938
Fix tier gauge leader check and exclude old raw segments from server …
jsol-splunk Apr 12, 2026
176b273
Fix post-rebase import ordering, constant rename, and deprecated API
jsol-splunk May 12, 2026
951f225
Add missing test coverage for ColumnMetadataImpl and CompressionStats…
jsol-splunk May 12, 2026
6b4b04b
Expand test coverage for compression stats across all affected modules
jsol-splunk May 12, 2026
4005086
Polish TableSizeResourceTest: remove redundant queryParam and align a…
jsol-splunk May 12, 2026
64ab965
Add ServerSegmentMetadataReader coverage: CompressionStatsSummary/Sto…
jsol-splunk May 12, 2026
3bcf1eb
Fix missing @Nullable import in ColumnMetadata after rebase onto #18470
jsol-splunk May 12, 2026
6e8e183
Add CLPForwardIndexCreatorV2 getUncompressedSize and setTrackUncompre…
jsol-splunk May 12, 2026
4ecf85e
Retrigger CI
jsol-splunk May 13, 2026
f8a6ffe
Fix hasDictionary=true wrongly reported for raw (no-dict) columns in …
jsol-splunk May 19, 2026
9c560a0
Revert unrelated ZkStarter timing changes from hasDictionary fix commit
jsol-splunk May 19, 2026
3c47569
Fix isHasDictionary asymmetric JSON serialization and resolveCompress…
jsol-splunk May 19, 2026
e6c5dba
Add default impl for isCompressionStatsEnabled in IndexCreationContex…
jsol-splunk May 19, 2026
0741c48
Fix tier gauge using wrong metric API — use setOrUpdateTableGauge/rem…
jsol-splunk May 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,18 @@ public enum ControllerGauge implements AbstractMetrics.Gauge {
// Percentage of segments we failed to get size for
TABLE_STORAGE_EST_MISSING_SEGMENT_PERCENT("TableStorageEstMissingSegmentPercent", false),

// Forward index compression ratio scaled by 100 (e.g., 4.5x ratio → 450). Divide by 100 to get actual ratio.
TABLE_COMPRESSION_RATIO_PERCENT("TableCompressionRatioPercent", false),

// Raw (uncompressed) forward index size per replica
TABLE_RAW_FORWARD_INDEX_SIZE_PER_REPLICA("TableRawForwardIndexSizePerReplica", false),

// Compressed forward index size per replica
TABLE_COMPRESSED_FORWARD_INDEX_SIZE_PER_REPLICA("TableCompressedForwardIndexSizePerReplica", false),

// Size per replica broken down by storage tier
TABLE_TIERED_STORAGE_SIZE("TableTieredStorageSize", false),

// Number of scheduled Cron jobs
CRON_SCHEDULER_JOB_SCHEDULED("cronSchedulerJobScheduled", false),

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.pinot.common.restlet.resources;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import javax.annotation.Nullable;


/**
* Per-column forward index compression statistics.
*
* <p>Contains the column name, uncompressed and compressed sizes, compression ratio, codec,
* whether the column has a dictionary, and the list of indexes present on the column.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class ColumnCompressionStatsInfo {
private final String _column;
private final long _uncompressedSizeInBytes;
private final long _compressedSizeInBytes;
private final double _compressionRatio;
private final String _codec;
private final boolean _hasDictionary;
private final List<String> _indexes;

@JsonCreator
public ColumnCompressionStatsInfo(
@JsonProperty("column") String column,
@JsonProperty("uncompressedSizeInBytes") long uncompressedSizeInBytes,
@JsonProperty("compressedSizeInBytes") long compressedSizeInBytes,
@JsonProperty("compressionRatio") double compressionRatio,
@JsonProperty("codec") @Nullable String codec,
@JsonProperty("hasDictionary") boolean hasDictionary,
@JsonProperty("indexes") @Nullable List<String> indexes) {
_column = column;
_uncompressedSizeInBytes = uncompressedSizeInBytes;
_compressedSizeInBytes = compressedSizeInBytes;
_compressionRatio = compressionRatio;
_codec = codec;
_hasDictionary = hasDictionary;
_indexes = indexes;
}

public String getColumn() {
return _column;
}

public long getUncompressedSizeInBytes() {
return _uncompressedSizeInBytes;
}

public long getCompressedSizeInBytes() {
return _compressedSizeInBytes;
}

public double getCompressionRatio() {
return _compressionRatio;
}

@Nullable
public String getCodec() {
return _codec;
}

@JsonProperty("hasDictionary")
public boolean hasDictionary() {
return _hasDictionary;
}

@Nullable
@JsonInclude(JsonInclude.Include.NON_NULL)
public List<String> getIndexes() {
return _indexes;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.pinot.common.restlet.resources;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;


/**
* Table-level compression statistics summary, aggregated from per-column data.
* Contains total raw and compressed forward index sizes, the overall compression ratio,
* and segment coverage information.
*
* <p>JSON schema is identical to {@code TableSizeReader.CompressionStats} on the size endpoint.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class CompressionStatsSummary {
private final long _rawForwardIndexSizePerReplicaInBytes;
private final long _compressedForwardIndexSizePerReplicaInBytes;
private final double _compressionRatio;
private final int _segmentsWithStats;
private final int _totalSegments;
private final boolean _isPartialCoverage;

@JsonCreator
public CompressionStatsSummary(
@JsonProperty("rawForwardIndexSizePerReplicaInBytes") long rawForwardIndexSizePerReplicaInBytes,
@JsonProperty("compressedForwardIndexSizePerReplicaInBytes") long compressedForwardIndexSizePerReplicaInBytes,
@JsonProperty("compressionRatio") double compressionRatio,
@JsonProperty("segmentsWithStats") int segmentsWithStats,
@JsonProperty("totalSegments") int totalSegments,
@JsonProperty("isPartialCoverage") boolean isPartialCoverage) {
_rawForwardIndexSizePerReplicaInBytes = rawForwardIndexSizePerReplicaInBytes;
_compressedForwardIndexSizePerReplicaInBytes = compressedForwardIndexSizePerReplicaInBytes;
_compressionRatio = compressionRatio;
_segmentsWithStats = segmentsWithStats;
_totalSegments = totalSegments;
_isPartialCoverage = isPartialCoverage;
}

public long getRawForwardIndexSizePerReplicaInBytes() {
return _rawForwardIndexSizePerReplicaInBytes;
}

public long getCompressedForwardIndexSizePerReplicaInBytes() {
return _compressedForwardIndexSizePerReplicaInBytes;
}

public double getCompressionRatio() {
return _compressionRatio;
}

public int getSegmentsWithStats() {
return _segmentsWithStats;
}

public int getTotalSegments() {
return _totalSegments;
}

@JsonProperty("isPartialCoverage")
public boolean isPartialCoverage() {
return _isPartialCoverage;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,42 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
import javax.annotation.Nullable;


@JsonIgnoreProperties(ignoreUnknown = true)
public class SegmentSizeInfo {
private final String _segmentName;
private final long _diskSizeInBytes;
private final long _rawForwardIndexSizeBytes;
private final long _compressedForwardIndexSizeBytes;
private final String _tier;
private final Map<String, ColumnCompressionStatsInfo> _columnCompressionStats;

public SegmentSizeInfo(String segmentName, long sizeBytes) {
this(segmentName, sizeBytes, -1, -1, null, null);
}

public SegmentSizeInfo(String segmentName, long sizeBytes, long rawForwardIndexSizeBytes,
long compressedForwardIndexSizeBytes, @Nullable String tier) {
this(segmentName, sizeBytes, rawForwardIndexSizeBytes, compressedForwardIndexSizeBytes, tier, null);
}

@JsonCreator
public SegmentSizeInfo(@JsonProperty("segmentName") String segmentName,
@JsonProperty("diskSizeInBytes") long sizeBytes) {
@JsonProperty("diskSizeInBytes") long sizeBytes,
@JsonProperty("rawForwardIndexSizeBytes") long rawForwardIndexSizeBytes,
@JsonProperty("compressedForwardIndexSizeBytes") long compressedForwardIndexSizeBytes,
@JsonProperty("tier") @Nullable String tier,
@JsonProperty("columnCompressionStats") @Nullable Map<String, ColumnCompressionStatsInfo>
columnCompressionStats) {
_segmentName = segmentName;
_diskSizeInBytes = sizeBytes;
_rawForwardIndexSizeBytes = rawForwardIndexSizeBytes;
_compressedForwardIndexSizeBytes = compressedForwardIndexSizeBytes;
_tier = tier;
_columnCompressionStats = columnCompressionStats;
}

public String getSegmentName() {
Expand All @@ -43,6 +67,24 @@ public long getDiskSizeInBytes() {
return _diskSizeInBytes;
}

public long getRawForwardIndexSizeBytes() {
return _rawForwardIndexSizeBytes;
}

public long getCompressedForwardIndexSizeBytes() {
return _compressedForwardIndexSizeBytes;
}

@Nullable
public String getTier() {
return _tier;
}

@Nullable
public Map<String, ColumnCompressionStatsInfo> getColumnCompressionStats() {
return _columnCompressionStats;
}

@Override
public boolean equals(Object o) {
if (this == o) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.pinot.common.restlet.resources;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;


/**
* Storage breakdown by tier. Contains a map of tier names to their respective
* segment count and per-replica size.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class StorageBreakdownInfo {

private final Map<String, TierInfo> _tiers;

@JsonCreator
public StorageBreakdownInfo(@JsonProperty("tiers") Map<String, TierInfo> tiers) {
_tiers = tiers;
}

public Map<String, TierInfo> getTiers() {
return _tiers;
}

/**
* Segment count and size for a single storage tier.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public static class TierInfo {
private final int _count;
private final long _sizePerReplicaInBytes;

@JsonCreator
public TierInfo(@JsonProperty("count") int count,
@JsonProperty("sizePerReplicaInBytes") long sizePerReplicaInBytes) {
_count = count;
_sizePerReplicaInBytes = sizePerReplicaInBytes;
}

public int getCount() {
return _count;
}

public long getSizePerReplicaInBytes() {
return _sizePerReplicaInBytes;
}
}
}
Loading
Loading