adoroszlai commented on code in PR #7968:
URL: https://github.com/apache/ozone/pull/7968#discussion_r2049126271
##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/ScmTestMock.java:
##########
@@ -57,6 +57,15 @@ public class ScmTestMock implements
StorageContainerDatanodeProtocol {
private String clusterId;
private String scmId;
+ // Map of datanode to containers
+ private Map<DatanodeDetails,
+ Map<String, ContainerReplicaProto>> nodeContainers =
+ new HashMap<>();
Review Comment:
nit: formatting
```suggestion
private Map<DatanodeDetails, Map<String, ContainerReplicaProto>>
nodeContainers =
new HashMap<>();
```
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeConfiguration.java:
##########
@@ -627,10 +585,50 @@ public void setWaitOnAllFollowers(boolean val) {
)
private long deleteContainerTimeoutMs = Duration.ofSeconds(60).toMillis();
+ public Duration getBlockDeletionInterval() {
+ return blockDeletionInterval;
+ }
+
+ public void setRecoveringContainerScrubInterval(Duration duration) {
+ recoveringContainerScrubInterval = duration;
+ }
+
+ public Duration getRecoveringContainerScrubInterval() {
+ return recoveringContainerScrubInterval;
+ }
+
+ public void setBlockDeletionInterval(Duration duration) {
+ blockDeletionInterval = duration;
+ }
+
+ public int getBlockDeletionLimit() {
+ return blockLimitPerInterval;
+ }
+
public long getDeleteContainerTimeoutMs() {
return deleteContainerTimeoutMs;
}
+ public Duration getBlockDeletingMaxLockHoldingTime() {
+ return Duration.ofMillis(blockDeletingMaxLockHoldingTime);
+ }
+
+ public void setBlockDeletingMaxLockHoldingTime(Duration maxLockHoldingTime) {
+ blockDeletingMaxLockHoldingTime = maxLockHoldingTime.toMillis();
+ }
+
+ public boolean waitOnAllFollowers() {
+ return waitOnAllFollowers;
+ }
+
+ public void setWaitOnAllFollowers(boolean val) {
+ this.waitOnAllFollowers = val;
+ }
+
+ public void setBlockDeletionLimit(int limit) {
+ this.blockLimitPerInterval = limit;
+ }
Review Comment:
Since we are already moving these, how about putting `get/set` pairs next to
each other, in consistent order?
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainerMetadataInspector.java:
##########
@@ -74,10 +74,13 @@
* log4j.appender.inspectorAppender.layout=org.apache.log4j.PatternLayout
*/
public class KeyValueContainerMetadataInspector implements ContainerInspector {
- private static final Logger LOG =
- LoggerFactory.getLogger(KeyValueContainerMetadataInspector.class);
- public static final Logger REPORT_LOG = LoggerFactory.getLogger(
- "ContainerMetadataInspectorReport");
+ private static final Logger LOG =
LoggerFactory.getLogger(KeyValueContainerMetadataInspector.class);
+ public static final Logger REPORT_LOG =
LoggerFactory.getLogger("ContainerMetadataInspectorReport");
+
+ public static final String SYSTEM_PROPERTY = "ozone.datanode.container" +
+ ".metadata.inspector";
Review Comment:
I think this can be one line, which will also make grep for the property
name turn up this class.
--
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]