You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2018/05/10 18:43:45 UTC
[ambari] branch trunk updated: [AMBARI-23805] HBase deployment
failed in Namenode Federated Environment (#1232)
This is an automated email from the ASF dual-hosted git repository.
swagle pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new c1552d0 [AMBARI-23805] HBase deployment failed in Namenode Federated Environment (#1232)
c1552d0 is described below
commit c1552d0e159041b6edc8f6e642a1866ad5ccecd1
Author: kasakrisz <33...@users.noreply.github.com>
AuthorDate: Thu May 10 20:43:39 2018 +0200
[AMBARI-23805] HBase deployment failed in Namenode Federated Environment (#1232)
---
.../libraries/providers/hdfs_resource.py | 35 +++++++++-------------
1 file changed, 14 insertions(+), 21 deletions(-)
diff --git a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
index a298f39..23bfbc5 100644
--- a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
+++ b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
@@ -19,30 +19,26 @@ limitations under the License.
Ambari Agent
"""
-import re
-import os
+import \
+ ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set.
import grp
+import os
import pwd
+import re
import time
-from resource_management.core.environment import Environment
+from resource_management.core import shell
+from resource_management.core import sudo
from resource_management.core.base import Fail
+from resource_management.core.environment import Environment
+from resource_management.core.logger import Logger
+from resource_management.core.providers import Provider
from resource_management.core.resources.system import Execute
from resource_management.core.resources.system import File
-from resource_management.core.providers import Provider
-from resource_management.core.logger import Logger
-from resource_management.core import shell
-from resource_management.core import sudo
-from resource_management.libraries.script import Script
from resource_management.libraries.functions import format
-from resource_management.libraries.functions.get_user_call_output import get_user_call_output
-from resource_management.libraries.functions import is_empty
from resource_management.libraries.functions import namenode_ha_utils
+from resource_management.libraries.functions.get_user_call_output import get_user_call_output
from resource_management.libraries.functions.hdfs_utils import is_https_enabled_in_hdfs
-
-import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set.
-from ambari_commons import subprocess32
-
JSON_PATH = '/var/lib/ambari-agent/tmp/hdfs_resources_{timestamp}.json'
JAR_PATH = '/var/lib/ambari-agent/lib/fast-hdfs-resource.jar'
@@ -151,15 +147,12 @@ class WebHDFSCallException(Fail):
class WebHDFSUtil:
def __init__(self, hdfs_site, nameservice, run_user, security_enabled, logoutput=None):
- https_nn_address = namenode_ha_utils.get_property_for_active_namenode(hdfs_site, nameservice, 'dfs.namenode.https-address',
- security_enabled, run_user)
- http_nn_address = namenode_ha_utils.get_property_for_active_namenode(hdfs_site, nameservice, 'dfs.namenode.http-address',
- security_enabled, run_user)
self.is_https_enabled = is_https_enabled_in_hdfs(hdfs_site['dfs.http.policy'], hdfs_site['dfs.https.enable'])
-
- address = https_nn_address if self.is_https_enabled else http_nn_address
+ address_property = 'dfs.namenode.https-address' if self.is_https_enabled else 'dfs.namenode.http-address'
+ address = namenode_ha_utils.get_property_for_active_namenode(hdfs_site, nameservice, address_property,
+ security_enabled, run_user)
protocol = "https" if self.is_https_enabled else "http"
-
+
self.address = format("{protocol}://{address}")
self.run_user = run_user
self.security_enabled = security_enabled
--
To stop receiving notification emails like this one, please contact
swagle@apache.org.