You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by as...@apache.org on 2019/06/19 07:50:53 UTC

[ambari] branch branch-2.7 updated: [AMBARI-25232] : Refresh NameNode client with Commission/Decommission… (#2976)

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

asnaik pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
     new fe5344d  [AMBARI-25232] : Refresh NameNode client with Commission/Decommission… (#2976)
fe5344d is described below

commit fe5344da60bd770d7caf25cfe32f4fe9fbdd0e68
Author: Viraj Jasani <34...@users.noreply.github.com>
AuthorDate: Wed Jun 19 13:20:48 2019 +0530

    [AMBARI-25232] : Refresh NameNode client with Commission/Decommission… (#2976)
    
    * [AMBARI-25232] : Refresh NameNode client with Commission/Decommission of DataNode
    
    * updating tests
---
 .../common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py        | 2 ++
 ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py      | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
index f598705..33734df 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
@@ -168,6 +168,8 @@ class NameNode(Script):
     env.set_params(params)
     hdfs_binary = self.get_hdfs_binary()
     namenode(action="decommission", hdfs_binary=hdfs_binary)
+    self.configure(env)
+
 
 @OsFamilyImpl(os_family=OsFamilyImpl.DEFAULT)
 class NameNodeDefault(NameNode):
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
index d76982e..5e11cd8 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
@@ -1056,6 +1056,7 @@ class TestNamenode(RMFTestCase):
                               user='hdfs',
                               conf_dir='/etc/hadoop/conf',
                               bin_dir='/usr/bin')
+    self.assert_configure_default()
     self.assertNoMoreResources()
 
   def test_decommission_update_files_only(self):
@@ -1071,6 +1072,7 @@ class TestNamenode(RMFTestCase):
                               content = Template('exclude_hosts_list.j2'),
                               group = 'hadoop',
                               )
+    self.assert_configure_default()
     self.assertNoMoreResources()
 
 
@@ -1092,6 +1094,7 @@ class TestNamenode(RMFTestCase):
                               user='hdfs',
                               conf_dir='/etc/hadoop/conf',
                               bin_dir='/usr/bin')
+    self.assert_configure_default()
     self.assertNoMoreResources()
 
 
@@ -1116,6 +1119,7 @@ class TestNamenode(RMFTestCase):
                               conf_dir='/etc/hadoop/conf',
                               user='hdfs',
                               )
+    self.assert_configure_secured(False)
     self.assertNoMoreResources()
 
   def assert_configure_default(self):