bharatviswa504 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_r333669625
########## 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: It is a good suggestion, but we cannot apply in code because the state for a replica is ContainerReplicaProto.State, whereas in DN it is ContainerProtos.ContainerDataProto.State. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org