You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ey...@apache.org on 2020/06/29 16:22:34 UTC

[hadoop] branch trunk updated: YARN-10328. Fixed ZK Curator NodeExists exception in YARN service AM logs Contributed by Bilwa S T via eyang

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

eyang pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 0be2681  YARN-10328. Fixed ZK Curator NodeExists exception in YARN service AM logs             Contributed by Bilwa S T via eyang
0be2681 is described below

commit 0be26811f3db49abb62d12e6a051a31553495da8
Author: Eric Yang <ey...@apache.org>
AuthorDate: Mon Jun 29 09:21:24 2020 -0700

    YARN-10328. Fixed ZK Curator NodeExists exception in YARN service AM logs
                Contributed by Bilwa S T via eyang
---
 .../hadoop/yarn/service/registry/YarnRegistryViewForProviders.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/registry/YarnRegistryViewForProviders.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/registry/YarnRegistryViewForProviders.java
index cecca5f..06066d5 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/registry/YarnRegistryViewForProviders.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/registry/YarnRegistryViewForProviders.java
@@ -143,7 +143,10 @@ public class YarnRegistryViewForProviders {
       ServiceRecord record) throws IOException {
     String path = RegistryUtils.componentPath(
         user, serviceClass, serviceName, componentName);
-    registryOperations.mknode(RegistryPathUtils.parentOf(path), true);
+    String parentPath = RegistryPathUtils.parentOf(path);
+    if (!registryOperations.exists(parentPath)) {
+      registryOperations.mknode(parentPath, true);
+    }
     registryOperations.bind(path, record, BindFlags.OVERWRITE);
   }
 


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