szetszwo commented on code in PR #8305:
URL: https://github.com/apache/ozone/pull/8305#discussion_r2138754336
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/ContainerData.java:
##########
@@ -675,4 +548,151 @@ public String toString() {
+ ", ri=" + replicaIndex
+ ", origin=[dn_" + originNodeId + ", pipeline_" + originPipelineId +
"])";
}
+
+ /**
+ * Block byte used, block count and pending deletion count.
+ * This class is immutable.
+ */
+ public static class BlockByteAndCounts {
+ private final long bytes;
+ private final long count;
+ private final long pendingDeletion;
+
+ public BlockByteAndCounts(long bytes, long count, long pendingDeletion) {
+ this.bytes = bytes;
+ this.count = count;
+ this.pendingDeletion = pendingDeletion;
+ }
+
+ public long getBytes() {
+ return bytes;
+ }
+
+ public long getCount() {
+ return count;
+ }
+
+ public long getPendingDeletion() {
+ return pendingDeletion;
+ }
+ }
+
+ /**
+ * Read/write/block statistics of a container.
+ * This class is thread-safe -- all methods are synchronized.
+ */
+ public static class Statistics {
+ private long readBytes;
Review Comment:
@swamirishi , thanks for review this.
These are just a few `long` values. Using separated locks
- make the code complicated,
- make it easier to have bugs,
- and may not have significant improvement.
--
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]