ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject [08/50] [abbrv] ambari git commit: AMBARI-21692 dfs.include file is created on all datanode hosts when Ambari manages include/exclude files (dsen)
Date Mon, 09 Oct 2017 18:34:22 GMT
AMBARI-21692 dfs.include file is created on all datanode hosts when Ambari manages include/exclude
files (dsen)

(cherry picked from commit aa9d866e7c4df1bdff665bec3154e3731cd8f5a7)

Change-Id: Id1c35871654e0c1df4c4caeb3bbe63df3f59a9bd


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

Branch: refs/heads/2.5-maint
Commit: 6ddb896ab969e451540f3f3271f1fddcbb567946
Parents: b79e01b
Author: Dmytro Sen <dsen@apache.org>
Authored: Fri Aug 11 13:38:46 2017 +0300
Committer: dsen@apache.org <jenkins@hortonworks.com>
Committed: Fri Aug 11 11:11:11 2017 +0000

----------------------------------------------------------------------
 .../2.1.0.2.0/package/scripts/hdfs_snamenode.py     |  6 ++++++
 .../before-START/scripts/shared_initialization.py   | 15 ---------------
 .../services/HDFS/package/scripts/hdfs_snamenode.py |  6 ++++++
 .../before-START/scripts/shared_initialization.py   | 16 +---------------
 .../before-START/scripts/shared_initialization.py   | 14 --------------
 5 files changed, 13 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/6ddb896a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_snamenode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_snamenode.py
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_snamenode.py
index 500ed15..ef6a2e2 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_snamenode.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_snamenode.py
@@ -37,6 +37,12 @@ def snamenode(action=None, format=False):
          content=Template("exclude_hosts_list.j2"),
          owner=params.hdfs_user,
          group=params.user_group)
+    if params.hdfs_include_file:
+      File(params.include_file_path,
+         content=Template("include_hosts_list.j2"),
+         owner=params.hdfs_user,
+         group=params.user_group)
+      pass
   elif action == "start" or action == "stop":
     import params
     service(

http://git-wip-us.apache.org/repos/asf/ambari/blob/6ddb896a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-START/scripts/shared_initialization.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-START/scripts/shared_initialization.py
b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-START/scripts/shared_initialization.py
index 265502f..cba724a 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-START/scripts/shared_initialization.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-START/scripts/shared_initialization.py
@@ -137,21 +137,6 @@ def setup_configs():
                 group=params.user_group
       )
 
-  generate_include_file()
-
-
-def generate_include_file():
-  import params
-
-  if params.has_namenode and params.dfs_hosts and params.has_slaves:
-    include_hosts_list = params.slave_hosts
-    File(params.dfs_hosts,
-         content=Template("include_hosts_list.j2"),
-         owner=params.hdfs_user,
-         group=params.user_group
-    )
-
-
 def install_snappy():
   import params
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/6ddb896a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/hdfs_snamenode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/hdfs_snamenode.py
b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/hdfs_snamenode.py
index e734973..b7e4044 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/hdfs_snamenode.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/hdfs_snamenode.py
@@ -35,6 +35,12 @@ def snamenode(action=None, format=False):
          content=Template("exclude_hosts_list.j2"),
          owner=params.hdfs_user,
          group=params.user_group)
+    if params.hdfs_include_file:
+      File(params.include_file_path,
+         content=Template("include_hosts_list.j2"),
+         owner=params.hdfs_user,
+         group=params.user_group)
+      pass
   elif action == "start" or action == "stop":
     service(
       action=action,

http://git-wip-us.apache.org/repos/asf/ambari/blob/6ddb896a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
index 148d235..c279c3f 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
@@ -142,20 +142,6 @@ def setup_configs():
                 group=params.user_group
       )
 
-  generate_include_file()
-
-
-def generate_include_file():
-  import params
-
-  if params.has_namenode and params.dfs_hosts and params.has_slaves:
-    include_hosts_list = params.slave_hosts
-    File(params.dfs_hosts,
-         content=Template("include_hosts_list.j2"),
-         owner=params.hdfs_user,
-         group=params.user_group
-    )
-
 def create_javahome_symlink():
   if os.path.exists("/usr/jdk/jdk1.6.0_31") and not os.path.exists("/usr/jdk64/jdk1.6.0_31"):
     Directory("/usr/jdk64/",
@@ -259,4 +245,4 @@ def setup_unlimited_key_jce_policy():
               only_if=format("test -e {java_security_dir} && test -f {jce_zip_target}"),
               path=['/bin/', '/usr/bin'],
               sudo=True
-              )
\ No newline at end of file
+              )

http://git-wip-us.apache.org/repos/asf/ambari/blob/6ddb896a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/shared_initialization.py
----------------------------------------------------------------------
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/shared_initialization.py
b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/shared_initialization.py
index ba9c8fb..01e55c0 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/shared_initialization.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/shared_initialization.py
@@ -132,20 +132,6 @@ def setup_configs():
                 group=params.user_group
       )
 
-  generate_include_file()
-
-
-def generate_include_file():
-  import params
-
-  if params.has_namenode and params.dfs_hosts and params.has_slaves:
-    include_hosts_list = params.slave_hosts
-    File(params.dfs_hosts,
-         content=Template("include_hosts_list.j2"),
-         owner=params.hdfs_user,
-         group=params.user_group
-    )
-
 def create_javahome_symlink():
   if os.path.exists("/usr/jdk/jdk1.6.0_31") and not os.path.exists("/usr/jdk64/jdk1.6.0_31"):
     Directory("/usr/jdk64/",


Mime
View raw message