ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alejan...@apache.org
Subject ambari git commit: AMBARI-17183: client.properties for Falcon should be configurable via Ambari (Venkat Ranganathan via alejandro)
Date Thu, 23 Jun 2016 18:21:13 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 efa003b80 -> 16d63dabf


AMBARI-17183: client.properties for Falcon should be configurable via Ambari (Venkat Ranganathan
via alejandro)


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

Branch: refs/heads/branch-2.4
Commit: 16d63dabf41f2dcb58a51d537ec9262e7f4a4f79
Parents: efa003b
Author: Alejandro Fernandez <afernandez@hortonworks.com>
Authored: Thu Jun 23 11:23:05 2016 -0700
Committer: Alejandro Fernandez <afernandez@hortonworks.com>
Committed: Thu Jun 23 11:23:05 2016 -0700

----------------------------------------------------------------------
 .../FALCON/0.5.0.2.1/package/scripts/falcon.py          | 11 +++++++----
 .../FALCON/0.5.0.2.1/package/scripts/params_linux.py    |  1 +
 .../services/FALCON/package/scripts/falcon.py           |  6 +++---
 .../test/python/stacks/2.1/FALCON/test_falcon_client.py |  6 +++---
 .../test/python/stacks/2.1/FALCON/test_falcon_server.py | 12 ++++++------
 .../src/test/python/stacks/2.1/configs/default.json     |  3 +++
 .../test/python/stacks/2.2/configs/falcon-upgrade.json  |  5 ++++-
 7 files changed, 27 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/16d63dab/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py
b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py
index 6cb4089..2bdaa48 100644
--- a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py
+++ b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py
@@ -77,12 +77,12 @@ def falcon(type, action = None, upgrade_type=None):
       owner = params.falcon_user,
       group=params.user_group,
     )
