Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 04e87277a -> 792382fce


AMBARI-18349. Specify role command order to make Microsoft-R service check run 
after YARN is started. (Attila Doroszlai via stoader)


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

Branch: refs/heads/branch-2.4
Commit: 792382fce06f9406b4025785ec7e89914bbc0ebc
Parents: 04e8727
Author: Attila Doroszlai <adorosz...@hortonworks.com>
Authored: Tue Sep 20 16:04:10 2016 +0200
Committer: Toader, Sebastian <stoa...@hortonworks.com>
Committed: Tue Sep 20 16:04:10 2016 +0200

----------------------------------------------------------------------
 .../before-START/scripts/shared_initialization.py   | 16 ++++++++++++++++
 .../MICROSOFT_R/8.0.0/role_command_order.json       |  6 ++++++
 2 files changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/792382fc/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
index ba9c8fb..2427ddf 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/shared_initialization.py
@@ -107,6 +107,8 @@ def setup_hadoop():
     if params.dfs_type == 'HCFS' and params.has_core_site and 'ECS_CLIENT' in 
params.component_list:
        create_dirs()
 
+    create_microsoft_r_dir()
+
 
 def setup_configs():
   """
@@ -173,3 +175,17 @@ def create_dirs():
                       action="execute"
    )
 
+def create_microsoft_r_dir():
+  import params
+  if 'MICROSOFT_R_CLIENT' in params.component_list and params.default_fs:
+    directory = '/user/RevoShare'
+    try:
+      params.HdfsResource(directory,
+                          type="directory",
+                          action="create_on_execute",
+                          owner=params.hdfs_user,
+                          mode=0777)
+      params.HdfsResource(None, action="execute")
+    except Exception as exception:
+      Logger.warning("Could not check the existence of {0} on DFS while 
starting {1}, exception: {2}".format(directory, params.current_service, 
str(exception)))
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/792382fc/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/role_command_order.json
----------------------------------------------------------------------
diff --git 
a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/role_command_order.json
 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/role_command_order.json
new file mode 100755
index 0000000..6edbc2c
--- /dev/null
+++ 
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/role_command_order.json
@@ -0,0 +1,6 @@
+{
+  "general_deps" : {
+    "_comment" : "dependencies for Microsoft R",
+    "MICROSOFT_R_SERVICE_CHECK-SERVICE_CHECK": ["NODEMANAGER-START"]
+  }
+}

Reply via email to