You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2018/03/30 08:37:43 UTC

[ambari] branch trunk updated (696083e -> f1afadc)

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

aonishuk pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git.


    from 696083e  [AMBARI-23329] Ambari: set 'cloud storage' usage tracking properties for AWS, Azure object stores
     new cd7814a  AMBARI-23373. Fix formatZKFC (aonishuk)
     new f1afadc  AMBARI-23373. Fix formatZKFC (aonishuk)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../HDFS/2.1.0.2.0/package/scripts/zkfc_slave.py   | 23 ++++++++++------------
 1 file changed, 10 insertions(+), 13 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
aonishuk@apache.org.

[ambari] 02/02: AMBARI-23373. Fix formatZKFC (aonishuk)

Posted by ao...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f1afadc6b29b668f0210d96314b65df8d4554b07
Author: Andrew Onishuk <ao...@hortonworks.com>
AuthorDate: Tue Mar 27 22:01:01 2018 +0300

    AMBARI-23373. Fix formatZKFC (aonishuk)
---
 .../common-services/HDFS/2.1.0.2.0/package/scripts/zkfc_slave.py        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/zkfc_slave.py b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/zkfc_slave.py
index dcfad7e..677ccfa 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/zkfc_slave.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/zkfc_slave.py
@@ -59,7 +59,7 @@ class ZkfcSlave(Script):
     import params
     env.set_params(params)
 
-    Execute("hdfs zkfc -formatZK",
+    Execute("hdfs zkfc -formatZK -nonInteractive",
             user=params.hdfs_user,
             logoutput=True
     )

-- 
To stop receiving notification emails like this one, please contact
aonishuk@apache.org.

[ambari] 01/02: AMBARI-23373. Fix formatZKFC (aonishuk)

Posted by ao...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit cd7814aa3d6db1f6db0a49a5a07cb809d92018d0
Author: Andrew Onishuk <ao...@hortonworks.com>
AuthorDate: Tue Mar 27 14:42:00 2018 +0300

    AMBARI-23373. Fix formatZKFC (aonishuk)
---
 .../HDFS/2.1.0.2.0/package/scripts/zkfc_slave.py   | 23 ++++++++++------------
 1 file changed, 10 insertions(+), 13 deletions(-)

diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/zkfc_slave.py b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/zkfc_slave.py
index aed240a..dcfad7e 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/zkfc_slave.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/zkfc_slave.py
@@ -35,6 +35,7 @@ from resource_management.libraries.script import Script
 from resource_management.core.resources.zkmigrator import ZkMigrator
 from resource_management.core.resources.system import Execute
 from resource_management.core.exceptions import Fail, ComponentIsNotRunning
+from resource_management.core.resources.system import Execute
 
 
 class ZkfcSlave(Script):
@@ -54,6 +55,15 @@ class ZkfcSlave(Script):
     utils.set_up_zkfc_security(params)
     pass
 
+  def format(self, env):
+    import params
+    env.set_params(params)
+
+    Execute("hdfs zkfc -formatZK",
+            user=params.hdfs_user,
+            logoutput=True
+    )
+
 @OsFamilyImpl(os_family=OsFamilyImpl.DEFAULT)
 class ZkfcSlaveDefault(ZkfcSlave):
 
@@ -137,19 +147,6 @@ class ZkfcSlaveDefault(ZkfcSlave):
     env.set_params(params)
     if check_stack_feature(StackFeature.ZKFC_VERSION_ADVERTISED, params.version_for_stack_feature_checks):
       stack_select.select_packages(params.version)
-      
-  def format(self, env):
-    import params
-    env.set_params(params)
-
-    try:
-      self.status(env)
-      raise Fail("ZKFC is running. Cannot format it.")
-    except ComponentIsNotRunning:
-      Execute("hdfs zkfc -formatZK",
-              user=params.hdfs_user,
-              logoutput=True
-      )
 
 def initialize_ha_zookeeper(params):
   try:

-- 
To stop receiving notification emails like this one, please contact
aonishuk@apache.org.