-
-    File(params.falcon_conf_dir + '/client.properties',
-      content = Template('client.properties.j2'),
+    
+    PropertiesFile(params.falcon_conf_dir + '/client.properties',
+      properties = params.falcon_client_properties,
       mode = 0644,
       owner = params.falcon_user)
-
+      
     PropertiesFile(params.falcon_conf_dir + '/runtime.properties',
       properties = params.falcon_runtime_properties,
       mode = 0644,
@@ -229,6 +229,9 @@ def falcon(type, action = None, upgrade_type=None):
     PropertiesFile(os.path.join(params.falcon_conf_dir, 'startup.properties'),
       properties = params.falcon_startup_properties)
 
+    PropertiesFile(os.path.join(params.falcon_conf_dir, 'client.properties'),
+      properties = params.falcon_client_properties)
+
   if type == 'server':
     ServiceConfig(params.falcon_win_service_name,
       action = "change_user",

http://git-wip-us.apache.org/repos/asf/ambari/blob/16d63dab/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py
b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py
index 86d76ff..fc9d8b9 100644
--- a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py
@@ -108,6 +108,7 @@ falcon_host = config['clusterHostInfo']['falcon_server_hosts'][0]
 falcon_port = config['configurations']['falcon-env']['falcon_port']
 falcon_runtime_properties = config['configurations']['falcon-runtime.properties']
 falcon_startup_properties = config['configurations']['falcon-startup.properties']
+falcon_client_properties = config['configurations']['falcon-client.properties']
 smokeuser_keytab = config['configurations']['cluster-env']['smokeuser_keytab']
 falcon_env_sh_template = config['configurations']['falcon-env']['content']
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/16d63dab/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/FALCON/package/scripts/falcon.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/FALCON/package/scripts/falcon.py
b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/FALCON/package/scripts/falcon.py
index 9a72af1..fd2a56a 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/FALCON/package/scripts/falcon.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/FALCON/package/scripts/falcon.py
@@ -37,9 +37,9 @@ def falcon(type, action = None):
     File(params.falcon_conf_dir + '/falcon-env.sh',
          content=Template('falcon-env.sh.j2')
     )
-    File(params.falcon_conf_dir + '/client.properties',
-         content=Template('client.properties.j2'),
-         mode=0644
+    PropertiesFile(params.falcon_conf_dir + '/client.properties',
+                   properties=params.falcon_client_properties,
+                   mode=0644
     )
     PropertiesFile(params.falcon_conf_dir + '/runtime.properties',
                    properties=params.falcon_runtime_properties,

http://git-wip-us.apache.org/repos/asf/ambari/blob/16d63dab/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_client.py b/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_client.py
index fbf624a..8079147 100644
--- a/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_client.py
+++ b/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_client.py
@@ -68,10 +68,10 @@ class TestFalconClient(RMFTestCase):
                               owner = 'falcon',
                               group = 'hadoop'
                               )
-    self.assertResourceCalled('File', '/etc/falcon/conf/client.properties',
-                              content = Template('client.properties.j2'),
+    self.assertResourceCalled('PropertiesFile', '/etc/falcon/conf/client.properties',
                               owner = 'falcon',
-                              mode = 0644
+                              mode = 0644,
+                              properties= {u'falcon.url': u'http://{{falcon_host}}:{{falcon_port}}'}
                               )
     self.assertResourceCalled('PropertiesFile', '/etc/falcon/conf/runtime.properties',
                               mode = 0644,

http://git-wip-us.apache.org/repos/asf/ambari/blob/16d63dab/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py b/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
index 68dc7c9..6f81b15 100644
--- a/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
+++ b/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
@@ -113,10 +113,10 @@ class TestFalconServer(RMFTestCase):
                               owner = 'falcon',
                               group = 'hadoop'
                               )
-    self.assertResourceCalled('File', '/etc/falcon/conf/client.properties',
-                              content = Template('client.properties.j2'),
+    self.assertResourceCalled('PropertiesFile', '/etc/falcon/conf/client.properties',
                               mode = 0644,
-                              owner = 'falcon'
+                              owner = 'falcon',
+                              properties = {u'falcon.url': u'http://{{falcon_host}}:{{falcon_port}}'}
                               )
     self.assertResourceCalled('PropertiesFile', '/etc/falcon/conf/runtime.properties',
                               mode = 0644,
@@ -264,9 +264,9 @@ class TestFalconServer(RMFTestCase):
         content = InlineTemplate(self.getConfig()['configurations']['falcon-env']['content']),
         group = 'hadoop'
     )
-    self.assertResourceCalled('File', '/usr/hdp/current/falcon-server/conf/client.properties',
-        owner = 'falcon',
-        content = Template('client.properties.j2'),
+    self.assertResourceCalled('PropertiesFile', '/usr/hdp/current/falcon-server/conf/client.properties',
+        owner = u'falcon',
+        properties = {u'falcon.url': u'http://{{falcon_host}}:{{falcon_port}}'},
         mode = 0644,
     )
     self.assertResourceCalled('PropertiesFile', '/usr/hdp/current/falcon-server/conf/runtime.properties',

http://git-wip-us.apache.org/repos/asf/ambari/blob/16d63dab/ambari-server/src/test/python/stacks/2.1/configs/default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/configs/default.json b/ambari-server/src/test/python/stacks/2.1/configs/default.json
index fa36607..9a4f8e4 100644
--- a/ambari-server/src/test/python/stacks/2.1/configs/default.json
+++ b/ambari-server/src/test/python/stacks/2.1/configs/default.json
@@ -70,6 +70,9 @@
             "*.log.cleanup.frequency.minutes.retention": "hours(6)",
             "*.domain": "${falcon.app.type}"
       },
+      "falcon-client.properties": {
+            "falcon.url": "http://{{falcon_host}}:{{falcon_port}}"
+      },
       "mapred-site": {
             "mapreduce.jobhistory.address": "c6402.ambari.apache.org:10020", 
             "mapreduce.cluster.administrators": " hadoop", 

http://git-wip-us.apache.org/repos/asf/ambari/blob/16d63dab/ambari-server/src/test/python/stacks/2.2/configs/falcon-upgrade.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/configs/falcon-upgrade.json b/ambari-server/src/test/python/stacks/2.2/configs/falcon-upgrade.json
index 7499cdf..27280f7 100644
--- a/ambari-server/src/test/python/stacks/2.2/configs/falcon-upgrade.json
+++ b/ambari-server/src/test/python/stacks/2.2/configs/falcon-upgrade.json
@@ -117,7 +117,10 @@
             "*.log.cleanup.frequency.months.retention": "months(3)", 
             "*.log.cleanup.frequency.minutes.retention": "hours(6)", 
             "*.domain": "${falcon.app.type}"
-        }, 
+        },
+        "falcon-client.properties": {
+            "falcon.url": "http://{{falcon_host}}:{{falcon_port}}"
+        },
         "hdfs-site": {
             "dfs.namenode.checkpoint.period": "21600", 
             "dfs.namenode.avoid.write.stale.datanode": "true", 


Mime
View raw message