ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [12/50] [abbrv] ambari git commit: AMBARI-21462. Readd TITAN, R4ML, SYSTEMML, JNBG to BigInsights and fix HBase backup during EU and imports (alejandro)
Date Tue, 18 Jul 2017 15:02:48 GMT
http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/JNBG/0.2.0/package/scripts/py_client_params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/JNBG/0.2.0/package/scripts/py_client_params.py b/ambari-server/src/main/resources/common-services/JNBG/0.2.0/package/scripts/py_client_params.py
new file mode 100755
index 0000000..5dcc8e4
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/JNBG/0.2.0/package/scripts/py_client_params.py
@@ -0,0 +1,39 @@
+#!/usr/bin/env python
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+
+from resource_management.libraries.script.script import Script
+from resource_management.libraries.functions.format import format
+from jkg_toree_params import py_executable, py_venv_pathprefix, py_venv_restrictive, venv_owner, ambarisudo
+import jnbg_helpers as helpers
+
+# Server configurations
+config = Script.get_config()
+stack_root = Script.get_stack_root()
+
+package_dir = helpers.package_dir()
+cmd_file_name = "pythonenv_setup.sh"
+cmd_file_path = format("{package_dir}files/{cmd_file_name}")
+
+# Sequence of commands executed in py_client.py
+commands = [ambarisudo + ' ' +
+            cmd_file_path + ' ' +
+            py_executable + ' ' +
+            py_venv_pathprefix + ' ' +
+            venv_owner]

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/JNBG/0.2.0/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/JNBG/0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/JNBG/0.2.0/package/scripts/service_check.py
new file mode 100755
index 0000000..d4d5f42
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/JNBG/0.2.0/package/scripts/service_check.py
@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+
+from resource_management.libraries.script.script import Script
+from resource_management.libraries.functions.format import format
+from resource_management.core.resources.system import Execute
+
+class JupyterKernelGatewayServiceCheck(Script):
+    def service_check(self, env):
+        import jkg_toree_params as params
+        env.set_params(params)
+
+        if params.security_enabled:
+          jnbg_kinit_cmd = format("{kinit_path_local} -kt {jnbg_kerberos_keytab} {jnbg_kerberos_principal}; ")
+          Execute(jnbg_kinit_cmd, user=params.user)
+
+        scheme = "https" if params.ui_ssl_enabled else "http"
+        Execute(format("curl -s -o /dev/null -w'%{{http_code}}' --negotiate -u: -k {scheme}://{jkg_host}:{jkg_port}/api/kernelspecs | grep 200"),
+                tries = 10,
+                try_sleep=3,
+                logoutput=True)
+        Execute(format("curl -s --negotiate -u: -k {scheme}://{jkg_host}:{jkg_port}/api/kernelspecs | grep Scala"),
+                tries = 10,
+                try_sleep=3,
+                logoutput=True)
+
+if __name__ == "__main__":
+    JupyterKernelGatewayServiceCheck().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/JNBG/0.2.0/package/scripts/status_params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/JNBG/0.2.0/package/scripts/status_params.py b/ambari-server/src/main/resources/common-services/JNBG/0.2.0/package/scripts/status_params.py
new file mode 100755
index 0000000..78d7a8a
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/JNBG/0.2.0/package/scripts/status_params.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+
+from resource_management.libraries.script.script import Script
+from resource_management.libraries.functions.format import format
+
+config = Script.get_config()
+jkg_pid_dir = config['configurations']['jnbg-env']['jkg_pid_dir_prefix']
+jkg_pid_file = format("{jkg_pid_dir}/jupyter_kernel_gateway.pid")

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/R4ML/0.8.0/configuration/r4ml-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/R4ML/0.8.0/configuration/r4ml-env.xml b/ambari-server/src/main/resources/common-services/R4ML/0.8.0/configuration/r4ml-env.xml
new file mode 100755
index 0000000..25261a3
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/R4ML/0.8.0/configuration/r4ml-env.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+<configuration supports_final="true">
+  <!-- Local/offline install R baseurl -->
+  <property>
+    <name>Baseurl for local install of R and R packages dependencies</name>
+    <description>The baseurl of the repository for R and R packages. This is only needed during local or offline install.</description>
+    <value>http://</value>
+    <value-attributes>
+      <overridable>false</overridable>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <!-- .Renviron -->
+  <property>
+    <name>Renviron</name>
+    <description>This is the jinja template for Renviron file</description>
+    <value>
+SPARK_HOME={{spark_home}}
+R4ML_SPARK_DRIVER_MEMORY={{spark_driver_memory}}
+SPARKR_SUBMIT_ARGS={{spark_submit_args}}
+R4ML_YARN_KEYTAB=
+R4ML_YARN_PRINCIPAL=
+R4ML_SYSML_JAR={{systemml_jar}}
+R_LIBS={{spark_home}}/R/lib:{{r4ml_home}}/R/lib
+    </value>
+    <on-ambari-upgrade add="false"/>
+  </property>
+</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/R4ML/0.8.0/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/R4ML/0.8.0/metainfo.xml b/ambari-server/src/main/resources/common-services/R4ML/0.8.0/metainfo.xml
new file mode 100755
index 0000000..214d577
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/R4ML/0.8.0/metainfo.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<metainfo>
+  <schemaVersion>2.0</schemaVersion>
+  <services>
+    <service>
+      <name>R4ML</name>
+      <displayName>R4ML</displayName>
+      <comment>A scalable, hybrid approach to ML/Stats using R, SystemML and Apache Spark.</comment>
+      <version>0.8.0</version>
+      <components>
+        <component>
+          <name>R4ML</name>
+          <displayName>R4ML</displayName>
+          <category>CLIENT</category>
+          <cardinality>0+</cardinality>
+          <versionAdvertised>true</versionAdvertised>
+          <dependencies>
+            <dependency>
+              <name>HDFS/HDFS_CLIENT</name>
+              <scope>host</scope>
+              <auto-deploy>
+                <enabled>true</enabled>
+              </auto-deploy>
+            </dependency>
+            <dependency>
+              <name>SPARK2/SPARK2_CLIENT</name>
+              <scope>host</scope>
+              <auto-deploy>
+                <enabled>true</enabled>
+              </auto-deploy>
+            </dependency>
+            <dependency>
+              <name>SYSTEMML/SYSTEMML</name>
+              <scope>host</scope>
+              <auto-deploy>
+                <enabled>true</enabled>
+              </auto-deploy>
+            </dependency>
+          </dependencies>
+          <commandScript>
+            <script>scripts/r4ml_client.py</script>
+            <scriptType>PYTHON</scriptType>
+            <timeout>600</timeout>
+          </commandScript>
+          <configFiles>
+          </configFiles>          
+        </component>
+      </components>
+      <osSpecifics>
+        <osSpecific>
+          <osFamily>any</osFamily>
+          <packages>
+            <package>
+              <name>r4ml_4_3_*</name>
+            </package>
+          </packages>
+        </osSpecific>
+      </osSpecifics>
+
+      <commandScript>
+        <script>scripts/service_check.py</script>
+        <scriptType>PYTHON</scriptType>
+        <timeout>300</timeout>
+      </commandScript>
+
+      <requiredServices>
+        <service>SPARK2</service>
+        <service>SYSTEMML</service>
+      </requiredServices>
+
+      <configuration-dependencies>
+      </configuration-dependencies>
+
+    </service>
+  </services>
+</metainfo>

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/files/Install.R
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/files/Install.R b/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/files/Install.R
new file mode 100755
index 0000000..b7c9d1c
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/files/Install.R
@@ -0,0 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+args <- commandArgs(trailingOnly = TRUE)
+options(repos=c("http://cran.rstudio.com"))
+tryCatch({
+  if (suppressWarnings(!require(args[1], character.only=T))) install.packages(args[1])
+},
+warning = function(w) {print(w); ifelse(grepl("unable to resolve", w) || grepl("non-zero exit status", w), quit(save="no", status=1), quit(save="no", status=0))},
+error = function(e) quit(save="no", status=2))
+quit(save="no", status=0)

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/files/ServiceCheck.R
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/files/ServiceCheck.R b/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/files/ServiceCheck.R
new file mode 100755
index 0000000..c5ab359
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/files/ServiceCheck.R
@@ -0,0 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+tryCatch({
+  lib_loc <- file.path("/usr/iop/current/r4ml-client" , "R", "lib")
+  .libPaths(c(lib_loc, .libPaths()))
+  lib_loc <- file.path("/usr/iop/current/spark2-client" , "R", "lib")
+  .libPaths(c(lib_loc, .libPaths()))
+  library(R4ML)
+  r4ml.session()
+  r4ml.session.stop()
+}, warnings =  function(w) ifelse(grepl("validateTransformOptions", w), quit(save="no", status=0), quit(save="no", status=1)),
+error = function(e) {print(e); quit(save="no", status=2)})
+quit(save="no", status=0)

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/files/localr.repo
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/files/localr.repo b/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/files/localr.repo
new file mode 100755
index 0000000..d9117db
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/files/localr.repo
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+[RREPO]
+name=RREPO
+baseurl=URLXXXX
+enabled=1
+gpgcheck=0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/scripts/__init__.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/scripts/__init__.py b/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/scripts/__init__.py
new file mode 100755
index 0000000..5561e10
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/scripts/__init__.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/scripts/params.py
new file mode 100755
index 0000000..f23c3b1
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/scripts/params.py
@@ -0,0 +1,80 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+from resource_management import *
+from resource_management.libraries.functions.default import default
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.functions.version import format_stack_version
+from resource_management.libraries.functions import stack_select
+from resource_management.libraries.functions import conf_select
+from resource_management.libraries.functions import StackFeature
+from resource_management.libraries.functions.stack_features import check_stack_feature
+from resource_management.libraries.script.script import Script
+import os
+
+# temp directory
+exec_tmp_dir = Script.get_tmp_dir()
+
+# server configurations
+config = Script.get_config()
+stack_root = Script.get_stack_root()
+
+r4ml_home = format("{stack_root}/current/r4ml-client")
+
+stack_version_unformatted = str(config['hostLevelParams']['stack_version'])
+stack_version = format_stack_version(stack_version_unformatted)
+
+# New Cluster Stack Version that is defined during the RESTART of a Rolling Upgrade
+version = default("/commandParams/version", None)
+stack_name = default("/hostLevelParams/stack_name", None)
+
+java_home = config['hostLevelParams']['java_home']
+r4ml_conf_dir = "/etc/r4ml/conf"
+if stack_version and check_stack_feature(StackFeature.ROLLING_UPGRADE, stack_version):
+  r4ml_conf_dir = format("{stack_root}/current/r4ml-client/conf")
+
+# environment variables
+spark_home = os.path.join(stack_root, "current", 'spark2-client')
+spark_driver_memory = "4G"
+spark_submit_args = "--num-executors 4 sparkr-shell"
+r4ml_auto_start = 0
+Renviron_template = config['configurations']['r4ml-env']['Renviron']
+
+# rpm links
+epel = ""
+centos = ""
+if System.get_instance().os_family == "redhat" :
+  if System.get_instance().os_major_version == "7" :
+    epel = "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"
+    if System.get_instance().machine == "x86_64" :
+      centos = "http://mirror.centos.org/centos/7/os/x86_64/Packages/"
+  else :
+    epel = "https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm"
+    if System.get_instance().machine == "x86_64" :
+      centos = "http://mirror.centos.org/centos/6/os/x86_64/Packages/"
+
+# local R and R packages baseurl
+baseurl = config['configurations']['r4ml-env']['Baseurl for local install of R and R packages dependencies']
+rrepo = "/etc/yum.repos.d/localr.repo"
+
+# systemml jar path
+systemml_jar = os.path.join(stack_root, "current", "systemml-client", "lib", "systemml.jar")
+if not os.path.isfile(systemml_jar) or not os.access(systemml_jar, os.R_OK) :
+  systemml_jar = ""
+
+smokeuser = config['configurations']['cluster-env']['smokeuser']
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/scripts/r4ml_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/scripts/r4ml_client.py b/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/scripts/r4ml_client.py
new file mode 100755
index 0000000..3dbce5c
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/scripts/r4ml_client.py
@@ -0,0 +1,201 @@
+#!/usr/bin/python
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+
+import os
+import subprocess
+from resource_management import *
+from resource_management.libraries.functions import conf_select
+from resource_management.libraries.functions import stack_select
+from resource_management.libraries.functions import StackFeature
+from resource_management.libraries.functions.stack_features import check_stack_feature
+from resource_management.core.exceptions import ClientComponentHasNoStatus
+from resource_management.core.logger import Logger
+
+class R4MLClient(Script):
+
+  def configure(selfself, env):
+    import params
+    env.set_params(params)
+
+  def get_component_name(self):
+    return "r4ml-client"
+
+  def pre_upgrade_restart(self, env, upgrade_type=None):
+    import params
+
+    env.set_params(params)
+    if params.version and check_stack_feature(StackFeature.ROLLING_UPGRADE, params.version):
+      Logger.info("Executing R4ML Client Stack Upgrade pre-restart")
+      conf_select.select(params.stack_name, "r4ml", params.version)
+      stack_select.select("r4ml-client", params.version)
+
+  def stack_upgrade_save_new_config(self, env):
+    import params
+    env.set_params(params)
+
+    conf_select_name = "r4ml"
+    base_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
+    config_dir = self.get_config_dir_during_stack_upgrade(env, base_dir, conf_select_name)
+
+    if config_dir:
+      Logger.info("stack_upgrade_save_new_config(): Calling conf-select on %s using version %s" % (conf_select_name, str(params.version)))
+
+      # Because this script was called from ru_execute_tasks.py which already enters an Environment with its own basedir,
+      # must change it now so this function can find the Jinja Templates for the service.
+      env.config.basedir = base_dir
+      conf_select.select(params.stack_name, conf_select_name, params.version)
+      self.configure(env, config_dir=config_dir)
+
+  def checkPackage(self, packages):
+    try :
+      checked_call("sudo yum list " + packages)
+    except Exception as e:
+      # ignore
+      print e
+      return 1
+    return 0
+
+  def setupEpelRepo(self, params):
+    epel_installed = False
+    import urllib
+    code = 0
+    try :
+      code = subprocess.call(["sudo", "which", "R"])
+    except Exception as e :
+      Logger.error(str(e))
+    if code != 0 :
+      # try to set up R repo
+      code = self.checkPackage("R")
+      if code != 0 :
+        # R does not exist in any repo
+        code = self.checkPackage("epel-release")
+        if code != 0 :
+          if params.epel != "" :
+            # proceed to install EPEL
+            try :
+              urllib.urlretrieve(params.epel, "/tmp/epel.rpm")
+              Execute(("yum", "install", "/tmp/epel.rpm", "-y"), sudo=True)
+              epel_installed = True
+            except Exception as e :
+              Logger.error(str(e))
+              # it is ok to fail to download as it can be an offline install case
+        else :
+          Execute(("yum", "install", "epel-release", "-y"), sudo=True)
+          epel_installed = True
+
+      # check another two dependencies
+      code = self.checkPackage("texinfo-tex texlive-epsf")
+      if code != 0 :
+        # download from centos mirror
+        if params.centos != "" :
+          try :
+            import re
+            urllib.urlretrieve(params.centos, "/tmp/index")
+            s = open("/tmp/index", "r").read()
+            tex = re.search('texinfo-tex(.+)rpm(?=\")', s).group(0)
+            epsf = re.search('texlive-epsf-svn(.+)rpm(?=\")', s).group(0)
+            urllib.urlretrieve(params.centos + tex, "/tmp/tex.rpm")
+            urllib.urlretrieve(params.centos + epsf, "/tmp/epsf.rpm")
+            Execute(("yum", "install", "/tmp/epsf.rpm", "/tmp/tex.rpm", "-y"), sudo=True)
+          except Exception as e :
+            Logger.error(str(e))
+        else :
+          Logger.error("Dependent packages texinfo-tex and texlive-epsf are not found in any repos. Enable RedHat Optional Packages repo or install these two packages manually before retry.")
+          exit(1)
+      # install R now
+      Execute(("yum", "install", "R", "-y"), sudo=True)
+    return epel_installed
+
+  def setupRrepo(self, params):
+    import re
+    if params.baseurl != "http://" :
+      # assume this is a local install
+      File(format(params.rrepo),
+           action="delete")
+
+      File(format(params.rrepo),
+           content = StaticFile("localr.repo"),
+           mode = 0644)
+      Execute(("sed", "-i", "s/URLXXXX/" + re.sub('\$', '\$', re.sub('/', '\/', params.baseurl)) + "/g ", params.rrepo),
+              sudo=True)
+      Logger.info("Local install R from %s." %params.baseurl)
+      # install R now
+      Execute(("yum", "install", "R", "-y"), sudo=True)
+      return False
+    else :
+      return self.setupEpelRepo(params)
+
+  def install(self, env):
+    import params
+    env.set_params(params)
+
+    # set up R repo
+    epel_installed = self.setupRrepo(params)
+
+    # install R and R4ML
+    self.install_packages(env)
+
+    # remove epel-release repo installed above as R has been installed
+    if epel_installed :
+      Execute(("yum", "remove", "epel-release", "-y"), sudo=True)
+    else :
+      if (os.path.exists(params.rrepo)) :
+        File(format(params.rrepo),
+             action="delete")
+
+    # install several R packages that will be used by R4ML functions
+    installR = params.exec_tmp_dir + "/Install.R"
+    File(format(installR),
+         content = StaticFile("Install.R"),
+         mode = 0755)
+
+    if (params.baseurl != "http://"):
+      import re
+      Execute(("sed", "-i", "s/repos=c(.*/repos=c(\"" + re.sub('\$', '\$', re.sub('/', '\/', params.baseurl)) + "\"))/g", installR), sudo=True)
+
+    # install the dependent packages
+    packages = ["R6", "uuid", "survival"]
+    for pkg in packages :
+      Execute(("Rscript", installR, pkg), sudo=True)
+
+    # set up configuration file
+    Directory(params.r4ml_conf_dir,
+              create_parents=True,
+              action="create",
+              mode=0755)
+
+    File(format("{r4ml_conf_dir}/Renviron"),
+         mode=0755,
+         content = InlineTemplate(params.Renviron_template))
+
+    # install R4ML package to /usr/iop/current/r4ml-client/R/lib directory
+    Directory(format(params.r4ml_home + "/R/lib"),
+              action="create",
+              create_parents=True,
+              mode=0755)
+
+    checked_call(format("sudo R_LIBS={spark_home}/R/lib R CMD INSTALL --install-tests --library={r4ml_home}/R/lib {r4ml_home}/R4ML_*.tar.gz"))
+
+  def status(self, env):
+    raise ClientComponentHasNoStatus()
+
+if __name__ == "__main__":
+  R4MLClient().execute()
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/scripts/service_check.py
new file mode 100755
index 0000000..2acb4d2
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/R4ML/0.8.0/package/scripts/service_check.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+
+from resource_management import *
+from resource_management.libraries.functions.format import format
+import subprocess
+import os
+
+class R4MLServiceCheck(Script):
+    def service_check(self, env):
+        import params
+        env.set_params(params)
+
+        # generate the service check file
+        scR = os.path.join(params.exec_tmp_dir, "ServiceCheck.R")
+        File(format(scR),
+             content = StaticFile("ServiceCheck.R"),
+             mode = 0755)
+
+        Execute(("Rscript", scR),
+                tries=120,
+                try_sleep=20,
+                path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin',
+                logoutput=True,
+                user=params.smokeuser)
+
+if __name__ == "__main__":
+    R4MLServiceCheck().execute()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/SYSTEMML/0.10.0/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SYSTEMML/0.10.0/metainfo.xml b/ambari-server/src/main/resources/common-services/SYSTEMML/0.10.0/metainfo.xml
new file mode 100755
index 0000000..ecd503f
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/SYSTEMML/0.10.0/metainfo.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<metainfo>
+  <schemaVersion>2.0</schemaVersion>
+  <services>
+    <service>
+      <name>SYSTEMML</name>
+      <displayName>SystemML</displayName>
+      <comment>Apache SystemML is a distributed and declarative machine learning platform.</comment>
+      <version>0.10.0</version>
+      <components>
+        <component>
+          <name>SYSTEMML</name>
+          <displayName>SystemML</displayName>
+          <category>CLIENT</category>
+          <cardinality>0+</cardinality>
+          <versionAdvertised>true</versionAdvertised>
+          <dependencies>
+            <dependency>
+              <name>HDFS/HDFS_CLIENT</name>
+              <scope>host</scope>
+              <auto-deploy>
+                <enabled>true</enabled>
+              </auto-deploy>
+            </dependency>
+          </dependencies>
+          <commandScript>
+            <script>scripts/systemml_client.py</script>
+            <scriptType>PYTHON</scriptType>
+            <timeout>600</timeout>
+          </commandScript>
+          <configFiles>
+          </configFiles>          
+        </component>
+      </components>
+      <osSpecifics>
+        <osSpecific>
+          <osFamily>any</osFamily>
+          <packages>
+            <package>
+              <name>apache_systemml*</name>
+            </package>
+          </packages>
+        </osSpecific>
+      </osSpecifics>
+
+      <commandScript>
+        <script>scripts/service_check.py</script>
+        <scriptType>PYTHON</scriptType>
+        <timeout>300</timeout>
+      </commandScript>
+
+      <requiredServices>
+        <service>HDFS</service>
+      </requiredServices>
+
+      <configuration-dependencies>
+      </configuration-dependencies>
+
+    </service>
+  </services>
+</metainfo>

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/SYSTEMML/0.10.0/package/scripts/__init__.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SYSTEMML/0.10.0/package/scripts/__init__.py b/ambari-server/src/main/resources/common-services/SYSTEMML/0.10.0/package/scripts/__init__.py
new file mode 100755
index 0000000..5561e10
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/SYSTEMML/0.10.0/package/scripts/__init__.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/SYSTEMML/0.10.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SYSTEMML/0.10.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/SYSTEMML/0.10.0/package/scripts/params.py
new file mode 100755
index 0000000..dd7e46c
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/SYSTEMML/0.10.0/package/scripts/params.py
@@ -0,0 +1,40 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+from resource_management.libraries.functions.default import default
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.functions.version import format_stack_version
+from resource_management.libraries.functions import stack_select
+from resource_management.libraries.script.script import Script
+
+# server configurations
+config = Script.get_config()
+stack_root = Script.get_stack_root()
+
+systemml_home_dir = format("{stack_root}/current/systemml-client")
+systemml_lib_dir = format("{systemml_home_dir}/lib")
+systemml_scripts_dir = format("{systemml_home_dir}/scripts")
+
+stack_version_unformatted = str(config['hostLevelParams']['stack_version'])
+stack_version = format_stack_version(stack_version_unformatted)
+
+# New Cluster Stack Version that is defined during the RESTART of a Rolling Upgrade
+version = default("/commandParams/version", None)
+stack_name = default("/hostLevelParams/stack_name", None)
+
+java_home = config['hostLevelParams']['java_home']

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/SYSTEMML/0.10.0/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SYSTEMML/0.10.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/SYSTEMML/0.10.0/package/scripts/service_check.py
new file mode 100755
index 0000000..c15b907
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/SYSTEMML/0.10.0/package/scripts/service_check.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+
+from resource_management import *
+from resource_management.libraries.functions.format import format
+import subprocess
+import os
+
+class SystemMLServiceCheck(Script):
+    def service_check(self, env):
+        import params
+        env.set_params(params)
+        
+        if os.path.exists(params.systemml_lib_dir):
+            cp = format("{params.stack_root}/current/hadoop-client/*:{params.stack_root}/current/hadoop-mapreduce-client/*:{params.stack_root}/current/hadoop-client/lib/*:{params.systemml_lib_dir}/systemml.jar")
+            java = format("{params.java_home}/bin/java")
+            command = [java, "-cp", cp, "org.apache.sysml.api.DMLScript", "-s", "print('Apache SystemML');"]
+            process = subprocess.Popen(command, stdout=subprocess.PIPE)
+            output = process.communicate()[0]
+            print output
+        
+            if 'Apache SystemML' not in output:
+                raise Fail("Expected output Apache SystemML not found.")
+
+if __name__ == "__main__":
+    SystemMLServiceCheck().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/SYSTEMML/0.10.0/package/scripts/systemml_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SYSTEMML/0.10.0/package/scripts/systemml_client.py b/ambari-server/src/main/resources/common-services/SYSTEMML/0.10.0/package/scripts/systemml_client.py
new file mode 100755
index 0000000..2d45b68
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/SYSTEMML/0.10.0/package/scripts/systemml_client.py
@@ -0,0 +1,49 @@
+#!/usr/bin/python
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+
+import sys
+from resource_management import *
+#from resource_management.libraries.functions import conf_select
+from resource_management.libraries.functions import stack_select
+
+
+class SystemMLClient(Script):
+
+  def get_component_name(self):
+    return "systemml-client"
+
+  def pre_upgrade_restart(self, env, upgrade_type=None):
+    import params
+
+    env.set_params(params)
+    if params.version and check_stack_feature(StackFeature.ROLLING_UPGRADE, params.version):
+      #conf_select.select(params.stack_name, "systemml", params.version)
+      stack_select.select("systemml-client", params.version)
+
+  def install(self, env):
+    self.install_packages(env)
+
+  def status(self, env):
+    raise ClientComponentHasNoStatus()
+
+
+if __name__ == "__main__":
+  SystemMLClient().execute()
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/TITAN/1.0.0/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/TITAN/1.0.0/alerts.json b/ambari-server/src/main/resources/common-services/TITAN/1.0.0/alerts.json
new file mode 100755
index 0000000..5afab9c
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/TITAN/1.0.0/alerts.json
@@ -0,0 +1,33 @@
+ {
+  "TITAN": {
+    "TITAN_SERVER": [
+      {
+        "name": "titan",
+        "label": "titan server",
+        "description": "This host-level alert is triggered if the Titan Server Instance is unreachable.",
+        "interval": 1,
+        "scope": "ANY",
+        "source": {
+          "type": "SCRIPT",
+	  "path": "TITAN/1.0.0/package/alerts/alert_check_titan_server.py",
+	  "parameters": [
+            {
+              "name": "titan.run.dir",
+              "display_name": "Run Directory",
+              "value": "/var/run/titan",
+              "type": "STRING",
+              "description": "The directory where titan server processe place its PID files."
+            },
+	    {
+              "name": "titan.user",
+              "display_name": "Titan User",
+              "value": "titan",
+              "type": "STRING",
+              "description": "User who starts the Titan Server process"
+            }
+          ]
+        }
+      }
+    ]
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/TITAN/1.0.0/configuration/gremlin-server.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/TITAN/1.0.0/configuration/gremlin-server.xml b/ambari-server/src/main/resources/common-services/TITAN/1.0.0/configuration/gremlin-server.xml
new file mode 100755
index 0000000..1b33e6a
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/TITAN/1.0.0/configuration/gremlin-server.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+<configuration supports_final="false" supports_adding_forbidden="true">
+
+  <property>
+    <name>content</name>
+    <description>Configuration for Titan Server</description>
+    <value>
+host: {{titan_host}}
+port: {{titan_server_port}}
+threadPoolWorker: 1
+gremlinPool: 8
+scriptEvaluationTimeout: 300000
+serializedResponseTimeout: 300000
+channelizer: org.apache.tinkerpop.gremlin.server.channel.HttpChannelizer
+graphs: {
+  graph: conf/titan-hbase-solr.properties,
+  graphSpark: conf/hadoop-graph/hadoop-gryo.properties}
+plugins:
+  - aurelius.titan
+  - tinkerpop.spark
+  - tinkerpop.hadoop
+  - tinkerpop.tinkergraph
+scriptEngines: {
+  gremlin-groovy: {
+    imports: [java.lang.Math],
+    staticImports: [java.lang.Math.PI],
+    scripts: [scripts/empty-sample.groovy]},
+  nashorn: {
+      imports: [java.lang.Math],
+      staticImports: [java.lang.Math.PI]}}
+serializers:
+  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { useMapperFromGraph: graph }}
+  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { serializeResultToString: true }}
+  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0, config: { useMapperFromGraph: graph }}
+  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, config: { useMapperFromGraph: graph }}
+processors:
+  - { className: org.apache.tinkerpop.gremlin.server.op.session.SessionOpProcessor, config: { sessionTimeout: 28800000 }}
+metrics: {
+  consoleReporter: {enabled: true, interval: 180000},
+  csvReporter: {enabled: true, interval: 180000, fileName: /tmp/gremlin-server-metrics.csv},
+  jmxReporter: {enabled: true},
+  slf4jReporter: {enabled: true, interval: 180000},
+  gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
+  graphiteReporter: {enabled: false, interval: 180000}}
+threadPoolBoss: 1
+maxInitialLineLength: 4096
+maxHeaderSize: 8192
+maxChunkSize: 8192
+maxContentLength: 65536
+maxAccumulationBufferComponents: 1024
+resultIterationBatchSize: 64
+writeBufferHighWaterMark: 32768
+writeBufferHighWaterMark: 65536
+ssl: {
+  enabled: {{titan_server_ssl}}{{titan_server_ssl_key_file}}{{titan_server_ssl_key_password}}{{titan_server_ssl_key_cert_file}}
+}
+{{titan_server_simple_authenticator}}
+    </value>
+    <value-attributes>
+      <show-property-name>false</show-property-name>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/TITAN/1.0.0/configuration/hadoop-gryo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/TITAN/1.0.0/configuration/hadoop-gryo.xml b/ambari-server/src/main/resources/common-services/TITAN/1.0.0/configuration/hadoop-gryo.xml
new file mode 100755
index 0000000..677fa2d
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/TITAN/1.0.0/configuration/hadoop-gryo.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<configuration supports_final="false" supports_adding_forbidden="true">
+
+  <property>
+    <name>content</name>
+    <description>Configuration of hadoop-gryo.properties</description>
+    <value>
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+gremlin.graph=org.apache.tinkerpop.gremlin.hadoop.structure.HadoopGraph
+gremlin.hadoop.graphInputFormat=org.apache.tinkerpop.gremlin.hadoop.structure.io.gryo.GryoInputFormat
+gremlin.hadoop.graphOutputFormat=org.apache.tinkerpop.gremlin.hadoop.structure.io.gryo.GryoOutputFormat
+gremlin.hadoop.jarsInDistributedCache=true
+
+gremlin.hadoop.inputLocation=data/tinkerpop-modern.kryo
+gremlin.hadoop.outputLocation=output
+
+#####################################
+# GiraphGraphComputer Configuration #
+#####################################
+giraph.minWorkers=2
+giraph.maxWorkers=2
+giraph.useOutOfCoreGraph=true
+giraph.useOutOfCoreMessages=true
+mapred.map.child.java.opts=-Xmx1024m
+mapred.reduce.child.java.opts=-Xmx1024m
+giraph.numInputThreads=4
+giraph.numComputeThreads=4
+# giraph.maxPartitionsInMemory=1
+# giraph.userPartitionCount=2
+
+####################################
+# SparkGraphComputer Configuration #
+####################################
+spark.master=yarn
+spark.submit.deployMode=client
+spark.yarn.jars={{default_fs}}/user/spark/share/lib/spark/*.jar
+
+# the Spark YARN ApplicationManager needs this to resolve classpath it sends to the executors
+spark.yarn.appMasterEnv.JAVA_HOME={{java64_home}}
+spark.yarn.appMasterEnv.HADOOP_CONF_DIR={{hadoop_config_dir}}
+spark.yarn.appMasterEnv.SPARK_CONF_DIR={{spark_config_dir}}
+spark.yarn.am.extraJavaOptions=-Diop.version={{full_stack_version}} -Djava.library.path={{hadoop_lib_native_dir}}
+
+# the Spark Executors (on the work nodes) needs this to resolve classpath to run Spark tasks
+spark.executorEnv.JAVA_HOME={{java64_home}}
+spark.executorEnv.HADOOP_CONF_DIR={{hadoop_config_dir}}
+spark.executorEnv.SPARK_CONF_DIR={{spark_config_dir}}
+spark.executor.memory=2g
+spark.executor.extraClassPath={{hbase_config_dir}}
+spark.serializer=org.apache.spark.serializer.KryoSerializer
+    </value>
+    <value-attributes>
+      <show-property-name>false</show-property-name>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/TITAN/1.0.0/configuration/hadoop-hbase-read.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/TITAN/1.0.0/configuration/hadoop-hbase-read.xml b/ambari-server/src/main/resources/common-services/TITAN/1.0.0/configuration/hadoop-hbase-read.xml
new file mode 100755
index 0000000..10b1d99
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/TITAN/1.0.0/configuration/hadoop-hbase-read.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<configuration supports_final="false" supports_adding_forbidden="true">
+
+  <property>
+    <name>content</name>
+    <description>Configuration of hadoop-hbase-read.properties</description>
+    <value>
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+gremlin.graph=org.apache.tinkerpop.gremlin.hadoop.structure.HadoopGraph
+gremlin.hadoop.graphInputFormat=com.thinkaurelius.titan.hadoop.formats.hbase.HBaseInputFormat
+gremlin.hadoop.graphOutputFormat=org.apache.hadoop.mapreduce.lib.output.NullOutputFormat
+gremlin.hadoop.jarsInDistributedCache=true
+gremlin.hadoop.deriveMemory=false
+gremlin.hadoop.memoryOutputFormat=org.apache.hadoop.mapreduce.lib.output.SequenceFileOutputFormat
+
+gremlin.hadoop.inputLocation=none
+gremlin.hadoop.outputLocation=output
+
+titanmr.ioformat.conf.storage.backend=hbase
+titanmr.ioformat.conf.storage.hbase.table=titan_solr
+titanmr.ioformat.conf.storage.hostname={{storage_host}}
+zookeeper.znode.parent={{hbase_zookeeper_parent}}
+
+#####################################
+# GiraphGraphComputer Configuration #
+#####################################
+giraph.minWorkers=2
+giraph.maxWorkers=2
+giraph.useOutOfCoreGraph=true
+giraph.useOutOfCoreMessages=true
+mapred.map.child.java.opts=-Xmx1024m
+mapred.reduce.child.java.opts=-Xmx1024m
+giraph.numInputThreads=4
+giraph.numComputeThreads=4
+# giraph.maxPartitionsInMemory=1
+# giraph.userPartitionCount=2
+
+####################################
+# SparkGraphComputer Configuration #
+####################################
+spark.master=yarn
+spark.submit.deployMode=client
+spark.yarn.jars={{default_fs}}/user/spark/share/lib/spark/*.jar
+
+# the Spark YARN ApplicationManager needs this to resolve classpath it sends to the executors
+spark.yarn.appMasterEnv.JAVA_HOME={{java64_home}}
+spark.yarn.appMasterEnv.HADOOP_CONF_DIR={{hadoop_config_dir}}
+spark.yarn.appMasterEnv.SPARK_CONF_DIR={{spark_config_dir}}
+spark.yarn.am.extraJavaOptions=-Diop.version={{full_stack_version}} -Djava.library.path={{hadoop_lib_native_dir}}
+
+# the Spark Executors (on the work nodes) needs this to resolve classpath to run Spark tasks
+spark.executorEnv.JAVA_HOME={{java64_home}}
+spark.executorEnv.HADOOP_CONF_DIR={{hadoop_config_dir}}
+spark.executorEnv.SPARK_CONF_DIR={{spark_config_dir}}
+spark.executor.memory=2g
+spark.executor.extraClassPath={{hbase_config_dir}}
+
+spark.serializer=org.apache.spark.serializer.KryoSerializer
+    </value>
+    <value-attributes>
+      <show-property-name>false</show-property-name>
+    </value-attributes>
+    <on-ambari-upgrade add="false"/>
+  </property>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/TITAN/1.0.0/configuration/titan-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/TITAN/1.0.0/configuration/titan-env.xml b/ambari-server/src/main/resources/common-services/TITAN/1.0.0/configuration/titan-env.xml
new file mode 100755
index 0000000..9611764
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/TITAN/1.0.0/configuration/titan-env.xml
@@ -0,0 +1,157 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<configuration supports_final="false">
+
+  <property>
+    <name>titan_user</name>
+    <display-name>Titan User</display-name>
+    <description>User to run Titan as</description>
+    <property-type>USER</property-type>
+    <value>titan</value>
+    <on-ambari-upgrade add="false"/>
+  </property>
+
+  <property>
+    <name>titan_pid_dir</name>
+    <value>/var/run/titan</value>
+    <on-ambari-upgrade add="false"/>
+  </property>
+
+  <property>
+    <name>titan_log_dir</name>
+    <value>/var/log/titan</value>
+    <on-ambari-upgrade add="false"/>
+  </property>
+
+  <property>
+    <name>titan_server_port</name>
+    <value>8182</value>
+    <description>Sets the port Titan Server binds to, default is 8182</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+
+  <property>
+    <name>titan_hdfs_home_dir</name>
+    <value>/apps/titan/data</value>
+    <description>A root location in HDFS for Titan to write collection data to. Rather than specifying an HDFS location for the data directory or update log directory, use this to specify one root location and have everything automatically created within this HDFS</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>SimpleAuthenticator</name>
+    <value>false</value>
+    <value-attributes>
+      <type>boolean</type>
+    </value-attributes>
+    <description>Set whether to enable SimpleAuthenticator(PLAIN SASL), the credentials database is located at /usr/iop/current/titan-client/data/credentials.kryo. Note: this option will not take effect if Knox is installed.</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ssl.enabled</name>
+    <value>false</value>
+    <value-attributes>
+      <type>boolean</type>
+    </value-attributes>
+    <description>Set whether to enable ssl</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ssl.keyCertChainFile</name>
+    <value/>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <description>The X.509 certificate chain file in PEM format. If this value is not present and ssl.enabled is true a self-signed certificate will be used (not suitable for production).</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ssl.keyFile</name>
+    <value/>
+    <value-attributes>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <description>The PKCS#8 private key file in PEM format. If this value is not present and ssl.enabled is true a self-signed certificate will be used (not suitable for production).</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>ssl.keyPassword</name>
+    <value/>
+    <property-type>PASSWORD</property-type>
+    <value-attributes>
+      <type>password</type>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+    <description>The password of the keyFile if it's not password-protected.</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
+    <name>content</name>
+    <display-name>titan-env template</display-name>
+    <description>This is the template for titan-env.sh file</description>
+    <on-ambari-upgrade add="false"/>
+    <value>
+# Set JAVA HOME
+export JAVA_HOME={{java64_home}}
+
+# Add hadoop configuration directory into classpath
+export HADOOP_CONF_DIR={{hadoop_config_dir}}
+
+
+# Setup the environment for SparkGraphComputer
+# Add yarn and spark lib and config into classpath for SparkGraphComputer.
+export YARN_HOME={{yarn_home_dir}}
+export YARN_CONF_DIR=$HADOOP_CONF_DIR
+export SPARK_HOME={{spark_home_dir}}
+export SPARK_CONF_DIR={{spark_config_dir}}
+export TITAN_HOME={{titan_home_dir}}
+export CLASSPATH=$CLASSPATH:$HADOOP_CONF_DIR:$SPARK_CONF_DIR:$TITAN_HOME/conf
+
+#add hbase configuration directory into classpath
+if ([ -d "{{hbase_config_dir}}" ]); then
+   export HBASE_CONF_DIR={{hbase_config_dir}}
+   export CLASSPATH=$CLASSPATH:$HBASE_CONF_DIR
+fi
+
+if ([[ ! -d "{{titan_ext_spark_plugin_dir}}" ]] &amp;&amp; [[ -d "$SPARK_HOME/jars" ]]); then
+  for jar in $SPARK_HOME/jars/*.jar; do
+    if ([[ $jar != */guava*.jar ]] &amp;&amp; [[ $jar != */slf4j-log4j12*.jar ]] &amp;&amp; [[ $jar != */spark-core*.jar ]]) ;then
+      CLASSPATH=$CLASSPATH:$jar
+    fi
+  done
+fi
+
+export CLASSPATH
+
+# Add iop.version and native lib in java opt for hadoop config.
+export IOP_JAVA_OPTIONS="$JAVA_OPTIONS -D{{platform_name}}.version={{full_stack_version}} -Djava.library.path={{hadoop_lib_native_dir}}"
+
+{% if security_enabled -%}
+export JVMFLAGS="-Djava.security.auth.login.config={{titan_solr_client_jaas_file}}"
+export IOP_JAVA_OPTIONS="$IOP_JAVA_OPTIONS $JVMFLAGS"
+{% endif %}
+
+source "$HADOOP_CONF_DIR"/hadoop-env.sh
+export HADOOP_GREMLIN_LIBS=$TITAN_HOME/lib
+export TITAN_LOGDIR={{titan_log_dir}}
+    </value>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/TITAN/1.0.0/configuration/titan-hbase-solr.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/TITAN/1.0.0/configuration/titan-hbase-solr.xml b/ambari-server/src/main/resources/common-services/TITAN/1.0.0/configuration/titan-hbase-solr.xml
new file mode 100755
index 0000000..49e3f80
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/TITAN/1.0.0/configuration/titan-hbase-solr.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<configuration supports_final="false" supports_adding_forbidden="true">
+
+  <property>
+    <name>content</name>
+    <description>Describe the configurations for Solr</description>
+    <on-ambari-upgrade add="false"/>
+    <value># Titan configuration sample: HBase and Solr
+# ATTENTION: If you would like to use this property, do manually execute titan-solr-connection.sh before build index.
+
+# This file connects to HBase using a Zookeeper quorum
+# (storage.hostname) consisting solely of localhost. It also
+# connects to Solr running on localhost using Solr's HTTP API.
+# Zookeeper, the HBase services, and Solr must already be
+# running and available before starting Titan with this file.
+gremlin.graph=com.thinkaurelius.titan.core.TitanFactory
+storage.backend=hbase
+storage.hostname={{storage_host}}
+storage.hbase.table=titan_solr
+storage.hbase.ext.zookeeper.znode.parent={{hbase_zookeeper_parent}}
+
+cache.db-cache = true
+cache.db-cache-clean-wait = 20
+cache.db-cache-time = 180000
+cache.db-cache-size = 0.5
+
+# The indexing backend used to extend and optimize Titan's query
+# functionality. This setting is optional. Titan can use multiple
+# heterogeneous index backends. Hence, this option can appear more than
+# once, so long as the user-defined name between "index" and "backend" is
+# unique among appearances.Similar to the storage backend, this should be
+# set to one of Titan's built-in shorthand names for its standard index
+# backends (shorthands: lucene, elasticsearch, es, solr) or to the full
+# package and classname of a custom/third-party IndexProvider
+# implementation.
+
+index.search.backend=solr
+index.search.solr.mode=cloud
+index.search.solr.zookeeper-url={{zookeeper_solr_for_titan_hostname}}
+index.search.solr.configset=titan
+{{titan_solr_client_jaas_config}}
+    </value>
+    <value-attributes>
+      <show-property-name>false</show-property-name>
+    </value-attributes>
+  </property>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/TITAN/1.0.0/configuration/titan-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/TITAN/1.0.0/configuration/titan-log4j.xml b/ambari-server/src/main/resources/common-services/TITAN/1.0.0/configuration/titan-log4j.xml
new file mode 100755
index 0000000..c32a9e4
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/TITAN/1.0.0/configuration/titan-log4j.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<configuration supports_final="false">
+
+  <property>
+    <name>content</name>
+    <description>Custom log4j-console.properties</description>
+    <on-ambari-upgrade add="false"/>
+    <value>
+      # Used by gremlin.sh
+
+      log4j.appender.A2=org.apache.log4j.ConsoleAppender
+      log4j.appender.A2.Threshold=TRACE
+      log4j.appender.A2.layout=org.apache.log4j.PatternLayout
+      log4j.appender.A2.layout.ConversionPattern=%d{HH:mm:ss} %-5p %c %x - %m%n
+      log4j.rootLogger=${gremlin.log4j.level}, A2
+
+      #log4j.logger.com.thinkaurelius.titan.graphdb.database.idassigner.placement=DEBUG
+      #log4j.logger.com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager=DEBUG
+
+      # Disable spurious Hadoop config deprecation warnings under 2.2.0.
+      #
+      # See https://issues.apache.org/jira/browse/HADOOP-10178
+      #
+      # This can and should be deleted when we upgrade our Hadoop 2.2.0
+      # dependency to 2.3.0 or 3.0.0.
+      log4j.logger.org.apache.hadoop.conf.Configuration.deprecation=OFF
+
+      # Configure MR at its own loglevel. We usually want MR at INFO,
+      # even if the rest of the loggers are at WARN or ERROR or FATAL,
+      # because job progress information is at INFO.
+      log4j.logger.org.apache.hadoop.mapred=${gremlin.mr.log4j.level}
+      log4j.logger.org.apache.hadoop.mapreduce=${gremlin.mr.log4j.level}
+
+      # This generates 3 INFO lines per jar on the classpath -- usually more
+      # noise than desirable in the REPL. Switching it to the default
+      # log4j level means it will be at WARN by default, which is ideal.
+      log4j.logger.org.apache.hadoop.mapred.LocalDistributedCacheManager=${gremlin.log4j.level}
+    </value>
+    <value-attributes>
+      <show-property-name>false</show-property-name>
+    </value-attributes>
+  </property>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/TITAN/1.0.0/kerberos.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/TITAN/1.0.0/kerberos.json b/ambari-server/src/main/resources/common-services/TITAN/1.0.0/kerberos.json
new file mode 100755
index 0000000..a25382e
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/TITAN/1.0.0/kerberos.json
@@ -0,0 +1,52 @@
+{
+  "services": [
+    {
+      "name": "TITAN",
+      "components": [
+        {
+          "name": "TITAN_SERVER",
+          "identities": [
+            {
+              "name": "titan_principal",
+              "principal": {
+                "value": "${titan-env/titan_user}/_HOST@${realm}",
+                "type" : "service",
+                "configuration": "titan-env/titan_principal_name",
+                "local_username": "${titan-env/titan_user}"
+
+              },
+              "keytab": {
+                "file": "${keytab_dir}/titan.service.keytab",
+                "owner": {
+                  "name": "${titan-env/titan_user}",
+                  "access": "r"
+                },
+                "group": {
+                  "name": "${cluster-env/user_group}",
+                  "access": ""
+                },
+                "configuration": "titan-env/titan_keytab_path"
+              }
+            }
+          ]
+        },
+        {
+          "name": "TITAN_CLIENT",
+          "identities": [
+            {
+              "name": "/HDFS/NAMENODE/hdfs"
+            }
+          ]
+        }
+      ],
+      "configurations": [
+        {
+          "core-site": {
+            "hadoop.proxyuser.titan.groups": "${hadoop-env/proxyuser_group}",
+            "hadoop.proxyuser.titan.hosts": "*"
+          }
+        }
+      ]
+    }
+  ]
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/TITAN/1.0.0/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/TITAN/1.0.0/metainfo.xml b/ambari-server/src/main/resources/common-services/TITAN/1.0.0/metainfo.xml
new file mode 100755
index 0000000..75696c1
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/TITAN/1.0.0/metainfo.xml
@@ -0,0 +1,124 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<metainfo>
+  <schemaVersion>2.0</schemaVersion>
+  <services>
+    <service>
+      <name>TITAN</name>
+      <displayName>Titan</displayName>
+      <comment>Titan is a scalable graph database optimized for storing and querying graphs containing hundreds of
+        billions of vertices and edges distributed across a multi-machine cluster.</comment>
+      <version>1.0.0</version>
+      <components>
+        <component>
+          <name>TITAN_SERVER</name>
+          <displayName>Titan Server</displayName>
+          <category>MASTER</category>
+          <cardinality>1</cardinality>
+          <commandScript>
+            <script>scripts/titan_server.py</script>
+            <scriptType>PYTHON</scriptType>
+            <timeout>600</timeout>
+          </commandScript>
+          <configFiles>
+            <configFile>
+              <type>yaml</type>
+              <fileName>gremlin-server.yaml</fileName>
+              <dictionaryName>gremlin-server</dictionaryName>
+            </configFile>
+          </configFiles>
+        </component>
+        <component>
+          <name>TITAN_CLIENT</name>
+          <displayName>Titan Client</displayName>
+          <category>CLIENT</category>
+          <cardinality>0+</cardinality>
+          <versionAdvertised>true</versionAdvertised>
+          <commandScript>
+            <script>scripts/titan_client.py</script>
+            <scriptType>PYTHON</scriptType>
+	        <timeout>600</timeout>
+          </commandScript>
+          <configFiles>
+            <configFile>
+               <type>env</type>
+               <fileName>titan-env.sh</fileName>
+               <dictionaryName>titan-env</dictionaryName>
+            </configFile>
+            <configFile>
+                <type>env</type>
+                <fileName>log4j-console.properties</fileName>
+                <dictionaryName>titan-log4j</dictionaryName>
+            </configFile>
+            <configFile>
+                <type>env</type>
+                <fileName>titan-hbase-solr.properties</fileName>
+                <dictionaryName>titan-hbase-solr</dictionaryName>
+            </configFile>
+            <configFile>
+              <type>env</type>
+              <fileName>hadoop-gryo.properties</fileName>
+              <dictionaryName>hadoop-gryo</dictionaryName>
+            </configFile>
+            <configFile>
+              <type>env</type>
+              <fileName>hadoop-hbase-read.properties</fileName>
+              <dictionaryName>hadoop-hbase-read</dictionaryName>
+            </configFile>
+          </configFiles>
+        </component>
+      </components>
+      <osSpecifics>
+        <osSpecific>
+          <osFamily>any</osFamily>
+          <packages>
+            <package>
+              <name>titan</name>
+            </package>
+	        <package>
+	          <name>ambari-infra-solr-client-*</name>
+	        </package>
+          </packages>
+        </osSpecific>
+      </osSpecifics>
+
+      <commandScript>
+        <script>scripts/service_check.py</script>
+        <scriptType>PYTHON</scriptType>
+        <timeout>300</timeout>
+      </commandScript>
+
+      <requiredServices>		
+        <service>HDFS</service>
+        <service>HBASE</service>
+        <service>SOLR</service>
+        <service>SPARK2</service>
+      </requiredServices>
+      
+      <configuration-dependencies>
+	<config-type>gremlin-server</config-type>
+        <config-type>titan-env</config-type>
+        <config-type>titan-hbase-solr</config-type>
+        <config-type>titan-log4j</config-type>
+        <config-type>hadoop-gryo</config-type>
+        <config-type>hadoop-hbase-read</config-type>
+	<config-type>knox-env</config-type>
+      </configuration-dependencies>
+    </service>
+  </services>
+</metainfo>

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/TITAN/1.0.0/package/alerts/alert_check_titan_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/TITAN/1.0.0/package/alerts/alert_check_titan_server.py b/ambari-server/src/main/resources/common-services/TITAN/1.0.0/package/alerts/alert_check_titan_server.py
new file mode 100755
index 0000000..8342c51
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/TITAN/1.0.0/package/alerts/alert_check_titan_server.py
@@ -0,0 +1,65 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+
+from resource_management.core.resources import Execute
+from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
+from resource_management.libraries.functions import format
+
+RESULT_CODE_OK = 'OK'
+RESULT_CODE_CRITICAL = 'CRITICAL'
+RESULT_CODE_UNKNOWN = 'UNKNOWN'
+STACK_ROOT = '{{cluster-env/stack_root}}'
+TITAN_RUN_DIR = 'titan.run.dir'
+TITAN_USER = 'titan.user'
+@OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT)
+def execute(configurations={}, parameters={}, host_name=None):
+  """
+  Returns a tuple containing the result code and a pre-formatted result label
+
+  Keyword arguments:
+  configurations (dictionary): a mapping of configuration key to value
+  parameters (dictionary): a mapping of script parameter key to value
+  host_name (string): the name of this host where the alert is running
+  """
+  titan_bin_dir = configurations[STACK_ROOT] + format("/current/titan-server/bin")
+
+  gremlin_server_script_path = titan_bin_dir + format("/gremlin-server-script.sh")
+  
+  titan_pid_file = parameters[TITAN_RUN_DIR] + format("/titan.pid")
+  titan_user = parameters[TITAN_USER]
+  (code, msg) = get_check_result(gremlin_server_script_path, titan_pid_file, titan_user)
+  return (code, msg)
+
+@OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT)
+def get_tokens():
+  """
+  Returns a tuple of tokens in the format {{site/property}} that will be used
+  to build the dictionary passed into execute
+  """
+  return (STACK_ROOT, TITAN_RUN_DIR)
+
+def get_check_result(gremlin_server_script_path, titan_pid_file, titan_user):
+  cmd = format("{gremlin_server_script_path} status {titan_pid_file}")
+  try:
+    result = Execute(cmd,
+                     user=titan_user
+                     )
+    return (RESULT_CODE_OK, ["titan server is up and running"])
+  except Exception, ex:
+    return (RESULT_CODE_CRITICAL, [ex])
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/TITAN/1.0.0/package/files/gremlin-server-script.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/TITAN/1.0.0/package/files/gremlin-server-script.sh b/ambari-server/src/main/resources/common-services/TITAN/1.0.0/package/files/gremlin-server-script.sh
new file mode 100755
index 0000000..97aa897
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/TITAN/1.0.0/package/files/gremlin-server-script.sh
@@ -0,0 +1,86 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Init script for Gremlin Server so it automatically starts/stops with the machine.
+#
+# To install:
+# 1)  Add a symlink to this file in /etc/init.d/ under the name you'd like to see the service
+#     For example, to name the service "gremlin-server": ln -s /usr/local/packages/dynamodb-titan100-storage-backend-1.0.0-hadoop1/bin/gremlin-server-service.sh /etc/init.d/gremlin-server
+# 2a) If you're running RH: chkconfig --add gremlin-server
+# 2b) If you're running Ubuntu: update-rc.d gremlin-server defaults
+#
+# You have to SET the Gremlin Server installation directory here:
+PID_FILE=$2
+GREMLIN_SERVER_LOG_FILE=$3
+GREMLIN_SERVER_ERR_FILE=$4
+GREMLIN_SERVER_BIN_DIR=$5
+GREMLIN_SERVER_CONF_DIR=$6
+
+
+usage() {
+  echo "Usage: `basename $0`: start|stop|status"
+  exit 1
+}
+
+status() {
+  echo "get program status"
+  local pid
+  if [[ -f "$PID_FILE" && -s "$PID_FILE" ]]; then
+  	#statements
+        pid=$(cat $PID_FILE)
+  	if kill -0 $pid > /dev/null 2>&1; then
+  		# pid exists
+                echo "program is running"
+  		return 0
+  	fi
+  else
+  	echo "program is not running"
+  fi
+  return 1
+}
+
+start() {
+  if ! status ; then
+      echo "start program"
+      /usr/bin/nohup ${GREMLIN_SERVER_BIN_DIR}/gremlin-server.sh ${GREMLIN_SERVER_CONF_DIR}/gremlin-server.yaml 1>$GREMLIN_SERVER_LOG_FILE 2>${GREMLIN_SERVER_ERR_FILE} &
+      echo $! > $PID_FILE
+      sleep 50
+  fi
+}
+
+stop() {
+	local pid
+	if status ; then
+		echo "stop program"
+		pid=`cat $PID_FILE`
+		kill -9 $pid
+                rm -f $PID_FILE
+	fi
+}
+
+case "$1" in
+	start)
+  start
+  ;;
+  stop)
+  stop
+  ;;
+  status)
+  status
+  ;;
+  *)
+  usage
+  ;;
+esac

http://git-wip-us.apache.org/repos/asf/ambari/blob/69e492f2/ambari-server/src/main/resources/common-services/TITAN/1.0.0/package/files/tinkergraph-empty.properties
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/TITAN/1.0.0/package/files/tinkergraph-empty.properties b/ambari-server/src/main/resources/common-services/TITAN/1.0.0/package/files/tinkergraph-empty.properties
new file mode 100755
index 0000000..0e68eeeb
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/TITAN/1.0.0/package/files/tinkergraph-empty.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+gremlin.graph=org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph
+gremlin.tinkergraph.vertexIdManager=LONG


Mime
View raw message