You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by gu...@apache.org on 2023/08/02 08:40:57 UTC

[bigtop] branch openEuler-support updated: add hadoop smoke test for openeuler (#1134)

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

guyuqi pushed a commit to branch openEuler-support
in repository https://gitbox.apache.org/repos/asf/bigtop.git


The following commit(s) were added to refs/heads/openEuler-support by this push:
     new d220e8272 add hadoop smoke test for openeuler (#1134)
d220e8272 is described below

commit d220e82725b2329f390a0a6c08a9a3d0b576c6ad
Author: MacChen01 <ch...@163.com>
AuthorDate: Wed Aug 2 16:40:51 2023 +0800

    add hadoop smoke test for openeuler (#1134)
---
 bigtop-deploy/puppet/modules/hadoop/manifests/init.pp | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/bigtop-deploy/puppet/modules/hadoop/manifests/init.pp b/bigtop-deploy/puppet/modules/hadoop/manifests/init.pp
index f9fd2e9b9..587803403 100644
--- a/bigtop-deploy/puppet/modules/hadoop/manifests/init.pp
+++ b/bigtop-deploy/puppet/modules/hadoop/manifests/init.pp
@@ -829,10 +829,20 @@ class hadoop ($hadoop_security_authentication = "simple",
   }
 
   define create_storage_dir {
-    exec { "mkdir $name":
-      command => "/bin/mkdir -p $name",
-      creates => $name,
-      user =>"root",
+    # change the cgroup of hdfs and yarn from hadoop to root in openeuler,
+    # otherwise, the namemode of hdfs has not the permission to create directories during smoke test.
+    if ($operatingsystem == 'openEuler'){
+      exec { "mkdir $name":
+        command => "/usr/sbin/usermod -G root yarn && /usr/sbin/usermod -G root hdfs && /bin/mkdir -p $name",
+        creates => $name,
+        user =>"root",
+      }
+    } else {
+      exec { "mkdir $name":
+        command => "/bin/mkdir -p $name",
+        creates => $name,
+        user =>"root",
+      }
     }
   }