avijayanhwx commented on a change in pull request #2874:
URL: https://github.com/apache/ozone/pull/2874#discussion_r763222852
##########
File path:
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/persistence/ContainerHealthSchemaManager.java
##########
@@ -69,8 +71,14 @@ public ContainerHealthSchemaManager(
SelectQuery<Record> query = dslContext.selectQuery();
query.addFrom(UNHEALTHY_CONTAINERS);
if (state != null) {
- query.addConditions(
- UNHEALTHY_CONTAINERS.CONTAINER_STATE.eq(state.toString()));
+ if (state.equals(ALL_REPLICAS_UNHEALTHY)) {
+ query.addConditions(UNHEALTHY_CONTAINERS.CONTAINER_STATE
+ .eq(UNDER_REPLICATED.toString()));
+ query.addConditions(UNHEALTHY_CONTAINERS.ACTUAL_REPLICA_COUNT.eq(0));
Review comment:
ACTUAL_REPLICA_COUNT can be 0 / 1 / 2. All of them count as
UNDER_REPLICATED.
##########
File path:
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/scm/ContainerReplicaHistory.java
##########
@@ -37,11 +39,22 @@
// Last reported time of the replica
private Long lastSeenTime;
+ public void setBcsId(long bcsId) {
+ this.bcsId = bcsId;
+ }
+
Review comment:
Fixed
--
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]