ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlun...@apache.org
Subject ambari git commit: Revert "AMBARI-13427: NAMENODE START failed with both NN's being passive (jluniya)"
Date Fri, 16 Oct 2015 16:28:18 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 e0c8707bd -> 61bf60bb7


Revert "AMBARI-13427: NAMENODE START failed with both NN's being passive (jluniya)"

This reverts commit e0c8707bd16ea26e487e0136dc84e6c8b817f015.


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

Branch: refs/heads/branch-2.1
Commit: 61bf60bb7b78479af98964f42cc47a0f9142704f
Parents: e0c8707
Author: Jayush Luniya <jluniya@hortonworks.com>
Authored: Fri Oct 16 09:28:09 2015 -0700
Committer: Jayush Luniya <jluniya@hortonworks.com>
Committed: Fri Oct 16 09:28:09 2015 -0700

----------------------------------------------------------------------
 .../libraries/functions/namenode_ha_utils.py    | 27 ++------------------
 1 file changed, 2 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/61bf60bb/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py
b/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py
index 0920e85..99f90b8 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py
@@ -23,8 +23,6 @@ from resource_management.libraries.functions.format import format
 from resource_management.libraries.functions.jmx import get_value_from_jmx
 from resource_management.core.base import Fail
 from resource_management.core import shell
-from resource_management.core.logger import Logger
-from resource_management.libraries.functions.decorator import retry
 
 __all__ = ["get_namenode_states", "get_active_namenode", "get_property_for_active_namenode"]
 
@@ -34,29 +32,8 @@ HDFS_NN_STATE_STANDBY = 'standby'
 NAMENODE_HTTP_FRAGMENT = 'dfs.namenode.http-address.{0}.{1}'
 NAMENODE_HTTPS_FRAGMENT = 'dfs.namenode.https-address.{0}.{1}'
 JMX_URI_FRAGMENT = "{0}://{1}/jmx?qry=Hadoop:service=NameNode,name=FSNamesystem"
-
-def get_namenode_states(hdfs_site, security_enabled, run_user, times=10, sleep_time=1, backoff_factor=2):
-  """
-  return format [('nn1', 'hdfs://hostname1:port1'), ('nn2', 'hdfs://hostname2:port2')] ,
[....], [....]
-  """
-  @retry(times=times, sleep_time=sleep_time, backoff_factor=backoff_factor, err_class=Fail)
-  def doRetries(hdfs_site, security_enabled, run_user):
-    doRetries.attempt += 1
-    active_namenodes, standby_namenodes, unknown_namenodes = get_namenode_states_noretries(hdfs_site,
security_enabled, run_user)
-    Logger.info(
-      "NameNode HA states: active_namenodes = {0}, standby_namenodes = {1}, unknown_namenodes
= {2}".format(
-        active_namenodes, standby_namenodes, unknown_namenodes))
-    if active_namenodes:
-      return active_namenodes, standby_namenodes, unknown_namenodes
-    elif doRetries.attempt == times:
-      Logger.warning("No active NameNode was found after {0} retries. Will return current
NameNode HA states".format(times))
-      return active_namenodes, standby_namenodes, unknown_namenodes
-    raise Fail('No active NameNode was found.')
-
-  doRetries.attempt = 0
-  return doRetries(hdfs_site, security_enabled, run_user)
-
-def get_namenode_states_noretries(hdfs_site, security_enabled, run_user):
+  
+def get_namenode_states(hdfs_site, security_enabled, run_user):
   """
   return format [('nn1', 'hdfs://hostname1:port1'), ('nn2', 'hdfs://hostname2:port2')] ,
[....], [....]
   """


Mime
View raw message