You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-commits@hadoop.apache.org by el...@apache.org on 2019/10/13 06:53:12 UTC

[hadoop-ozone] branch HDDS-2194 created (now 10416fc)

This is an automated email from the ASF dual-hosted git repository.

elek pushed a change to branch HDDS-2194
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git.


      at 10416fc  Update hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainer.java

This branch includes the following new commits:

     new 2cbd84a  HDDS-2194. Replication of Container fails with Only closed containers could be exported.
     new 10416fc  Update hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainer.java

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



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


[hadoop-ozone] 01/02: HDDS-2194. Replication of Container fails with Only closed containers could be exported.

Posted by el...@apache.org.
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 <bh...@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-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-commits-help@hadoop.apache.org


[hadoop-ozone] 02/02: Update hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainer.java

Posted by el...@apache.org.
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 10416fccb36b76f47311c28b35f3b25025a17c75
Author: Bharat Viswanadham <bh...@apache.org>
AuthorDate: Thu Oct 10 11:24:22 2019 -0700

    Update hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainer.java
    
    Co-Authored-By: Doroszlai, Attila <64...@users.noreply.github.com>
---
 .../org/apache/hadoop/ozone/container/keyvalue/KeyValueContainer.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 b961548..07f759b 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
@@ -529,7 +529,7 @@ public class KeyValueContainer implements Container<KeyValueContainerData> {
       throw new IllegalStateException(
           "Only closed/quasi closed containers could be exported: " +
               "Where as ContainerId="
-              + getContainerData().getContainerID() + "is in state" + state);
+              + getContainerData().getContainerID() + " is in state " + state);
     }
     compactDB();
     packer.pack(this, destination);


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