xiangfu0 commented on code in PR #18185:
URL: https://github.com/apache/pinot/pull/18185#discussion_r3383908154
##########
pinot-common/src/main/java/org/apache/pinot/common/restlet/resources/SegmentSizeInfo.java:
##########
@@ -21,18 +21,44 @@
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;
+ /// Segment-level aggregate raw ingest size across all columns that have
stats. `-1` when unavailable.
+ private final long _rawIngestSizeBytes;
+ /// Segment-level aggregate on-disk size across all columns that have stats.
`-1` when unavailable.
+ private final long _onDiskSizeBytes;
+ 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
rawIngestSizeBytes,
+ long onDiskSizeBytes, @Nullable String tier) {
+ this(segmentName, sizeBytes, rawIngestSizeBytes, onDiskSizeBytes, tier,
null);
+ }
@JsonCreator
public SegmentSizeInfo(@JsonProperty("segmentName") String segmentName,
- @JsonProperty("diskSizeInBytes") long sizeBytes) {
+ @JsonProperty("diskSizeInBytes") long sizeBytes,
+ @JsonProperty("rawIngestSizeBytes") long rawIngestSizeBytes,
+ @JsonProperty("onDiskSizeBytes") long onDiskSizeBytes,
+ @JsonProperty("tier") @Nullable String tier,
+ @JsonProperty("columnCompressionStats") @Nullable Map<String,
ColumnCompressionStatsInfo>
Review Comment:
This per column stats may blow up the response, please make sure the REST
API has an explicit param to ask for this, default should be off.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]