You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sm...@apache.org on 2017/01/16 23:45:21 UTC

ambari git commit: Revert "AMBARI-19559. Log Namenode formatting output into ambari-agent command logs. (stoader)"

Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 d2802272d -> ea4051ab4


Revert "AMBARI-19559. Log Namenode formatting output into ambari-agent command logs. (stoader)"

This reverts commit 98fdbba5d8c2ae0953bd722ca218a1d91dce2925.


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

Branch: refs/heads/branch-2.5
Commit: ea4051ab4205e0d68c45ffcbc0651fff7faa0d6c
Parents: d280227
Author: Sumit Mohanty <sm...@hortonworks.com>
Authored: Mon Jan 16 15:45:12 2017 -0800
Committer: Sumit Mohanty <sm...@hortonworks.com>
Committed: Mon Jan 16 15:45:12 2017 -0800

----------------------------------------------------------------------
 .../HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py   | 14 +++++---------
 .../services/HDFS/package/scripts/hdfs_namenode.py    |  3 +--
 .../test/python/stacks/2.0.6/HDFS/test_namenode.py    |  4 ----
 3 files changed, 6 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ea4051ab/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
index a2edf38..cc03bb3 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
@@ -254,7 +254,7 @@ def namenode(action=None, hdfs_binary=None, do_format=True, upgrade_type=None,
     namenode_format_marker = os.path.join(params.hadoop_conf_dir,"NN_FORMATTED")
     if not os.path.exists(namenode_format_marker):
       hadoop_cmd = "cmd /C %s" % (os.path.join(params.hadoop_home, "bin", "hadoop.cmd"))
-      Execute("%s namenode -format" % (hadoop_cmd), logoutput=True)
+      Execute("%s namenode -format" % (hadoop_cmd))
       open(namenode_format_marker, 'a').close()
     Service(params.namenode_win_service_name, action=action)
   elif action == "stop":
@@ -311,14 +311,12 @@ def format_namenode(force=None):
     if force:
       ExecuteHadoop('namenode -format',
                     bin_dir=params.hadoop_bin_dir,
-                    conf_dir=hadoop_conf_dir,
-                    logoutput=True)
+                    conf_dir=hadoop_conf_dir)
     else:
       if not is_namenode_formatted(params):
         Execute(format("hdfs --config {hadoop_conf_dir} namenode -format -nonInteractive"),
                 user = params.hdfs_user,
-                path = [params.hadoop_bin_dir],
-                logoutput=True
+                path = [params.hadoop_bin_dir]
         )
         for m_dir in mark_dir:
           Directory(m_dir,
@@ -332,16 +330,14 @@ def format_namenode(force=None):
       if force:
         ExecuteHadoop('namenode -format',
                       bin_dir=params.hadoop_bin_dir,
-                      conf_dir=hadoop_conf_dir,
-                      logoutput=True)
+                      conf_dir=hadoop_conf_dir)
       else:
         nn_name_dirs = params.dfs_name_dir.split(',')
         if not is_namenode_formatted(params):
           try:
             Execute(format("hdfs --config {hadoop_conf_dir} namenode -format -nonInteractive"),
                     user = params.hdfs_user,
-                    path = [params.hadoop_bin_dir],
-                    logoutput=True
+                    path = [params.hadoop_bin_dir]
             )
           except Fail:
             # We need to clean-up mark directories, so we can re-run format next time.

http://git-wip-us.apache.org/repos/asf/ambari/blob/ea4051ab/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/hdfs_namenode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/hdfs_namenode.py b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/hdfs_namenode.py
index 6de7735..35e16d5 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/hdfs_namenode.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/hdfs_namenode.py
@@ -112,8 +112,7 @@ def format_namenode(force=None):
       ExecuteHadoop('namenode -format',
                     kinit_override=True,
                     bin_dir=params.hadoop_bin_dir,
-                    conf_dir=hadoop_conf_dir,
-                    logoutput=True)
+                    conf_dir=hadoop_conf_dir)
     else:
       File(format("{tmp_dir}/checkForFormat.sh"),
            content=StaticFile("checkForFormat.sh"),

http://git-wip-us.apache.org/repos/asf/ambari/blob/ea4051ab/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
----------------------------------------------------------------------
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 fae500f..255abc6 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
@@ -65,7 +65,6 @@ class TestNamenode(RMFTestCase):
     self.assertResourceCalled('Execute', 'hdfs --config /etc/hadoop/conf namenode -format -nonInteractive',
                               path = ['/usr/bin'],
                               user = 'hdfs',
-                              logoutput = True,
                               )
     self.assertResourceCalled('Directory', '/hadoop/hdfs/namenode/namenode-formatted/',
                               create_parents = True,
@@ -182,7 +181,6 @@ class TestNamenode(RMFTestCase):
     self.assertResourceCalled('Execute', 'hdfs --config /etc/hadoop/conf namenode -format -nonInteractive',
         path = ['/usr/bin'],
         user = 'hdfs',
-        logoutput = True,
     )
     self.assertResourceCalled('Directory', '/hadoop/hdfs/namenode/namenode-formatted/',
         create_parents = True,
@@ -312,7 +310,6 @@ class TestNamenode(RMFTestCase):
     self.assertResourceCalled('Execute', 'hdfs --config /etc/hadoop/conf namenode -format -nonInteractive',
         path = ['/usr/bin'],
         user = 'hdfs',
-        logoutput = True,
     )
     self.assertResourceCalled('Directory', '/hadoop/hdfs/namenode/namenode-formatted/',
         create_parents = True,
@@ -739,7 +736,6 @@ class TestNamenode(RMFTestCase):
     self.assertResourceCalled('Execute', 'hdfs --config /etc/hadoop/conf namenode -format -nonInteractive',
         path = ['/usr/bin'],
         user = 'hdfs',
-        logoutput = True,
     )
     self.assertResourceCalled('Directory', '/hadoop/hdfs/namenode/namenode-formatted/',
         create_parents = True,