hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject [1/2] hadoop git commit: HDDS-420. putKey failing with KEY_ALLOCATION_ERROR. Contributed by Shashikant Banerjee.
Date Thu, 13 Sep 2018 21:17:06 GMT
Repository: hadoop
Updated Branches:
  refs/heads/ozone-0.2 22c318eee -> d671e6650


HDDS-420. putKey failing with KEY_ALLOCATION_ERROR. Contributed by Shashikant Banerjee.

(cherry picked from commit c6e19db197253b660c8b16854360fe95b1d7c43f)


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

Branch: refs/heads/ozone-0.2
Commit: d671e665009033031717beb7c31e746189a9020b
Parents: 7f53824
Author: Mukul Kumar Singh <msingh@apache.org>
Authored: Thu Sep 13 11:29:31 2018 +0530
Committer: Márton Elek <elek@apache.org>
Committed: Thu Sep 13 23:07:41 2018 +0200

----------------------------------------------------------------------
 .../ozone/container/common/statemachine/StateContext.java    | 2 +-
 .../common/transport/server/ratis/XceiverServerRatis.java    | 3 +++
 .../org/apache/hadoop/hdds/scm/node/StaleNodeHandler.java    | 4 ++++
 .../hdds/scm/pipelines/PipelineActionEventHandler.java       | 2 ++
 .../hadoop/hdds/scm/pipelines/ratis/RatisManagerImpl.java    | 8 ++++----
 5 files changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/d671e665/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/StateContext.java
----------------------------------------------------------------------
diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/StateContext.java
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/StateContext.java
index c2d5421..9d5a778 100644
--- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/StateContext.java
+++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/StateContext.java
@@ -280,7 +280,7 @@ public class StateContext {
             && pipelineActionIter.hasClosePipeline() && pipelineAction
             .hasClosePipeline()
             && pipelineActionIter.getClosePipeline().getPipelineID()
-            == pipelineAction.getClosePipeline().getPipelineID()) {
+            .equals(pipelineAction.getClosePipeline().getPipelineID())) {
           return;
         }
       }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/d671e665/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/XceiverServerRatis.java
----------------------------------------------------------------------
diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/XceiverServerRatis.java
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/XceiverServerRatis.java
index f775396..38d826b 100644
--- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/XceiverServerRatis.java
+++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/XceiverServerRatis.java
@@ -397,6 +397,9 @@ public final class XceiverServerRatis implements XceiverServerSpi {
         .setAction(PipelineAction.Action.CLOSE)
         .build();
     context.addPipelineActionIfAbsent(action);
+    LOG.debug(
+        "pipeline Action " + action.getAction() + "  on pipeline " + pipelineID
+            + ".Reason : " + action.getClosePipeline().getDetailedReason());
   }
 
   void handleNodeSlowness(

http://git-wip-us.apache.org/repos/asf/hadoop/blob/d671e665/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/StaleNodeHandler.java
----------------------------------------------------------------------
diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/StaleNodeHandler.java
b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/StaleNodeHandler.java
index 0bd9339..b435e77 100644
--- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/StaleNodeHandler.java
+++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/StaleNodeHandler.java
@@ -25,6 +25,8 @@ import org.apache.hadoop.hdds.scm.events.SCMEvents;
 import org.apache.hadoop.hdds.scm.node.states.Node2ContainerMap;
 import org.apache.hadoop.hdds.server.events.EventHandler;
 import org.apache.hadoop.hdds.server.events.EventPublisher;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.util.Set;
 
@@ -32,6 +34,7 @@ import java.util.Set;
  * Handles Stale node event.
  */
 public class StaleNodeHandler implements EventHandler<DatanodeDetails> {
+  static final Logger LOG = LoggerFactory.getLogger(StaleNodeHandler.class);
 
   private final Node2ContainerMap node2ContainerMap;
   private final Mapping containerManager;
@@ -48,6 +51,7 @@ public class StaleNodeHandler implements EventHandler<DatanodeDetails>
{
     Set<PipelineID> pipelineIDs =
         containerManager.getPipelineOnDatanode(datanodeDetails);
     for (PipelineID id : pipelineIDs) {
+      LOG.info("closing pipeline {}.", id);
       publisher.fireEvent(SCMEvents.PIPELINE_CLOSE, id);
     }
   }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/d671e665/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipelines/PipelineActionEventHandler.java
----------------------------------------------------------------------
diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipelines/PipelineActionEventHandler.java
b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipelines/PipelineActionEventHandler.java
index 54c2400..1053149 100644
--- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipelines/PipelineActionEventHandler.java
+++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipelines/PipelineActionEventHandler.java
@@ -50,6 +50,8 @@ public class PipelineActionEventHandler implements
       case CLOSE:
         PipelineID pipelineID = PipelineID.
             getFromProtobuf(action.getClosePipeline().getPipelineID());
+        LOG.info("Closing pipeline " + pipelineID + " for reason:" + action
+            .getClosePipeline().getDetailedReason());
         publisher.fireEvent(SCMEvents.PIPELINE_CLOSE, pipelineID);
         break;
       default:

http://git-wip-us.apache.org/repos/asf/hadoop/blob/d671e665/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipelines/ratis/RatisManagerImpl.java
----------------------------------------------------------------------
diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipelines/ratis/RatisManagerImpl.java
b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipelines/ratis/RatisManagerImpl.java
index 150802e..0342e18 100644
--- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipelines/ratis/RatisManagerImpl.java
+++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipelines/ratis/RatisManagerImpl.java
@@ -110,15 +110,15 @@ public class RatisManagerImpl extends PipelineManager {
    * Close the pipeline.
    */
   public void closePipeline(Pipeline pipeline) throws IOException {
+    try (XceiverClientRatis client =
+        XceiverClientRatis.newXceiverClientRatis(pipeline, conf)) {
+      client.destroyPipeline();
+    }
     super.closePipeline(pipeline);
     for (DatanodeDetails node : pipeline.getMachines()) {
       // A node should always be the in ratis members list.
       Preconditions.checkArgument(ratisMembers.remove(node));
     }
-    try (XceiverClientRatis client =
-        XceiverClientRatis.newXceiverClientRatis(pipeline, conf)) {
-      client.destroyPipeline();
-    }
   }
 
   /**


---------------------------------------------------------------------
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