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 2015/12/10 12:28:45 UTC

[1/2] ambari git commit: AMBARI-14318. Ats active Dir not created on HDFS through Installer (aonishuk)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 959ff5725 -> 1d9a5d4b8
  refs/heads/trunk a5a353b02 -> df4bbdd85


AMBARI-14318. Ats active Dir not created on HDFS through Installer (aonishuk)


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

Branch: refs/heads/trunk
Commit: df4bbdd8549529257dd9afed610c45d354cca955
Parents: a5a353b
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Thu Dec 10 13:28:35 2015 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Thu Dec 10 13:28:35 2015 +0200

----------------------------------------------------------------------
 .../resource_management/libraries/providers/hdfs_resource.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/df4bbdd8/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
----------------------------------------------------------------------
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 a7aa2f8..731bce7 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
@@ -21,6 +21,7 @@ Ambari Agent
 """
 import re
 import os
+import time
 from resource_management.core.environment import Environment
 from resource_management.core.base import Fail
 from resource_management.core.resources.system import Execute
@@ -37,7 +38,7 @@ from resource_management.libraries.functions import namenode_ha_utils
 import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set.
 import subprocess
 
-JSON_PATH = '/var/lib/ambari-agent/tmp/hdfs_resources.json'
+JSON_PATH = '/var/lib/ambari-agent/tmp/hdfs_resources_{timestamp}.json'
 JAR_PATH = '/var/lib/ambari-agent/lib/fast-hdfs-resource.jar'
 
 RESOURCE_TO_JSON_FIELDS = {
@@ -101,13 +102,14 @@ class HdfsResourceJar:
     logoutput = main_resource.resource.logoutput
     principal_name = main_resource.resource.principal_name
     jar_path=JAR_PATH
-    json_path=JSON_PATH
+    timestamp = time.time()
+    json_path=format(JSON_PATH)
 
     if security_enabled:
       main_resource.kinit()
 
     # Write json file to disk
-    File(JSON_PATH,
+    File(json_path,
          owner = user,
          content = json.dumps(env.config['hdfs_files'])
     )


[2/2] ambari git commit: AMBARI-14318. Ats active Dir not created on HDFS through Installer (aonishuk)

Posted by ao...@apache.org.
AMBARI-14318. Ats active Dir not created on HDFS through Installer (aonishuk)


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

Branch: refs/heads/branch-2.2
Commit: 1d9a5d4b847746232997ab6fd92ab7cecf7e946e
Parents: 959ff57
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Thu Dec 10 13:28:38 2015 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Thu Dec 10 13:28:38 2015 +0200

----------------------------------------------------------------------
 .../resource_management/libraries/providers/hdfs_resource.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1d9a5d4b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
----------------------------------------------------------------------
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 a016ad6..59a04ece 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
@@ -21,6 +21,7 @@ Ambari Agent
 """
 import re
 import os
+import time
 from resource_management.core.environment import Environment
 from resource_management.core.base import Fail
 from resource_management.core.resources.system import Execute
@@ -37,7 +38,7 @@ from resource_management.libraries.functions import namenode_ha_utils
 import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set.
 import subprocess
 
-JSON_PATH = '/var/lib/ambari-agent/tmp/hdfs_resources.json'
+JSON_PATH = '/var/lib/ambari-agent/tmp/hdfs_resources_{timestamp}.json'
 JAR_PATH = '/var/lib/ambari-agent/lib/fast-hdfs-resource.jar'
 
 RESOURCE_TO_JSON_FIELDS = {
@@ -100,13 +101,14 @@ class HdfsResourceJar:
     logoutput = main_resource.resource.logoutput
     principal_name = main_resource.resource.principal_name
     jar_path=JAR_PATH
-    json_path=JSON_PATH
+    timestamp = time.time()
+    json_path=format(JSON_PATH)
 
     if security_enabled:
       main_resource.kinit()
 
     # Write json file to disk
-    File(JSON_PATH,
+    File(json_path,
          owner = user,
          content = json.dumps(env.config['hdfs_files'])
     )