ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmitriu...@apache.org
Subject git commit: AMBARI-4842. Update falcon install scripts to recent changes (Eugene Chekanskiy via dlysnichenko)
Date Wed, 26 Feb 2014 14:43:58 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk edd310c8b -> 01b4d27f2


AMBARI-4842. Update falcon install scripts to recent changes (Eugene Chekanskiy via dlysnichenko)


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

Branch: refs/heads/trunk
Commit: 01b4d27f2dab95741030bb78ec8d5fe44f096aa7
Parents: edd310c
Author: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Authored: Wed Feb 26 16:42:52 2014 +0200
Committer: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Committed: Wed Feb 26 16:42:52 2014 +0200

----------------------------------------------------------------------
 .../package/templates/hadoop-services.cfg.j2    |  4 +-
 .../FALCON/configuration/oozie-site.xml         | 62 +++++++++++++-------
 .../services/FALCON/package/scripts/falcon.py   | 11 +++-
 .../services/FALCON/package/scripts/params.py   |  3 +-
 .../stacks/2.1.1/FALCON/test_falcon_client.py   |  3 +
 .../stacks/2.1.1/FALCON/test_falcon_server.py   | 29 ++++++++-
 6 files changed, 87 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/01b4d27f/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/hadoop-services.cfg.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/hadoop-services.cfg.j2
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/hadoop-services.cfg.j2
index ace9180..5e339dc 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/hadoop-services.cfg.j2
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/hadoop-services.cfg.j2
@@ -658,7 +658,7 @@ define service {
 {% if hostgroup_defs['falcon-server'] %}
 define service {
         hostgroup_name          falcon-server
-        service_description     FALCON::Falcon Server status
+        service_description     FALCON::Falcon Server process
         servicegroups           FALCON
         check_command           check_tcp_wrapper!{{ falcon_port }}!-w 1 -c 1
         normal_check_interval   1
@@ -667,7 +667,7 @@ define service {
 }
 define service {
         hostgroup_name          falcon-server
-        service_description     FALCON::Falcon Web UI status
+        service_description     FALCON::Falcon Server Web UI
         servicegroups           FALCON
         check_command           check_webui!falconserver!{{ falcon_port }}
         normal_check_interval   1

http://git-wip-us.apache.org/repos/asf/ambari/blob/01b4d27f/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/FALCON/configuration/oozie-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/FALCON/configuration/oozie-site.xml
b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/FALCON/configuration/oozie-site.xml
index 186677b..379e60e 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/FALCON/configuration/oozie-site.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/FALCON/configuration/oozie-site.xml
@@ -19,18 +19,6 @@
 
 <configuration>
   <property>
-    <name>oozie.service.ProxyUserService.proxyuser.falcon.hosts</name>
-    <value>*</value>
-    <description>Falcon proxyuser hosts</description>
-  </property>
-
-  <property>
-    <name>oozie.service.ProxyUserService.proxyuser.falcon.groups</name>
-    <value>*</value>
-    <description>Falcon proxyuser groups</description>
-  </property>
-
-  <property>
     <name>oozie.service.ELService.ext.functions.coord-job-submit-instances</name>
     <value>
       now=org.apache.oozie.extensions.OozieELExtensions#ph1_now_echo,
@@ -44,7 +32,11 @@
       latest=org.apache.oozie.coord.CoordELFunctions#ph2_coord_latest_echo,
       future=org.apache.oozie.coord.CoordELFunctions#ph2_coord_future_echo
     </value>
-    <description>Falcon</description>
+    <description>
+      EL functions declarations, separated by commas, format is [PREFIX:]NAME=CLASS#METHOD.
+      This property is a convenience property to add extensions to the built in executors
without having to
+      include all the built in ones.
+    </description>
   </property>
 
   <property>
@@ -62,7 +54,11 @@
       formatTime=org.apache.oozie.coord.CoordELFunctions#ph2_coord_formatTime,
       user=org.apache.oozie.coord.CoordELFunctions#coord_user
     </value>
-    <description>Falcon</description>
+    <description>
+      EL functions declarations, separated by commas, format is [PREFIX:]NAME=CLASS#METHOD.
+      This property is a convenience property to add extensions to the built in executors
without having to
+      include all the built in ones.
+    </description>
   </property>
 
   <property>
@@ -80,7 +76,11 @@
       formatTime=org.apache.oozie.coord.CoordELFunctions#ph2_coord_formatTime,
       user=org.apache.oozie.coord.CoordELFunctions#coord_user
     </value>
-    <description>Falcon</description>
+    <description>
+      EL functions declarations, separated by commas, format is [PREFIX:]NAME=CLASS#METHOD.
+      This property is a convenience property to add extensions to the built in executors
without having to
+      include all the built in ones.
+    </description>
   </property>
 
   <property>
@@ -99,7 +99,11 @@
       dateOffset=org.apache.oozie.coord.CoordELFunctions#ph1_coord_dateOffset_echo,
       user=org.apache.oozie.coord.CoordELFunctions#coord_user
     </value>
-    <description>Falcon</description>
+    <description>
+      EL constant declarations, separated by commas, format is [PREFIX:]NAME=CLASS#CONSTANT.
+      This property is a convenience property to add extensions to the built in executors
without having to
+      include all the built in ones.
+    </description>
   </property>
 
   <property>
@@ -120,7 +124,11 @@
       formatTime=org.apache.oozie.coord.CoordELFunctions#ph3_coord_formatTime,
       user=org.apache.oozie.coord.CoordELFunctions#coord_user
     </value>
-    <description>Falcon</description>
+    <description>
+      EL functions declarations, separated by commas, format is [PREFIX:]NAME=CLASS#METHOD.
+      This property is a convenience property to add extensions to the built in executors
without having to
+      include all the built in ones.
+    </description>
   </property>
 
   <property>
@@ -129,7 +137,9 @@
       instanceTime=org.apache.oozie.coord.CoordELFunctions#ph1_coord_nominalTime_echo_fixed,
       user=org.apache.oozie.coord.CoordELFunctions#coord_user
     </value>
-    <description>Falcon</description>
+    <description>
+      EL functions declarations, separated by commas, format is [PREFIX:]NAME=CLASS#METHOD.
+    </description>
   </property>
 
   <property>
@@ -138,8 +148,20 @@
       instanceTime=org.apache.oozie.coord.CoordELFunctions#ph2_coord_nominalTime,
       user=org.apache.oozie.coord.CoordELFunctions#coord_user
     </value>
-    <description>Falcon</description>
+    <description>
+      EL functions declarations, separated by commas, format is [PREFIX:]NAME=CLASS#METHOD.
+    </description>
   </property>
+  <!--web ui should add following properties to oozie site accordingly to FALCON_USER-->
+  <!--<property>-->
+    <!--<name>oozie.service.ProxyUserService.proxyuser.#FALCON_USER#.hosts</name>-->
+    <!--<value>*</value>-->
+    <!--<description>Falcon proxyuser hosts</description>-->
+  <!--</property>-->
 
-
+  <!--<property>-->
+    <!--<name>oozie.service.ProxyUserService.proxyuser.#FALCON_USER#.groups</name>-->
+    <!--<value>*</value>-->
+    <!--<description>Falcon proxyuser groups</description>-->
+  <!--</property>-->
 </configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/01b4d27f/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/FALCON/package/scripts/falcon.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/FALCON/package/scripts/falcon.py
b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/FALCON/package/scripts/falcon.py
index 8596aa3..58d3af7 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/FALCON/package/scripts/falcon.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/FALCON/package/scripts/falcon.py
@@ -27,6 +27,9 @@ def falcon(type, action = None):
   Directory(params.falcon_log_dir,
             owner=params.falcon_user
   )
+  Directory(params.falcon_webapp_dir,
+            owner=params.falcon_user
+  )
   if type == 'client':
     if action == 'config':
       File(params.falcon_conf_dir + '/client.properties',
@@ -36,10 +39,16 @@ def falcon(type, action = None):
     if action == 'config':
       if params.store_uri[0:4] == "hdfs":
         params.HdfsDirectory(params.store_uri,
-                             action="create",
+                             action="create_delayed",
                              owner=params.falcon_user,
                              mode=0755
         )
+      params.HdfsDirectory(params.flacon_apps_dir,
+                           action="create_delayed",
+                           owner=params.falcon_user,
+                           mode=0777#TODO change to proper mode
+      )
+      params.HdfsDirectory(None, action="create")
       Directory(params.falcon_local_dir,
                 owner=params.falcon_user,
                 recursive=True

http://git-wip-us.apache.org/repos/asf/ambari/blob/01b4d27f/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/FALCON/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/FALCON/package/scripts/params.py
b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/FALCON/package/scripts/params.py
index 69d908c..77e4cca 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/FALCON/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/FALCON/package/scripts/params.py
@@ -43,7 +43,8 @@ falcon_runtime_properties = config['configurations']['falcon-runtime.properties'
 falcon_startup_properties = config['configurations']['falcon-startup.properties']
 http_keytab = falcon_startup_properties['*.falcon.http.authentication.kerberos.keytab']
 http_principal = falcon_startup_properties['*.falcon.http.authentication.kerberos.principal']
-
+falcon_webapp_dir = '/var/lib/falcon/webapp'
+flacon_apps_dir = '/apps/falcon'
 #for create_hdfs_directory
 _authentication = config['configurations']['core-site']['hadoop.security.authentication']
 security_enabled = ( not is_empty(_authentication) and _authentication == 'kerberos')

http://git-wip-us.apache.org/repos/asf/ambari/blob/01b4d27f/ambari-server/src/test/python/stacks/2.1.1/FALCON/test_falcon_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1.1/FALCON/test_falcon_client.py b/ambari-server/src/test/python/stacks/2.1.1/FALCON/test_falcon_client.py
index b979eeb..9e22bc0 100644
--- a/ambari-server/src/test/python/stacks/2.1.1/FALCON/test_falcon_client.py
+++ b/ambari-server/src/test/python/stacks/2.1.1/FALCON/test_falcon_client.py
@@ -34,6 +34,9 @@ class TestFalconClient(RMFTestCase):
     self.assertResourceCalled('Directory', '/var/log/falcon',
                               owner = 'falcon',
                               )
+    self.assertResourceCalled('Directory', '/var/lib/falcon/webapp',
+                              owner = 'falcon',
+                              )
     self.assertResourceCalled('File', '/etc/falcon/conf/client.properties',
                               content=Template('client.properties.j2'),
                               mode=0644, )

http://git-wip-us.apache.org/repos/asf/ambari/blob/01b4d27f/ambari-server/src/test/python/stacks/2.1.1/FALCON/test_falcon_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1.1/FALCON/test_falcon_server.py b/ambari-server/src/test/python/stacks/2.1.1/FALCON/test_falcon_server.py
index df8bd92..6e48c35 100644
--- a/ambari-server/src/test/python/stacks/2.1.1/FALCON/test_falcon_server.py
+++ b/ambari-server/src/test/python/stacks/2.1.1/FALCON/test_falcon_server.py
@@ -36,6 +36,9 @@ class TestFalconServer(RMFTestCase):
     self.assertResourceCalled('Directory', '/var/log/falcon',
                               owner = 'falcon',
                               )
+    self.assertResourceCalled('Directory', '/var/lib/falcon/webapp',
+                              owner = 'falcon',
+                              )
     self.assertResourceCalled('Execute',
                               'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 FALCON_LOG_DIR=/var/log/falcon
FALCON_PID_DIR=/var/run/falcon FALCON_DATA_DIR=/hadoop/falcon/activemq /usr/lib/falcon/bin/falcon-start
-port 15000',
                               user='falcon', )
@@ -53,6 +56,9 @@ class TestFalconServer(RMFTestCase):
     self.assertResourceCalled('Directory', '/var/log/falcon',
                               owner = 'falcon',
                               )
+    self.assertResourceCalled('Directory', '/var/lib/falcon/webapp',
+                              owner = 'falcon',
+                              )
     self.assertResourceCalled('Execute',
                           'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 FALCON_LOG_DIR=/var/log/falcon
FALCON_PID_DIR=/var/run/falcon FALCON_DATA_DIR=/hadoop/falcon/activemq /usr/lib/falcon/bin/falcon-stop',
                           user='falcon', )
@@ -77,9 +83,30 @@ class TestFalconServer(RMFTestCase):
     self.assertResourceCalled('Directory', '/var/log/falcon',
                               owner = 'falcon',
                               )
+    self.assertResourceCalled('Directory', '/var/lib/falcon/webapp',
+                              owner = 'falcon',
+                              )
+    self.assertResourceCalled('HdfsDirectory', '/apps/falcon',
+                              action=['create_delayed'],
+                              conf_dir='/etc/hadoop/conf',
+                              hdfs_user='hdfs',
+                              keytab=UnknownConfigurationMock(),
+                              kinit_path_local='/usr/bin/kinit',
+                              mode=0777,
+                              owner='falcon',
+                              security_enabled=False
+                              )
+    self.assertResourceCalled('HdfsDirectory', None,
+                              action=['create'],
+                              conf_dir='/etc/hadoop/conf',
+                              hdfs_user='hdfs',
+                              keytab=UnknownConfigurationMock(),
+                              kinit_path_local='/usr/bin/kinit',
+                              security_enabled=False
+                              )
     self.assertResourceCalled('Directory', '/hadoop/falcon',
                               owner = 'falcon',
-                              recursive = True,
+                              recursive = True
                               )
     self.assertResourceCalled('Directory', '/hadoop/falcon/activemq',
                               owner = 'falcon',


Mime
View raw message