ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject [11/29] ambari git commit: AMBARI-8269. Merge branch-windows-dev changes to trunk. (Jayush Luniya via yusaku)
Date Fri, 14 Nov 2014 02:19:53 GMT
http://git-wip-us.apache.org/repos/asf/ambari/blob/8de3425f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/hive_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/hive_server.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/hive_server.py
new file mode 100644
index 0000000..f43084b
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/hive_server.py
@@ -0,0 +1,52 @@
+#!/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 hive import hive
+import service_mapping
+
+class HiveServer(Script):
+
+  def install(self, env):
+    if not check_windows_service_exists(service_mapping.hive_server_win_service_name):
+      self.install_packages(env)
+      self.configure(env)
+
+  def configure(self, env):
+    import params
+    env.set_params(params)
+    hive(name='hiveserver2')
+
+  def start(self, env):
+    import params
+    env.set_params(params)
+    self.configure(env) # FOR SECURITY
+    Service(service_mapping.hive_server_win_service_name, action="start")
+
+  def stop(self, env):
+    import params
+    Service(service_mapping.hive_server_win_service_name, action="stop")
+
+  def status(self, env):
+    import params
+    check_windows_service_status(service_mapping.hive_server_win_service_name)
+
+if __name__ == "__main__":
+  HiveServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de3425f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/mysql_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/mysql_server.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/mysql_server.py
new file mode 100644
index 0000000..7fd06de
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/mysql_server.py
@@ -0,0 +1,46 @@
+#!/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.
+
+"""
+
+import sys
+from resource_management import *
+
+class MysqlServer(Script):
+
+  def install(self, env):
+    self.install_packages(env)
+    self.configure(env)
+
+  def configure(self, env):
+    import params
+    env.set_params(params)
+
+  def start(self, env):
+    import params
+    env.set_params(params)
+
+  def stop(self, env):
+    import params
+    env.set_params(params)
+
+  def status(self, env):
+    import status_params
+
+if __name__ == "__main__":
+  MysqlServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de3425f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/params.py
new file mode 100644
index 0000000..041669f
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/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 import *
+
+# server configurations
+config = Script.get_config()
+
+hdp_root = os.path.abspath(os.path.join(os.environ["HADOOP_HOME"],".."))
+hive_conf_dir = os.environ["HIVE_CONF_DIR"]
+hive_home = os.environ["HIVE_HOME"]
+hive_lib_dir = os.environ["HIVE_LIB_DIR"]
+hive_log_dir = os.environ["HIVE_LOG_DIR"]
+hive_opts = os.environ["HIVE_OPTS"]
+hcat_home = os.environ["HCAT_HOME"]
+hcat_config_dir = os.environ["WEBHCAT_CONF_DIR"]
+
+hive_env_sh_template = config['configurations']['hive-env']['content']
+hive_warehouse_dir = config['configurations']['hive-site']['hive.metastore.warehouse.dir']
+hive_user = "hadoop"
+hadoop_user = "hadoop"
+hcat_user = "hadoop"

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de3425f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/service_check.py
new file mode 100644
index 0000000..619be7a
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/service_check.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 import *
+import socket
+import sys
+
+from hcat_service_check import hcat_service_check
+from webhcat_service_check import webhcat_service_check
+
+class HiveServiceCheck(Script):
+  def service_check(self, env):
+    import params
+    env.set_params(params)
+    smoke_cmd = os.path.join(params.hdp_root,"Run-SmokeTests.cmd")
+    service = "HIVE"
+    Execute(format("cmd /C {smoke_cmd} {service}"), user=params.hive_user, logoutput=True)
+
+    webhcat_service_check()
+
+if __name__ == "__main__":
+  HiveServiceCheck().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de3425f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/service_mapping.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/service_mapping.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/service_mapping.py
new file mode 100644
index 0000000..84dd897
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/service_mapping.py
@@ -0,0 +1,23 @@
+"""
+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.
+
+"""
+
+hive_metastore_win_service_name = "metastore"
+hive_client_win_service_name = "hwi"
+hive_server_win_service_name = "hiveserver2"
+webhcat_server_win_service_name = "templeton"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de3425f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/webhcat.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/webhcat.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/webhcat.py
new file mode 100644
index 0000000..032ca79
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/webhcat.py
@@ -0,0 +1,30 @@
+"""
+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.
+
+Ambari Agent
+
+"""
+from resource_management import *
+import sys
+
+
+def webhcat():
+  import params
+  XmlConfig("webhcat-site.xml",
+            conf_dir=params.config_dir,
+            configurations=params.config['configurations']['webhcat-site']
+  )

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de3425f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/webhcat_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/webhcat_server.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/webhcat_server.py
new file mode 100644
index 0000000..527efb8
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/webhcat_server.py
@@ -0,0 +1,48 @@
+"""
+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.
+
+Ambari Agent
+
+"""
+import sys
+from resource_management import *
+from webhcat import webhcat
+import service_mapping
+
+class WebHCatServer(Script):
+  def install(self, env):
+    if not check_windows_service_exists(service_mapping.webhcat_server_win_service_name):
+      self.install_packages(env)
+
+  def configure(self, env):
+    import params
+    env.set_params(params)
+    webhcat()
+
+  def start(self, env):
+    import params
+    self.configure(env) # FOR SECURITY
+    Service(service_mapping.webhcat_server_win_service_name, action="start")
+
+  def stop(self, env):
+    Service(service_mapping.webhcat_server_win_service_name, action="stop")
+
+  def status(self, env):
+    check_windows_service_status(service_mapping.webhcat_server_win_service_name)
+
+if __name__ == "__main__":
+  WebHCatServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de3425f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/webhcat_service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/webhcat_service_check.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/webhcat_service_check.py
new file mode 100644
index 0000000..1fa08a3
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/webhcat_service_check.py
@@ -0,0 +1,27 @@
+"""
+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.
+
+Ambari Agent
+
+"""
+from resource_management import *
+
+def webhcat_service_check():
+  import params
+  smoke_cmd = os.path.join(params.hdp_root,"Run-SmokeTests.cmd")
+  service = "WEBHCAT"
+  Execute(format("cmd /C {smoke_cmd} {service}"), user=params.hcat_user, logoutput=True)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de3425f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/templates/webhcat-env.sh.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/templates/webhcat-env.sh.j2 b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/templates/webhcat-env.sh.j2
new file mode 100644
index 0000000..220f420
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/templates/webhcat-env.sh.j2
@@ -0,0 +1,62 @@
+{#
+# 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.
+#}
+
+#
+#
+# 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.
+#
+#
+#
+
+# The file containing the running pid
+PID_FILE={{pid_file}}
+
+TEMPLETON_LOG_DIR={{templeton_log_dir}}/
+
+
+WEBHCAT_LOG_DIR={{templeton_log_dir}}/
+
+# The console error log
+ERROR_LOG={{templeton_log_dir}}/webhcat-console-error.log
+
+# The console log
+CONSOLE_LOG={{templeton_log_dir}}/webhcat-console.log
+
+#TEMPLETON_JAR=templeton_jar_name
+
+#HADOOP_PREFIX=hadoop_prefix
+
+#HCAT_PREFIX=hive_prefix
+
+# Set HADOOP_HOME to point to a specific hadoop install directory
+export HADOOP_HOME=/usr/lib/hadoop

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de3425f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/configuration/oozie-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/configuration/oozie-env.xml b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/configuration/oozie-env.xml
new file mode 100644
index 0000000..423db73
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/configuration/oozie-env.xml
@@ -0,0 +1,140 @@
+<?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>
+  <property>
+    <name>oozie_user</name>
+    <value>oozie</value>
+    <description>Oozie User.</description>
+  </property>
+  <property>
+    <name>oozie_hostname</name>
+    <value></value>
+    <description>
+      Specify the host on which the OOZIE database is hosted.
+    </description>
+  </property>
+  <property>
+    <name>oozie_database</name>
+    <value>Existing MSSQL Server database with sql auth</value>
+    <description>Oozie Server Database.</description>
+  </property>
+  <property>
+    <name>oozie_derby_database</name>
+    <value>Derby</value>
+    <description>Oozie Derby Database</description>
+  </property>
+  <property>
+    <name>oozie_data_dir</name>
+    <value>/hadoop/oozie/data</value>
+    <description>Data directory in which the Oozie DB exists</description>
+  </property>
+  <property>
+    <name>oozie_log_dir</name>
+    <value>/var/log/oozie</value>
+    <description>Directory for oozie logs</description>
+  </property>
+  <property>
+    <name>oozie_pid_dir</name>
+    <value>/var/run/oozie</value>
+    <description>Directory in which the pid files for oozie reside.</description>
+  </property>
+  <property>
+    <name>oozie_admin_port</name>
+    <value>11001</value>
+    <description>The admin port Oozie server runs.</description>
+  </property>
+
+  <!-- oozie-env.sh -->
+  <property>
+    <name>content</name>
+    <description>oozie-env.cmd content</description>
+    <value>
+@rem Licensed to the Apache Software Foundation (ASF) under one
+@rem or more contributor license agreements.  See the NOTICE file
+@rem distributed with this work for additional information
+@rem regarding copyright ownership.  The ASF licenses this file
+@rem to you under the Apache License, Version 2.0 (the
+@rem "License"); you may not use this file except in compliance
+@rem with the License.  You may obtain a copy of the License at
+@rem
+@rem      http://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@rem Set Oozie specific environment variables here.
+
+@rem Settings for the Embedded Tomcat that runs Oozie
+@rem Java System properties for Oozie should be specified in this variable
+@rem
+set CATALINA_OPTS=%CATALINA_OPTS% -Xmx1024m
+
+@rem Oozie configuration file to load from Oozie configuration directory
+@rem
+@rem set OOZIE_CONFIG_FILE=oozie-site.xml
+
+@rem Oozie logs directory
+@rem
+@rem set OOZIE_LOG=%OOZIE_HOME%\logs
+
+@rem Oozie Log4J configuration file to load from Oozie configuration directory
+@rem
+@rem set OOZIE_LOG4J_FILE=oozie-log4j.properties
+
+@rem Reload interval of the Log4J configuration file, in seconds
+@rem
+@rem set OOZIE_LOG4J_RELOAD=10
+
+@rem The port Oozie server runs
+@rem
+@rem set OOZIE_HTTP_PORT=11000
+
+@rem The port Oozie server runs if using SSL (HTTPS)
+@rem
+@rem set OOZIE_HTTPS_PORT=11443
+
+@rem The host name Oozie server runs on
+@rem
+@rem set OOZIE_HTTP_HOSTNAME=%COMPUTERNAME%
+
+@rem The base URL for callback URLs to Oozie
+@rem
+@rem set OOZIE_BASE_URL="http://%OOZIE_HTTP_HOSTNAME%:%OOZIE_HTTP_PORT%/oozie"
+
+@rem The location of the keystore for the Oozie server if using SSL (HTTPS)
+@rem
+@rem set OOZIE_HTTPS_KEYSTORE_FILE=%HOME%/.keystore
+
+@rem The password of the keystore for the Oozie server if using SSL (HTTPS)
+@rem
+@rem set OOZIE_HTTPS_KEYSTORE_PASS=password
+
+set JAVA_LIBRARY_PATH=%HADOOP_COMMON_HOME%\bin
+    </value>
+  </property>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de3425f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/configuration/oozie-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/configuration/oozie-log4j.xml b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/configuration/oozie-log4j.xml
new file mode 100644
index 0000000..cb77566
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/configuration/oozie-log4j.xml
@@ -0,0 +1,96 @@
+<?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>
+    <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. See accompanying LICENSE file.
+#
+
+# If the Java System property 'oozie.log.dir' is not defined at Oozie start up time
+# XLogService sets its value to '${oozie.home}/logs'
+
+log4j.appender.oozie=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.oozie.DatePattern='.'yyyy-MM-dd-HH
+log4j.appender.oozie.File=${oozie.log.dir}/oozie.log
+log4j.appender.oozie.Append=true
+log4j.appender.oozie.layout=org.apache.log4j.PatternLayout
+log4j.appender.oozie.layout.ConversionPattern=%d{ISO8601} %5p %c{1}:%L - %m%n
+
+log4j.appender.oozieops=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.oozieops.DatePattern='.'yyyy-MM-dd
+log4j.appender.oozieops.File=${oozie.log.dir}/oozie-ops.log
+log4j.appender.oozieops.Append=true
+log4j.appender.oozieops.layout=org.apache.log4j.PatternLayout
+log4j.appender.oozieops.layout.ConversionPattern=%d{ISO8601} %5p %c{1}:%L - %m%n
+
+log4j.appender.oozieinstrumentation=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.oozieinstrumentation.DatePattern='.'yyyy-MM-dd
+log4j.appender.oozieinstrumentation.File=${oozie.log.dir}/oozie-instrumentation.log
+log4j.appender.oozieinstrumentation.Append=true
+log4j.appender.oozieinstrumentation.layout=org.apache.log4j.PatternLayout
+log4j.appender.oozieinstrumentation.layout.ConversionPattern=%d{ISO8601} %5p %c{1}:%L - %m%n
+
+log4j.appender.oozieaudit=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.oozieaudit.DatePattern='.'yyyy-MM-dd
+log4j.appender.oozieaudit.File=${oozie.log.dir}/oozie-audit.log
+log4j.appender.oozieaudit.Append=true
+log4j.appender.oozieaudit.layout=org.apache.log4j.PatternLayout
+log4j.appender.oozieaudit.layout.ConversionPattern=%d{ISO8601} %5p %c{1}:%L - %m%n
+
+log4j.appender.openjpa=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.openjpa.DatePattern='.'yyyy-MM-dd
+log4j.appender.openjpa.File=${oozie.log.dir}/oozie-jpa.log
+log4j.appender.openjpa.Append=true
+log4j.appender.openjpa.layout=org.apache.log4j.PatternLayout
+log4j.appender.openjpa.layout.ConversionPattern=%d{ISO8601} %5p %c{1}:%L - %m%n
+
+log4j.logger.openjpa=INFO, openjpa
+log4j.logger.oozieops=INFO, oozieops
+log4j.logger.oozieinstrumentation=ALL, oozieinstrumentation
+log4j.logger.oozieaudit=ALL, oozieaudit
+log4j.logger.org.apache.oozie=INFO, oozie
+log4j.logger.org.apache.hadoop=WARN, oozie
+log4j.logger.org.mortbay=WARN, oozie
+log4j.logger.org.hsqldb=WARN, oozie
+log4j.logger.org.apache.hadoop.security.authentication.server=INFO, oozie
+    </value>
+  </property>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de3425f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/configuration/oozie-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/configuration/oozie-site.xml b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/configuration/oozie-site.xml
new file mode 100644
index 0000000..2051d01
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/configuration/oozie-site.xml
@@ -0,0 +1,502 @@
+<?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.
+-->
+<configuration  supports_final="true">
+
+    <!--
+        Refer to the oozie-default.xml file for the complete list of
+        Oozie configuration properties and their default values.
+    -->
+
+    <property>
+        <name>oozie.service.ActionService.executor.ext.classes</name>
+        <value>
+            org.apache.oozie.action.email.EmailActionExecutor,
+            org.apache.oozie.action.hadoop.HiveActionExecutor,
+            org.apache.oozie.action.hadoop.ShellActionExecutor,
+            org.apache.oozie.action.hadoop.SqoopActionExecutor,
+            org.apache.oozie.action.hadoop.DistcpActionExecutor
+        </value>
+    </property>
+
+    <property>
+        <name>oozie.service.SchemaService.wf.ext.schemas</name>
+        <value>
+            shell-action-0.1.xsd,shell-action-0.2.xsd,email-action-0.1.xsd,hive-action-0.2.xsd,
+            hive-action-0.3.xsd,hive-action-0.4.xsd,hive-action-0.5.xsd,sqoop-action-0.2.xsd,
+            sqoop-action-0.3.xsd,sqoop-action-0.4.xsd,ssh-action-0.1.xsd,ssh-action-0.2.xsd,distcp-action-0.1.xsd,
+            oozie-sla-0.1.xsd,oozie-sla-0.2.xsd
+        </value>
+    </property>
+
+    <property>
+        <name>oozie.system.id</name>
+        <value>oozie-${user.name}</value>
+        <description>
+            The Oozie system ID.
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.systemmode</name>
+        <value>NORMAL</value>
+        <description>
+            System mode for  Oozie at startup.
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.service.AuthorizationService.security.enabled</name>
+        <value>true</value>
+        <description>
+            Specifies whether security (user name/admin role) is enabled or not.
+            If disabled any user can manage Oozie system and manage any job.
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.service.PurgeService.older.than</name>
+        <value>30</value>
+        <description>
+            Jobs older than this value, in days, will be purged by the PurgeService.
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.service.PurgeService.purge.interval</name>
+        <value>3600</value>
+        <description>
+            Interval at which the purge service will run, in seconds.
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.service.CallableQueueService.queue.size</name>
+        <value>10000</value>
+        <description>Max callable queue size</description>
+    </property>
+
+    <property>
+        <name>oozie.service.CallableQueueService.threads</name>
+        <value>10</value>
+        <description>Number of threads used for executing callables</description>
+    </property>
+
+    <property>
+        <name>oozie.service.CallableQueueService.callable.concurrency</name>
+        <value>3</value>
+        <description>
+            Maximum concurrency for a given callable type.
+            Each command is a callable type (submit, start, run, signal, job, jobs, suspend,resume, etc).
+            Each action type is a callable type (Map-Reduce, Pig, SSH, FS, sub-workflow, etc).
+            All commands that use action executors (action-start, action-end, action-kill and action-check) use
+            the action type as the callable type.
+        </description>
+    </property>
+
+    <property>
+		<name>oozie.service.coord.normal.default.timeout
+		</name>
+		<value>120</value>
+		<description>Default timeout for a coordinator action input check (in minutes) for normal job.
+            -1 means infinite timeout</description>
+	</property>
+
+    <property>
+        <name>oozie.db.schema.name</name>
+        <value>oozie</value>
+        <description>
+            Oozie DataBase Name
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.service.JPAService.create.db.schema</name>
+        <value>true</value>
+        <description>
+            Creates Oozie DB.
+
+            If set to true, it creates the DB schema if it does not exist. If the DB schema exists is a NOP.
+            If set to false, it does not create the DB schema. If the DB schema does not exist it fails start up.
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.service.JPAService.jdbc.driver</name>
+        <value>com.microsoft.sqlserver.jdbc.SQLServerDriver</value>
+        <description>
+            JDBC driver class.
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.service.JPAService.jdbc.url</name>
+        <value></value>
+        <description>
+            JDBC URL.
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.service.JPAService.jdbc.username</name>
+        <value>oozie</value>
+        <description>
+            DB user name.
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.service.JPAService.jdbc.password</name>
+        <value>oozie</value>
+        <description>
+            DB user password.
+
+            IMPORTANT: if password is emtpy leave a 1 space string, the service trims the value,
+                       if empty Configuration assumes it is NULL.
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.service.JPAService.pool.max.active.conn</name>
+        <value>10</value>
+        <description>
+             Max number of connections.
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.service.HadoopAccessorService.kerberos.enabled</name>
+        <value>false</value>
+        <description>
+            Indicates if Oozie is configured to use Kerberos.
+        </description>
+    </property>
+
+    <property>
+        <name>local.realm</name>
+        <value>LOCALHOST</value>
+        <description>
+            Kerberos Realm used by Oozie and Hadoop. Using 'local.realm' to be aligned with Hadoop configuration
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.service.HadoopAccessorService.keytab.file</name>
+        <value>${user.home}/oozie.keytab</value>
+        <description>
+            Location of the Oozie user keytab file.
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.service.HadoopAccessorService.kerberos.principal</name>
+        <value>${user.name}/localhost@${local.realm}</value>
+        <description>
+            Kerberos principal for Oozie service.
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.service.HadoopAccessorService.jobTracker.whitelist</name>
+        <value> </value>
+        <description>
+            Whitelisted job tracker for Oozie service.
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.service.HadoopAccessorService.nameNode.whitelist</name>
+        <value> </value>
+        <description>
+            Whitelisted job tracker for Oozie service.
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.service.HadoopAccessorService.hadoop.configurations</name>
+        <value>*=c:\hdp\hadoop\etc\hadoop</value>
+        <description>
+            Comma separated AUTHORITY=HADOOP_CONF_DIR, where AUTHORITY is the HOST:PORT of
+            the Hadoop service (JobTracker, HDFS). The wildcard '*' configuration is
+            used when there is no exact match for an authority. The HADOOP_CONF_DIR contains
+            the relevant Hadoop *-site.xml files. If the path is relative is looked within
+            the Oozie configuration directory; though the path can be absolute (i.e. to point
+            to Hadoop client conf/ directories in the local filesystem.
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.service.WorkflowAppService.system.libpath</name>
+        <value>/user/${user.name}/share/lib</value>
+        <description>
+            System library path to use for workflow applications.
+            This path is added to workflow application if their job properties sets
+            the property 'oozie.use.system.libpath' to true.
+        </description>
+    </property>
+
+    <property>
+        <name>use.system.libpath.for.mapreduce.and.pig.jobs</name>
+        <value>false</value>
+        <description>
+            If set to true, submissions of MapReduce and Pig jobs will include
+            automatically the system library path, thus not requiring users to
+            specify where the Pig JAR files are. Instead, the ones from the system
+            library path are used.
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.authentication.type</name>
+        <value>simple</value>
+        <description>
+            Defines authentication used for Oozie HTTP endpoint.
+            Supported values are: simple | basic | kerberos | #AUTHENTICATION_HANDLER_CLASSNAME#
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.authentication.token.validity</name>
+        <value>36000</value>
+        <description>
+            Indicates how long (in seconds) an authentication token is valid before it has
+            to be renewed.
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.authentication.signature.secret</name>
+        <value>oozie</value>
+        <description>
+            The signature secret for signing the authentication tokens.
+            If not set a random secret is generated at startup time.
+            In order to authentiation to work correctly across multiple hosts
+            the secret must be the same across al the hosts.
+        </description>
+    </property>
+
+    <!--<property>
+      <name>oozie.authentication.cookie.domain</name>
+      <value></value>
+      <description>
+        The domain to use for the HTTP cookie that stores the authentication token.
+        In order to authentiation to work correctly across multiple hosts
+        the domain must be correctly set.
+      </description>
+    </property>-->
+
+    <property>
+        <name>oozie.authentication.simple.anonymous.allowed</name>
+        <value>true</value>
+        <description>
+            Indicates if anonymous requests are allowed.
+            This setting is meaningful only when using 'simple' authentication.
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.authentication.kerberos.principal</name>
+        <value>HTTP/localhost@${local.realm}</value>
+        <description>
+            Indicates the Kerberos principal to be used for HTTP endpoint.
+            The principal MUST start with 'HTTP/' as per Kerberos HTTP SPNEGO specification.
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.authentication.kerberos.keytab</name>
+        <value>${oozie.service.HadoopAccessorService.keytab.file}</value>
+        <description>
+            Location of the keytab file with the credentials for the principal.
+            Referring to the same keytab file Oozie uses for its Kerberos credentials for Hadoop.
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.authentication.kerberos.name.rules</name>
+        <value>DEFAULT</value>
+        <description>
+            The kerberos names rules is to resolve kerberos principal names, refer to Hadoop's
+            KerberosName for more details.
+        </description>
+    </property>
+
+    <!-- Proxyuser Configuration -->
+
+    <!--
+
+    <property>
+        <name>oozie.service.ProxyUserService.proxyuser.#USER#.hosts</name>
+        <value>*</value>
+        <description>
+            List of hosts the '#USER#' user is allowed to perform 'doAs'
+            operations.
+
+            The '#USER#' must be replaced with the username o the user who is
+            allowed to perform 'doAs' operations.
+
+            The value can be the '*' wildcard or a list of hostnames.
+
+            For multiple users copy this property and replace the user name
+            in the property name.
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.service.ProxyUserService.proxyuser.#USER#.groups</name>
+        <value>*</value>
+        <description>
+            List of groups the '#USER#' user is allowed to impersonate users
+            from to perform 'doAs' operations.
+
+            The '#USER#' must be replaced with the username o the user who is
+            allowed to perform 'doAs' operations.
+
+            The value can be the '*' wildcard or a list of groups.
+
+            For multiple users copy this property and replace the user name
+            in the property name.
+        </description>
+    </property>
+
+    -->
+
+
+  <property>
+    <name>oozie.service.coord.push.check.requeue.interval</name>
+    <value>30000</value>
+  </property>
+
+  <property>
+    <name>oozie.services.ext</name>
+    <value>org.apache.oozie.service.JMSAccessorService,
+                org.apache.oozie.service.PartitionDependencyManagerService,
+                org.apache.oozie.service.HCatAccessorService</value>
+  </property>
+
+  <property>
+    <name>oozie.credentials.credentialclasses</name>
+    <value>hcat=org.apache.oozie.action.hadoop.HCatCredentials</value>
+  </property>
+
+  <property>
+    <name>oozie.service.URIHandlerService.uri.handlers</name>
+    <value>org.apache.oozie.dependency.FSURIHandler,
+                org.apache.oozie.dependency.HCatURIHandler</value>
+  </property>
+
+  <property>
+    <name>oozie.service.ELService.ext.functions.coord-job-submit-data</name>
+    <value>now=org.apache.oozie.extensions.OozieELExtensions#ph1_now_echo,
+                today=org.apache.oozie.extensions.OozieELExtensions#ph1_today_echo,
+                yesterday=org.apache.oozie.extensions.OozieELExtensions#ph1_yesterday_echo,
+                currentMonth=org.apache.oozie.extensions.OozieELExtensions#ph1_currentMonth_echo,
+                lastMonth=org.apache.oozie.extensions.OozieELExtensions#ph1_lastMonth_echo,
+                currentYear=org.apache.oozie.extensions.OozieELExtensions#ph1_currentYear_echo,
+                lastYear=org.apache.oozie.extensions.OozieELExtensions#ph1_lastYear_echo,
+                dataIn=org.apache.oozie.extensions.OozieELExtensions#ph1_dataIn_echo,
+                instanceTime=org.apache.oozie.coord.CoordELFunctions#ph1_coord_nominalTime_echo_wrap,
+                formatTime=org.apache.oozie.coord.CoordELFunctions#ph1_coord_formatTime_echo,
+                dateOffset=org.apache.oozie.coord.CoordELFunctions#ph1_coord_dateOffset_echo,
+                user=org.apache.oozie.coord.CoordELFunctions#coord_user</value>
+  </property>
+
+  <property>
+    <name>oozie.service.ProxyUserService.proxyuser.hadoop.hosts</name>
+    <value>*</value>
+  </property>
+
+  <property>
+    <name>oozie.service.ELService.ext.functions.coord-sla-submit</name>
+    <value>instanceTime=org.apache.oozie.coord.CoordELFunctions#ph1_coord_nominalTime_echo_fixed,
+                user=org.apache.oozie.coord.CoordELFunctions#coord_user</value>
+  </property>
+
+  <property>
+    <name>oozie.service.ELService.ext.functions.coord-sla-create</name>
+    <value>instanceTime=org.apache.oozie.coord.CoordELFunctions#ph2_coord_nominalTime,
+                user=org.apache.oozie.coord.CoordELFunctions#coord_user</value>
+  </property>
+
+  <property>
+    <name>oozie.service.ProxyUserService.proxyuser.hadoop.groups</name>
+    <value>*</value>
+  </property>
+
+  <property>
+    <name>oozie.service.ELService.ext.functions.coord-action-create</name>
+    <value>now=org.apache.oozie.extensions.OozieELExtensions#ph2_now,
+                today=org.apache.oozie.extensions.OozieELExtensions#ph2_today,
+                yesterday=org.apache.oozie.extensions.OozieELExtensions#ph2_yesterday,
+                currentMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_currentMonth,
+                lastMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_lastMonth,
+                currentYear=org.apache.oozie.extensions.OozieELExtensions#ph2_currentYear,
+                lastYear=org.apache.oozie.extensions.OozieELExtensions#ph2_lastYear,
+                latest=org.apache.oozie.coord.CoordELFunctions#ph2_coord_latest_echo,
+                future=org.apache.oozie.coord.CoordELFunctions#ph2_coord_future_echo,
+                formatTime=org.apache.oozie.coord.CoordELFunctions#ph2_coord_formatTime,
+                user=org.apache.oozie.coord.CoordELFunctions#coord_user</value>
+  </property>
+
+  <property>
+    <name>oozie.service.ELService.ext.functions.coord-job-submit-instances</name>
+    <value>now=org.apache.oozie.extensions.OozieELExtensions#ph1_now_echo,
+                today=org.apache.oozie.extensions.OozieELExtensions#ph1_today_echo,
+                yesterday=org.apache.oozie.extensions.OozieELExtensions#ph1_yesterday_echo,
+                currentMonth=org.apache.oozie.extensions.OozieELExtensions#ph1_currentMonth_echo,
+                lastMonth=org.apache.oozie.extensions.OozieELExtensions#ph1_lastMonth_echo,
+                currentYear=org.apache.oozie.extensions.OozieELExtensions#ph1_currentYear_echo,
+                lastYear=org.apache.oozie.extensions.OozieELExtensions#ph1_lastYear_echo,
+                formatTime=org.apache.oozie.coord.CoordELFunctions#ph1_coord_formatTime_echo,
+                latest=org.apache.oozie.coord.CoordELFunctions#ph2_coord_latest_echo,
+                future=org.apache.oozie.coord.CoordELFunctions#ph2_coord_future_echo</value>
+  </property>
+
+  <property>
+    <name>oozie.service.ELService.ext.functions.coord-action-start</name>
+    <value>now=org.apache.oozie.extensions.OozieELExtensions#ph2_now,
+                today=org.apache.oozie.extensions.OozieELExtensions#ph2_today,
+                yesterday=org.apache.oozie.extensions.OozieELExtensions#ph2_yesterday,
+                currentMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_currentMonth,
+                lastMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_lastMonth,
+                currentYear=org.apache.oozie.extensions.OozieELExtensions#ph2_currentYear,
+                lastYear=org.apache.oozie.extensions.OozieELExtensions#ph2_lastYear,
+                latest=org.apache.oozie.coord.CoordELFunctions#ph3_coord_latest,
+                future=org.apache.oozie.coord.CoordELFunctions#ph3_coord_future,
+                dataIn=org.apache.oozie.extensions.OozieELExtensions#ph3_dataIn,
+                instanceTime=org.apache.oozie.coord.CoordELFunctions#ph3_coord_nominalTime,
+                dateOffset=org.apache.oozie.coord.CoordELFunctions#ph3_coord_dateOffset,
+                formatTime=org.apache.oozie.coord.CoordELFunctions#ph3_coord_formatTime,
+                user=org.apache.oozie.coord.CoordELFunctions#coord_user</value>
+  </property>
+
+  <property>
+    <name>oozie.service.ELService.ext.functions.coord-action-create-inst</name>
+    <value>now=org.apache.oozie.extensions.OozieELExtensions#ph2_now_inst,
+                today=org.apache.oozie.extensions.OozieELExtensions#ph2_today_inst,
+                yesterday=org.apache.oozie.extensions.OozieELExtensions#ph2_yesterday_inst,
+                currentMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_currentMonth_inst,
+                lastMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_lastMonth_inst,
+                currentYear=org.apache.oozie.extensions.OozieELExtensions#ph2_currentYear_inst,
+                lastYear=org.apache.oozie.extensions.OozieELExtensions#ph2_lastYear_inst,
+                latest=org.apache.oozie.coord.CoordELFunctions#ph2_coord_latest_echo,
+                future=org.apache.oozie.coord.CoordELFunctions#ph2_coord_future_echo,
+                formatTime=org.apache.oozie.coord.CoordELFunctions#ph2_coord_formatTime,
+                user=org.apache.oozie.coord.CoordELFunctions#coord_user</value>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de3425f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/metainfo.xml
new file mode 100644
index 0000000..347954b
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/metainfo.xml
@@ -0,0 +1,126 @@
+<?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>OOZIE</name>
+      <displayName>Oozie</displayName>
+      <comment>System for workflow coordination and execution of Apache Hadoop jobs.  This also includes the installation of the optional Oozie Web Console which relies on and will install the &lt;a target="_blank" href="http://www.sencha.com/legal/open-source-faq/"&gt;ExtJS&lt;/a&gt; Library.
+      </comment>
+      <version>4.0.0.2.0</version>
+      <components>
+        <component>
+          <name>OOZIE_SERVER</name>
+          <displayName>Oozie Server</displayName>
+          <category>MASTER</category>
+          <cardinality>1</cardinality>
+          <dependencies>
+            <dependency>
+              <name>HDFS/HDFS_CLIENT</name>
+              <scope>host</scope>
+              <auto-deploy>
+                <enabled>true</enabled>
+              </auto-deploy>
+            </dependency>
+            <dependency>
+              <name>MAPREDUCE2/MAPREDUCE2_CLIENT</name>
+              <scope>host</scope>
+              <auto-deploy>
+                <enabled>true</enabled>
+              </auto-deploy>
+            </dependency>
+            <dependency>
+              <name>YARN/YARN_CLIENT</name>
+              <scope>host</scope>
+              <auto-deploy>
+                <enabled>true</enabled>
+              </auto-deploy>
+            </dependency>
+          </dependencies>
+          <commandScript>
+            <script>scripts/oozie_server.py</script>
+            <scriptType>PYTHON</scriptType>
+            <timeout>600</timeout>
+          </commandScript>
+        </component>
+
+        <component>
+          <name>OOZIE_CLIENT</name>
+          <displayName>Oozie Client</displayName>
+          <category>CLIENT</category>
+          <cardinality>1+</cardinality>
+          <dependencies>
+            <dependency>
+              <name>HDFS/HDFS_CLIENT</name>
+              <scope>host</scope>
+              <auto-deploy>
+                <enabled>true</enabled>
+              </auto-deploy>
+            </dependency>
+            <dependency>
+              <name>MAPREDUCE2/MAPREDUCE2_CLIENT</name>
+              <scope>host</scope>
+              <auto-deploy>
+                <enabled>true</enabled>
+              </auto-deploy>
+            </dependency>
+          </dependencies>
+          <commandScript>
+            <script>scripts/oozie_client.py</script>
+            <scriptType>PYTHON</scriptType>
+          </commandScript>
+          <configFiles>
+            <configFile>
+              <type>xml</type>
+              <fileName>oozie-site.xml</fileName>
+              <dictionaryName>oozie-site</dictionaryName>
+            </configFile>
+            <configFile>
+              <type>env</type>
+              <fileName>oozie-env.cmd</fileName>
+              <dictionaryName>oozie-env</dictionaryName>
+            </configFile>
+            <configFile>
+              <type>env</type>
+              <fileName>oozie-log4j.properties</fileName>
+              <dictionaryName>oozie-log4j</dictionaryName>
+            </configFile>
+          </configFiles>
+        </component>
+      </components>
+
+      <commandScript>
+        <script>scripts/service_check.py</script>
+        <scriptType>PYTHON</scriptType>
+        <timeout>300</timeout>
+      </commandScript>
+
+      <requiredServices>
+        <service>YARN</service>
+      </requiredServices>
+
+      <configuration-dependencies>
+        <config-type>oozie-site</config-type>
+        <config-type>oozie-env</config-type>
+        <config-type>oozie-log4j</config-type>
+        <config-type>yarn-site</config-type>
+      </configuration-dependencies>
+    </service>
+  </services>
+</metainfo>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de3425f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/oozie.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/oozie.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/oozie.py
new file mode 100644
index 0000000..7778a75
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/oozie.py
@@ -0,0 +1,36 @@
+"""
+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.
+
+Ambari Agent
+
+"""
+
+from resource_management import *
+
+def oozie():
+  import params
+  XmlConfig("oozie-site.xml",
+            conf_dir = params.oozie_conf_dir,
+            configurations = params.config['configurations']['oozie-site'],
+            owner = params.oozie_user,
+            mode = 'f'
+  )
+
+  File(format("{oozie_conf_dir}/oozie-env.cmd"),
+    owner=params.oozie_user,
+    content=InlineTemplate(params.oozie_env_cmd_template)
+  )
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de3425f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/oozie_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/oozie_client.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/oozie_client.py
new file mode 100644
index 0000000..164c940
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/oozie_client.py
@@ -0,0 +1,40 @@
+#!/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 oozie import oozie
+
+class OozieClient(Script):
+  def install(self, env):
+    # client checks env var to determine if it is installed
+    if not os.environ.has_key("OOZIE_HOME"):
+      self.install_packages(env)
+    self.configure(env)
+
+  def configure(self, env):
+    import params
+    env.set_params(params)
+    oozie()
+
+  def status(self, env):
+    raise ClientComponentHasNoStatus()
+
+if __name__ == "__main__":
+  OozieClient().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de3425f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/oozie_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/oozie_server.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/oozie_server.py
new file mode 100644
index 0000000..261bc8f
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/oozie_server.py
@@ -0,0 +1,66 @@
+#!/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.
+
+"""
+
+import sys
+import service_mapping
+from resource_management import *
+from oozie import oozie
+from ambari_commons.inet_utils import force_download_file
+
+class OozieServer(Script):
+  def install(self, env):
+    import params
+    if not check_windows_service_exists(service_mapping.oozie_server_win_service_name):
+      self.install_packages(env)
+    force_download_file(os.path.join(params.config['hostLevelParams']['jdk_location'], "sqljdbc4.jar"),
+      os.path.join(params.oozie_root, "extra_libs", "sqljdbc4.jar")
+    )
+    webapps_sqljdbc_path = os.path.join(params.oozie_home, "oozie-server", "webapps", "oozie", "WEB-INF", "lib", "sqljdbc4.jar")
+    if os.path.isfile(webapps_sqljdbc_path):
+      force_download_file(os.path.join(params.config['hostLevelParams']['jdk_location'], "sqljdbc4.jar"),
+        webapps_sqljdbc_path
+      )
+    force_download_file(os.path.join(params.config['hostLevelParams']['jdk_location'], "sqljdbc4.jar"),
+      os.path.join(params.oozie_home, "share", "lib", "oozie", "sqljdbc4.jar")
+    )
+    force_download_file(os.path.join(params.config['hostLevelParams']['jdk_location'], "sqljdbc4.jar"),
+      os.path.join(params.oozie_home, "temp", "WEB-INF", "lib", "sqljdbc4.jar")
+    )
+
+  def configure(self, env):
+    oozie()
+
+  def start(self, env):
+    import params
+    env.set_params(params)
+    self.configure(env)
+    Service(service_mapping.oozie_server_win_service_name, action="start")
+
+  def stop(self, env):
+    import params
+    env.set_params(params)
+    Service(service_mapping.oozie_server_win_service_name, action="stop")
+
+  def status(self, env):
+    import params
+    check_windows_service_status(service_mapping.oozie_server_win_service_name)
+
+if __name__ == "__main__":
+  OozieServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de3425f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/params.py
new file mode 100644
index 0000000..37405de
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/params.py
@@ -0,0 +1,33 @@
+#!/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 *
+import os
+
+# server configurations
+config = Script.get_config()
+
+hdp_root = os.path.abspath(os.path.join(os.environ["HADOOP_HOME"], ".."))
+oozie_root = os.environ['OOZIE_ROOT']
+oozie_home = os.environ['OOZIE_HOME']
+oozie_conf_dir = os.path.join(oozie_home,'conf')
+oozie_user = "hadoop"
+
+oozie_env_cmd_template = config['configurations']['oozie-env']['content']
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de3425f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/service_check.py
new file mode 100644
index 0000000..3867819
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/service_check.py
@@ -0,0 +1,32 @@
+#!/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 *
+
+class OozieServiceCheck(Script):
+  def service_check(self, env):
+    import params
+    env.set_params(params)
+    smoke_cmd = os.path.join(params.hdp_root,"Run-SmokeTests.cmd")
+    service = "OOZIE"
+    Execute(format("cmd /C {smoke_cmd} {service}"), logoutput=True)
+
+if __name__ == "__main__":
+  OozieServiceCheck().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de3425f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/service_mapping.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/service_mapping.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/service_mapping.py
new file mode 100644
index 0000000..b71b25c
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/service_mapping.py
@@ -0,0 +1,21 @@
+# !/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.
+
+"""
+
+oozie_server_win_service_name = "oozieservice"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de3425f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/PIG/configuration/pig-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/PIG/configuration/pig-log4j.xml b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/PIG/configuration/pig-log4j.xml
new file mode 100644
index 0000000..cbdd452
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/PIG/configuration/pig-log4j.xml
@@ -0,0 +1,61 @@
+<?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>
+    <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.
+#
+#
+#
+
+# ***** Set root logger level to DEBUG and its only appender to A.
+log4j.logger.org.apache.pig=info, A
+
+# ***** A is set to be a ConsoleAppender.
+log4j.appender.A=org.apache.log4j.ConsoleAppender
+# ***** A uses PatternLayout.
+log4j.appender.A.layout=org.apache.log4j.PatternLayout
+log4j.appender.A.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
+    </value>
+  </property>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de3425f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/PIG/configuration/pig-properties.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/PIG/configuration/pig-properties.xml b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/PIG/configuration/pig-properties.xml
new file mode 100644
index 0000000..88e2fea
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/PIG/configuration/pig-properties.xml
@@ -0,0 +1,262 @@
+<?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>pig-content</name>
+    <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.
+
+# Pig configuration file. All values can be overwritten by command line arguments.
+
+# Use the "-h properties" command to see description of the properties
+
+# log4jconf log4j configuration file
+# log4jconf=./conf/log4j.properties
+
+# a file that contains pig script
+#file=
+
+# load jarfile, colon separated
+#jar=
+
+#verbose print all log messages to screen (default to print only INFO and above to screen)
+#verbose=true
+
+#exectype local|mapreduce, mapreduce is default
+#exectype=local
+
+#the default timezone: if it is not set, the default timezone for this host is used.
+#the correct timezone format is the UTC offset: e.g., +08:00.
+#pig.datetime.default.tz=
+
+#pig.logfile=
+
+#Do not spill temp files smaller than this size (bytes)
+#pig.spill.size.threshold=5000000
+
+#EXPERIMENT: Activate garbage collection when spilling a file bigger than this size (bytes)
+#This should help reduce the number of files being spilled.
+#pig.spill.gc.activation.size=40000000
+
+#the following two parameters are to help estimate the reducer number
+#pig.exec.reducers.bytes.per.reducer=1000000000
+#pig.exec.reducers.max=999
+
+#Logging properties
+#verbose=false
+#brief=false
+#debug=INFO
+#aggregate.warning=true
+
+#Performance tuning properties
+#pig.cachedbag.memusage=0.2
+#pig.skewedjoin.reduce.memusage=0.3
+#pig.exec.nocombiner=false
+#opt.multiquery=true
+
+#Following parameters are for configuring intermediate storage format
+#Supported storage types are seqfile and tfile
+#Supported codec types: tfile supports gz(gzip) and lzo, seqfile support gz(gzip), lzo, snappy, bzip2
+#pig.tmpfilecompression=false
+#pig.tmpfilecompression.storage=seqfile
+#pig.tmpfilecompression.codec=gz
+
+#pig.noSplitCombination=true
+
+#pig.exec.mapPartAgg=false
+#pig.exec.mapPartAgg.minReduction=10
+
+#exectype=mapreduce
+#pig.additional.jars=&lt;comma seperated list of jars&gt;
+#udf.import.list=&lt;comma seperated list of imports&gt;
+#stop.on.failure=false
+
+#Use this option only when your Pig job will otherwise die because of
+#using more counters than hadoop configured limit
+#pig.disable.counter=true
+
+# By default, pig will allow 1GB of data to be replicated using
+# the distributed cache when doing fragment-replicated join.
+# pig.join.replicated.max.bytes=1000000000
+
+# Use this option to turn on UDF timers. This will cause two
+# counters to be tracked for every UDF and LoadFunc in your script:
+# approx_microsecs measures approximate time spent inside a UDF
+# approx_invocations reports the approximate number of times the UDF was invoked
+# pig.udf.profile=false
+
+#When enabled, 'describe' prints a multi-line formatted schema
+#(similar to an indended json) rather than on a single line.
+#pig.pretty.print.schema=true
+
+#pig.sql.type=hcat
+hcat.bin=c:\hdp\hcatalog-@hcat.version@\\bin\\hcat.py
+
+############################ SchemaTuple ############################
+
+# Setting this value will turn on the SchemaTuple feature (PIG-2632)
+# This will attempt to use code generation for more efficient within
+# the pig code. This can lead to both CPU, serialization, and memory
+# benefits (currently, the potential memory benefits are the largest).
+
+# This parameter will enable the optimization in all available cases
+#pig.schematuple=true
+
+# Certain cases can be turned off by uncommenting the following. These will
+# all be off by default, but will all be turned on if pig.schematuple is set
+# to true.
+
+# This will disable SchemaTuples in the case of udfs. Currently,
+# the input to UDF's will be SchemaTuples.
+
+#pig.schematuple.udf=false
+
+# This is currently not implemented. In the future, LoadFunc's with known
+# schema's should output SchemaTuples
+
+#pig.schematuple.load=false
+
+# This will use SchemaTuples in replicated joins. The potential memory saving
+# here is significant. It will use SchemaTuples when it builds the HashMap of
+# the join key to related values.
+
+#pig.schematuple.fr_join=false
+
+# In the current implementation of merge join, all of the Tuples in the left relation
+# that share a given key will be stored in a List in memory. This will use SchemaTuples
+# instead in that List.
+
+#pig.schematuple.merge_join=false
+
+#####################################################################
+
+##### Set up optional Pig Progress Notification Listener ############
+
+# Note that only one PPNL can be set up. If you need several, write a PPNL that will chain them.
+# pig.notification.listener = &lt;fully qualified class name of a PPNL implementation&gt;
+
+# Optionally, you can supply a single String argument to pass to your PPNL.
+# pig.notification.listener.arg = &lt;somevalue&gt;
+
+#####################################################################
+
+########## Override the default Reducer Estimator logic #############
+
+# By default, the logic to estimate the number of reducers to use for a given job lives in:
+#   org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.InputSizeReducerEstimator
+# This logic can be replaced by implementing the following interface:
+#   org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigReducerEstimator
+
+# This class will be invoked to estimate the number of reducers to use.
+# pig.exec.reducer.estimator = &lt;fully qualified class name of a PigReducerEstimator implementation&gt;
+
+# Optionally, you can supply a single String argument to pass to your PigReducerEstimator.
+# pig.exec.reducer.estimator.arg = &lt;somevalue&gt;
+
+#####################################################################
+
+###### Override the default Pig Stats Output Size Reader logic ######
+
+# By default, the size of reducers output is computed as the total size of
+# output files. But since not every storage is file-based, this logic is not
+# always applicable. If that is the case, the logic can be replaced by
+# implementing the following interface:
+#   org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigStatsOutputSizeReader
+
+# This class will be invoked to compute the size of reducers output.
+# pig.stats.output.size.reader = &lt;fully qualified class name of a PigStatsOutputSizeReader implementation&gt;
+
+# If you need to register more than one reader, you can register them as a comma
+# separated list. Every reader implements a boolean supports(POStore sto) method.
+# When there are more than one reader, they are consulted in order, and the
+# first one whose supports() method returns true will be used.
+#
+#####################################################################
+
+#pig.load.default.statements=
+
+#####################################################################
+
+########### Override hadoop configs programatically #################
+
+# By default, Pig expects hadoop configs (hadoop-site.xml and core-site.xml)
+# to be present on the classpath. There are cases when these configs are
+# needed to be passed programatically, such as while using the PigServer API.
+# In such cases, you can override hadoop configs by setting the property
+# "pig.use.overriden.hadoop.configs".
+#
+# When this property is set to true, Pig ignores looking for hadoop configs
+# in the classpath and instead picks it up from Properties/Configuration
+# object passed to it.
+
+# pig.use.overriden.hadoop.configs=false
+#
+######################################################################
+
+# Check if the script needs to check multiple stores writing
+# to the same location. When set to true, stops the execution
+# of script right away.
+pig.location.check.strict=false
+
+######################################################################
+
+# This key is used to define the default load func. Pig will fallback
+# on PigStorage as default in case this is undefined.
+
+# pig.default.load.func=&lt;fully qualified class name of a LoadFunc implementation&gt;
+# For eg, pig.default.load.func=org.apache.pig.custom.MyCustomStorage
+
+# This key is used to define the default store func. Pig will fallback
+# on PigStorage as default in case this is undefined.
+
+# pig.default.store.func=&lt;fully qualified class name of a StoreFunc implementation&gt;
+# For eg, pig.default.store.func=org.apache.pig.custom.MyCustomStorage
+
+# This option is used to define whether to support recovery to handle the
+# application master getting restarted.
+# pig.output.committer.recovery.support=true
+
+# Set this option to true if you need to use the old partition filter optimizer.
+# Note: Old filter optimizer PColFilterOptimizer will be deprecated in the future.
+# pig.exec.useOldPartitionFilterOptimizer=true
+
+    </value>
+  </property>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de3425f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/PIG/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/PIG/metainfo.xml b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/PIG/metainfo.xml
new file mode 100644
index 0000000..68f7566
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/PIG/metainfo.xml
@@ -0,0 +1,75 @@
+<?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>PIG</name>
+      <displayName>Pig</displayName>
+      <comment>Scripting platform for analyzing large datasets</comment>
+      <version>0.12.0.2.0</version>
+      <components>
+        <component>
+          <name>PIG</name>
+          <displayName>Pig</displayName>
+          <category>CLIENT</category>
+          <cardinality>0+</cardinality>
+          <commandScript>
+            <script>scripts/pig_client.py</script>
+            <scriptType>PYTHON</scriptType>
+            <timeout>600</timeout>
+          </commandScript>
+          <configFiles>
+            <configFile>
+              <type>env</type>
+              <fileName>pig-env.cmd</fileName>
+              <dictionaryName>pig-env</dictionaryName>
+            </configFile>
+            <configFile>
+              <type>env</type>
+              <fileName>log4j.properties</fileName>
+              <dictionaryName>pig-log4j</dictionaryName>
+            </configFile>
+            <configFile>
+              <type>env</type>
+              <fileName>pig.properties</fileName>
+              <dictionaryName>pig-properties</dictionaryName>
+            </configFile>
+          </configFiles>
+        </component>
+      </components>
+
+      <commandScript>
+        <script>scripts/service_check.py</script>
+        <scriptType>PYTHON</scriptType>
+        <timeout>300</timeout>
+      </commandScript>
+
+      <requiredServices>
+        <service>YARN</service>
+      </requiredServices>
+
+      <configuration-dependencies>
+        <config-type>pig-env</config-type>
+        <config-type>pig-log4j</config-type>
+        <config-type>pig-properties</config-type>
+      </configuration-dependencies>
+
+    </service>
+  </services>
+</metainfo>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de3425f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/PIG/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/PIG/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/PIG/package/scripts/params.py
new file mode 100644
index 0000000..854d577
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/PIG/package/scripts/params.py
@@ -0,0 +1,37 @@
+"""
+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.
+
+Ambari Agent
+
+"""
+
+from resource_management import *
+
+# server configurations
+config = Script.get_config()
+hdp_root = os.path.abspath(os.path.join(os.environ["HADOOP_HOME"],".."))
+pig_home = os.environ['PIG_HOME']
+pig_conf_dir = os.path.join(pig_home,'conf')
+pig_properties = config['configurations']['pig-properties']['pig-content']
+
+if (('pig-log4j' in config['configurations']) and ('content' in config['configurations']['pig-log4j'])):
+  log4j_props = config['configurations']['pig-log4j']['content']
+else:
+  log4j_props = None
+
+pig_user = "hadoop"
+hdfs_user = "hadoop"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/8de3425f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/PIG/package/scripts/pig.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/PIG/package/scripts/pig.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/PIG/package/scripts/pig.py
new file mode 100644
index 0000000..8e677ef
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/PIG/package/scripts/pig.py
@@ -0,0 +1,49 @@
+"""
+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.
+
+Ambari Agent
+
+"""
+
+import os
+from resource_management import *
+
+def pig():
+  import params
+  File(format("{params.pig_conf_dir}/pig.properties"),
+       mode="f",
+       owner=params.pig_user,
+       content=params.pig_properties
+  )
+
+  if (params.log4j_props != None):
+    File(format("{params.pig_conf_dir}/log4j.properties"),
+         mode='f',
+         owner=params.pig_user,
+         content=params.log4j_props
+    )
+
+def pig_TemplateConfig(name):
+  import params
+
+  if not isinstance(name, list):
+    name = [name]
+
+  for x in name:
+    TemplateConfig( format("{pig_conf_dir}/{x}"),
+        owner = params.hdfs_user
+    )


Mime
View raw message