hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [hadoop] adoroszlai commented on a change in pull request #1632: HDDS-2194. Replication of Container fails with Only closed containers…
Date Thu, 10 Oct 2019 08:08:39 GMT
adoroszlai commented on a change in pull request #1632: HDDS-2194. Replication of Container
fails with Only closed containers…
URL: https://github.com/apache/hadoop/pull/1632#discussion_r333381636
 
 

 ##########
 File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainer.java
 ##########
 @@ -520,11 +520,16 @@ public void importContainerData(InputStream input,
   @Override
   public void exportContainerData(OutputStream destination,
       ContainerPacker<KeyValueContainerData> packer) throws IOException {
-    if (getContainerData().getState() !=
-        ContainerProtos.ContainerDataProto.State.CLOSED) {
+    // Closed/ Quasi closed containers are considered for replication by
+    // replication manager if they are under-replicated.
+    ContainerProtos.ContainerDataProto.State state =
+        getContainerData().getState();
+    if (!(state == ContainerProtos.ContainerDataProto.State.CLOSED ||
+        state == ContainerDataProto.State.QUASI_CLOSED)) {
 
 Review comment:
   Would it be worth adding a method something along the lines of `shouldReplicate(State)`
and use it in both places (`ReplicationManager` and here)?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message