hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hanishakon...@apache.org
Subject hadoop git commit: HDDS-327. CloseContainer command handler should not throw exception if the container is already closed. Contributed by Shashikant Banerjee.
Date Fri, 10 Aug 2018 18:43:57 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 398d89554 -> a28624d2a


HDDS-327. CloseContainer command handler should not throw exception if the container is already
closed. Contributed by Shashikant Banerjee.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/a28624d2
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/a28624d2
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/a28624d2

Branch: refs/heads/trunk
Commit: a28624d2a42bf6ad35f859b6ba92fd541d72a67d
Parents: 398d895
Author: Hanisha Koneru <hanishakoneru@apache.org>
Authored: Fri Aug 10 11:43:22 2018 -0700
Committer: Hanisha Koneru <hanishakoneru@apache.org>
Committed: Fri Aug 10 11:43:22 2018 -0700

----------------------------------------------------------------------
 .../apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/a28624d2/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java
----------------------------------------------------------------------
diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java
index 8364a77..9ddb474 100644
--- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java
+++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java
@@ -387,8 +387,8 @@ public class KeyValueHandler extends Handler {
 
     try {
       if (containerState == ContainerLifeCycleState.CLOSED) {
-        throw new StorageContainerException("Container already closed. " +
-            "ContainerID: " + containerID, CLOSED_CONTAINER_RETRY);
+        LOG.debug("Container {} is already closed.", containerID);
+        return ContainerUtils.getSuccessResponse(request);
       } else if (containerState == ContainerLifeCycleState.INVALID) {
         LOG.debug("Invalid container data. ContainerID: {}", containerID);
         throw new StorageContainerException("Invalid container data. " +


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


Mime
View raw message