This is an automated email from the ASF dual-hosted git repository. elek pushed a commit to branch HDDS-2194 in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git
commit 2cbd84a9d58c134230735f205d802b0dc2274938 Author: Bharat Viswanadham <bha...@apache.org> AuthorDate: Wed Oct 9 15:16:14 2019 -0700 HDDS-2194. Replication of Container fails with Only closed containers could be exported. --- .../hadoop/ozone/container/keyvalue/KeyValueContainer.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainer.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainer.java index a6e914b..b961548 100644 --- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainer.java +++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainer.java @@ -520,11 +520,16 @@ public class KeyValueContainer implements Container<KeyValueContainerData> { @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)) { throw new IllegalStateException( - "Only closed containers could be exported: ContainerId=" - + getContainerData().getContainerID()); + "Only closed/quasi closed containers could be exported: " + + "Where as ContainerId=" + + getContainerData().getContainerID() + "is in state" + state); } compactDB(); packer.pack(this, destination); --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-commits-h...@hadoop.apache.org