You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jl...@apache.org on 2015/08/17 07:13:30 UTC
[05/23] ambari git commit: AMBARI-12779: [PluggableStackDefinition]
Remove ambari-server/src/main/resources/stacks/PHD (jluniya)
http://git-wip-us.apache.org/repos/asf/ambari/blob/930d4499/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/files/oozieSmoke2.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/files/oozieSmoke2.sh b/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/files/oozieSmoke2.sh
deleted file mode 100644
index 4e21aad..0000000
--- a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/files/oozieSmoke2.sh
+++ /dev/null
@@ -1,112 +0,0 @@
-#!/usr/bin/env bash
-#
-#
-# 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.
-#
-#
-
-os_family=$1
-shift
-
-function getValueFromField {
- xmllint $1 | grep "<name>$2</name>" -C 2 | grep '<value>' | cut -d ">" -f2 | cut -d "<" -f1
- return $?
-}
-
-function checkOozieJobStatus {
- local job_id=$1
- local num_of_tries=$2
- #default num_of_tries to 10 if not present
- num_of_tries=${num_of_tries:-10}
- local i=0
- local rc=1
- local cmd="source ${oozie_conf_dir}/oozie-env.sh ; ${oozie_bin_dir}/oozie job -oozie ${OOZIE_SERVER} -info $job_id"
- su -s /bin/bash - ${smoke_test_user} -c "$cmd"
- while [ $i -lt $num_of_tries ] ; do
- cmd_output=`su -s /bin/bash - ${smoke_test_user} -c "$cmd"`
- (IFS='';echo $cmd_output)
- act_status=$(IFS='';echo $cmd_output | grep ^Status | cut -d':' -f2 | sed 's| ||g')
- echo "workflow_status=$act_status"
- if [ "RUNNING" == "$act_status" ]; then
- #increment the counter and get the status again after waiting for 15 secs
- sleep 15
- (( i++ ))
- elif [ "SUCCEEDED" == "$act_status" ]; then
- rc=0;
- break;
- else
- rc=1
- break;
- fi
- done
- return $rc
-}
-
-export oozie_conf_dir=$1
-export oozie_bin_dir=$2
-export hadoop_conf_dir=$3
-export hadoop_bin_dir=$4
-export smoke_test_user=$5
-export security_enabled=$6
-export smoke_user_keytab=$7
-export kinit_path_local=$8
-
-export OOZIE_EXIT_CODE=0
-export JOBTRACKER=`getValueFromField ${hadoop_conf_dir}/yarn-site.xml yarn.resourcemanager.address`
-export NAMENODE=`getValueFromField ${hadoop_conf_dir}/core-site.xml fs.defaultFS`
-export OOZIE_SERVER=`getValueFromField ${oozie_conf_dir}/oozie-site.xml oozie.base.url | tr '[:upper:]' '[:lower:]'`
-
-if [ "$os_family" == "ubuntu" ] ; then
- LIST_PACKAGE_FILES_CMD='dpkg-query -L'
-else
- LIST_PACKAGE_FILES_CMD='rpm -ql'
-fi
-
-
-export OOZIE_EXAMPLES_DIR=`$LIST_PACKAGE_FILES_CMD oozie-client | grep 'oozie-examples.tar.gz$' | xargs dirname`
-if [[ -z "$OOZIE_EXAMPLES_DIR" ]] ; then
- export OOZIE_EXAMPLES_DIR='/usr/phd/current/oozie-client/doc/'
-fi
-cd $OOZIE_EXAMPLES_DIR
-
-tar -zxf oozie-examples.tar.gz
-sed -i "s|nameNode=hdfs://localhost:8020|nameNode=$NAMENODE|g" examples/apps/map-reduce/job.properties
-sed -i "s|nameNode=hdfs://localhost:9000|nameNode=$NAMENODE|g" examples/apps/map-reduce/job.properties
-sed -i "s|jobTracker=localhost:8021|jobTracker=$JOBTRACKER|g" examples/apps/map-reduce/job.properties
-sed -i "s|jobTracker=localhost:9001|jobTracker=$JOBTRACKER|g" examples/apps/map-reduce/job.properties
-sed -i "s|jobTracker=localhost:8032|jobTracker=$JOBTRACKER|g" examples/apps/map-reduce/job.properties
-sed -i "s|oozie.wf.application.path=hdfs://localhost:9000|oozie.wf.application.path=$NAMENODE|g" examples/apps/map-reduce/job.properties
-
-if [[ $security_enabled == "True" ]]; then
- kinitcmd="${kinit_path_local} -kt ${smoke_user_keytab} ${smoke_test_user}; "
-else
- kinitcmd=""
-fi
-
-su -s /bin/bash - ${smoke_test_user} -c "${hadoop_bin_dir}/hdfs --config ${hadoop_conf_dir} dfs -rm -r examples"
-su -s /bin/bash - ${smoke_test_user} -c "${hadoop_bin_dir}/hdfs --config ${hadoop_conf_dir} dfs -rm -r input-data"
-su -s /bin/bash - ${smoke_test_user} -c "${hadoop_bin_dir}/hdfs --config ${hadoop_conf_dir} dfs -copyFromLocal $OOZIE_EXAMPLES_DIR/examples examples"
-su -s /bin/bash - ${smoke_test_user} -c "${hadoop_bin_dir}/hdfs --config ${hadoop_conf_dir} dfs -copyFromLocal $OOZIE_EXAMPLES_DIR/examples/input-data input-data"
-
-cmd="${kinitcmd}source ${oozie_conf_dir}/oozie-env.sh ; ${oozie_bin_dir}/oozie -Doozie.auth.token.cache=false job -oozie $OOZIE_SERVER -config $OOZIE_EXAMPLES_DIR/examples/apps/map-reduce/job.properties -run"
-echo $cmd
-job_info=`su -s /bin/bash - ${smoke_test_user} -c "$cmd" | grep "job:"`
-job_id="`echo $job_info | cut -d':' -f2`"
-checkOozieJobStatus "$job_id" 15
-OOZIE_EXIT_CODE="$?"
-exit $OOZIE_EXIT_CODE
http://git-wip-us.apache.org/repos/asf/ambari/blob/930d4499/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/files/wrap_ooziedb.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/files/wrap_ooziedb.sh b/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/files/wrap_ooziedb.sh
deleted file mode 100644
index 36576b5..0000000
--- a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/files/wrap_ooziedb.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env bash
-#
-#
-# 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.
-#
-#
-OUT=`cd /var/tmp/oozie && /usr/lib/oozie/bin/ooziedb.sh "$@" 2>&1`
-EC=$?
-echo $OUT
-GRVAR=`echo ${OUT} | grep -o "java.lang.Exception: DB schema exists"`
-if [ ${EC} -ne 0 ] && [ -n "$GRVAR" ]
-then
- exit 0
-else
- exit $EC
-fi
http://git-wip-us.apache.org/repos/asf/ambari/blob/930d4499/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/oozie.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/oozie.py b/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/oozie.py
deleted file mode 100644
index befea51..0000000
--- a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/oozie.py
+++ /dev/null
@@ -1,152 +0,0 @@
-#!/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 os
-
-from resource_management import *
-
-def oozie(is_server=False # TODO: see if see can remove this
- ):
- import params
-
- if is_server:
- params.HdfsDirectory(params.oozie_hdfs_user_dir,
- action="create",
- owner=params.oozie_user,
- mode=params.oozie_hdfs_user_mode
- )
- Directory( params.conf_dir,
- recursive = True,
- owner = params.oozie_user,
- group = params.user_group
- )
- XmlConfig( "oozie-site.xml",
- conf_dir = params.conf_dir,
- configurations = params.config['configurations']['oozie-site'],
- configuration_attributes=params.config['configuration_attributes']['oozie-site'],
- owner = params.oozie_user,
- group = params.user_group,
- mode = 0664
- )
- File(format("{conf_dir}/oozie-env.sh"),
- owner=params.oozie_user,
- content=InlineTemplate(params.oozie_env_sh_template)
- )
-
- if params.security_enabled:
- tomcat_conf_dir = format("{tomcat_conf_secure}")
- else:
- tomcat_conf_dir = format("{tomcat_conf}")
-
- File(format("{tomcat_conf_dir}/catalina.properties"),
- content = Template("catalina.properties.j2"),
- owner = params.oozie_user,
- group = params.user_group,
- mode = 0755
- )
-
- if (params.log4j_props != None):
- File(format("{params.conf_dir}/oozie-log4j.properties"),
- mode=0644,
- group=params.user_group,
- owner=params.oozie_user,
- content=params.log4j_props
- )
- elif (os.path.exists(format("{params.conf_dir}/oozie-log4j.properties"))):
- File(format("{params.conf_dir}/oozie-log4j.properties"),
- mode=0644,
- group=params.user_group,
- owner=params.oozie_user
- )
-
- environment = {
- "no_proxy": format("{ambari_server_hostname}")
- }
-
- if params.jdbc_driver_name == "com.mysql.jdbc.Driver" or \
- params.jdbc_driver_name == "org.postgresql.Driver" or \
- params.jdbc_driver_name == "oracle.jdbc.driver.OracleDriver":
- Execute(format("/bin/sh -c 'cd /usr/lib/ambari-agent/ &&\
- curl -kf -x \"\" \
- --retry 5 {jdk_location}{check_db_connection_jar_name}\
- -o {check_db_connection_jar_name}'"),
- not_if = format("[ -f {check_db_connection_jar} ]"),
- environment=environment
- )
-
- oozie_ownership( )
-
- if is_server:
- oozie_server_specific( )
-
-def oozie_ownership(
-):
- import params
-
- File ( format("{conf_dir}/adminusers.txt"),
- owner = params.oozie_user,
- group = params.user_group
- )
-
- File ( format("{conf_dir}/hadoop-config.xml"),
- owner = params.oozie_user,
- group = params.user_group
- )
-
- File ( format("{conf_dir}/oozie-default.xml"),
- owner = params.oozie_user,
- group = params.user_group
- )
-
- Directory ( format("{conf_dir}/action-conf"),
- owner = params.oozie_user,
- group = params.user_group
- )
-
- File ( format("{conf_dir}/action-conf/hive.xml"),
- owner = params.oozie_user,
- group = params.user_group
- )
-
-def oozie_server_specific(
-):
- import params
-
- File(params.pid_file,
- action="delete",
- not_if="ls {pid_file} >/dev/null 2>&1 && !(ps `cat {pid_file}` >/dev/null 2>&1)"
- )
-
- oozie_server_directorties = [params.oozie_pid_dir, params.oozie_log_dir, params.oozie_tmp_dir, params.oozie_data_dir, params.oozie_lib_dir, params.oozie_webapps_dir, params.oozie_webapps_conf_dir, params.oozie_server_dir]
- Directory( oozie_server_directorties,
- owner = params.oozie_user,
- mode = 0755,
- recursive = True
- )
-
- cmd1 = "sh"
-
- if params.jdbc_driver_name=="com.mysql.jdbc.Driver" or params.jdbc_driver_name=="oracle.jdbc.driver.OracleDriver":
- cmd1 += format(" && cp {jdbc_driver_jar} {oozie_lib_dir}")
-
- no_op_test = format("ls {pid_file} >/dev/null 2>&1 && ps `cat {pid_file}` >/dev/null 2>&1")
- Execute( [cmd1],
- not_if = no_op_test
- )
-
http://git-wip-us.apache.org/repos/asf/ambari/blob/930d4499/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/oozie_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/oozie_client.py b/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/oozie_client.py
deleted file mode 100644
index f77a8db..0000000
--- a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/oozie_client.py
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/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 *
-
-from oozie import oozie
-from oozie_service import oozie_service
-
-
-class OozieClient(Script):
- def install(self, env):
- self.install_packages(env)
- self.configure(env)
-
- def configure(self, env):
- import params
- env.set_params(params)
-
- oozie(is_server=False)
-
- def status(self, env):
- raise ClientComponentHasNoStatus()
-
-if __name__ == "__main__":
- OozieClient().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/930d4499/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/oozie_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/oozie_server.py b/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/oozie_server.py
deleted file mode 100644
index 70414fc..0000000
--- a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/oozie_server.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/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 *
-
-from oozie import oozie
-from oozie_service import oozie_service
-
-
-class OozieServer(Script):
- def install(self, env):
- self.install_packages(env)
-
- def configure(self, env):
- import params
- env.set_params(params)
-
- oozie(is_server=True)
-
- def start(self, env):
- import params
- env.set_params(params)
- #TODO remove this when config command will be implemented
- self.configure(env)
- oozie_service(action='start')
-
- def stop(self, env):
- import params
- env.set_params(params)
- oozie_service(action='stop')
-
- def status(self, env):
- import status_params
- env.set_params(status_params)
- check_process_status(status_params.pid_file)
-
-if __name__ == "__main__":
- OozieServer().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/930d4499/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/oozie_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/oozie_service.py b/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/oozie_service.py
deleted file mode 100644
index 03608ae..0000000
--- a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/oozie_service.py
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/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 os
-from resource_management import *
-
-def oozie_service(action = 'start'): # 'start' or 'stop'
- import params
-
- kinit_if_needed = format("{kinit_path_local} -kt {oozie_keytab} {oozie_principal};") if params.security_enabled else ""
- no_op_test = format("ls {pid_file} >/dev/null 2>&1 && ps `cat {pid_file}` >/dev/null 2>&1")
-
- if action == 'start':
- start_cmd = "service oozie start"
-
- if params.jdbc_driver_name == "com.mysql.jdbc.Driver" or \
- params.jdbc_driver_name == "org.postgresql.Driver" or \
- params.jdbc_driver_name == "oracle.jdbc.driver.OracleDriver":
- db_connection_check_command = format("{java_home}/bin/java -cp {check_db_connection_jar}:{jdbc_driver_jar} org.apache.ambari.server.DBConnectionVerification '{oozie_jdbc_connection_url}' {oozie_metastore_user_name} {oozie_metastore_user_passwd!p} {jdbc_driver_name}")
- else:
- db_connection_check_command = None
-
- cmd1 = "service oozie init"
- cmd2 = format("{kinit_if_needed} {put_shared_lib_to_hdfs_cmd} ; hadoop --config {hadoop_conf_dir} dfs -chmod -R 755 {oozie_hdfs_user_dir}/share")
-
- if not os.path.isfile(params.jdbc_driver_jar) and params.jdbc_driver_name == "org.postgresql.Driver":
- print format("ERROR: jdbc file {jdbc_driver_jar} is unavailable. Please, follow next steps:\n" \
- "1) Download postgresql-9.0-801.jdbc4.jar.\n2) Create needed directory: mkdir -p {oozie_home}/libserver/\n" \
- "3) Copy postgresql-9.0-801.jdbc4.jar to newly created dir: cp /path/to/jdbc/postgresql-9.0-801.jdbc4.jar " \
- "{oozie_home}/libserver/\n4) Copy postgresql-9.0-801.jdbc4.jar to libext: cp " \
- "/path/to/jdbc/postgresql-9.0-801.jdbc4.jar {oozie_home}/libext/\n")
- exit(1)
-
- if db_connection_check_command:
- Execute( db_connection_check_command, tries=5, try_sleep=10)
-
- Execute( cmd1,
- not_if = no_op_test,
- ignore_failures = True
- )
-
- Execute( cmd2,
- user = params.oozie_user,
- not_if = format("{kinit_if_needed} hadoop --config {hadoop_conf_dir} dfs -ls /user/oozie/share | awk 'BEGIN {{count=0;}} /share/ {{count++}} END {{if (count > 0) {{exit 0}} else {{exit 1}}}}'"),
- path = params.execute_path
- )
-
- Execute( start_cmd,
- not_if = no_op_test,
- )
- elif action == 'stop':
- stop_cmd = "service oozie stop"
- Execute( stop_cmd,
- only_if = no_op_test
- )
-
-
-
http://git-wip-us.apache.org/repos/asf/ambari/blob/930d4499/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/params.py b/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/params.py
deleted file mode 100644
index b88aa6e..0000000
--- a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/params.py
+++ /dev/null
@@ -1,164 +0,0 @@
-#!/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 status_params
-import os
-import fnmatch
-
-# server configurations
-config = Script.get_config()
-tmp_dir = Script.get_tmp_dir()
-
-#RPM versioning support
-rpm_version = default("/configurations/cluster-env/rpm_version", None)
-
-#hadoop params
-if rpm_version:
- hadoop_bin_dir = "/usr/phd/current/hadoop-client/bin"
- hadoop_lib_home = "/usr/phd/current/hadoop-client/lib"
- hive_lib_dir = "/usr/phd/current/hive-client/lib"
- oozie_lib_dir = "/usr/phd/current/oozie-client/"
- oozie_setup_sh = "/usr/phd/current/oozie-client/bin/oozie-setup.sh"
- oozie_webapps_dir = "/usr/phd/current/oozie-client/tomcat-deployment/webapps"
- oozie_webapps_conf_dir = "/usr/phd/current/oozie-client/tomcat-deployment/conf"
- oozie_libext_dir = "/usr/phd/current/oozie-client/libext"
- oozie_server_dir = "/usr/phd/current/oozie-client/tomcat-deployment"
- oozie_shared_lib = "/usr/phd/current/oozie-client/oozie-sharelib.tar.gz"
- oozie_home = "/usr/phd/current/oozie-client"
- oozie_bin_dir = "/usr/phd/current/oozie-client/bin"
- falcon_home = '/usr/phd/current/falcon-client'
- tomcat_conf = "/etc/oozie/tomcat-conf.http/conf"
- tomcat_conf_secure = "/etc/oozie/tomcat-conf.https/conf"
-
-else:
- hadoop_bin_dir = "/usr/bin"
- hadoop_lib_home = "/usr/lib/hadoop/lib"
- hive_lib_dir = "/usr/lib/hive/lib"
- oozie_lib_dir = "/var/lib/oozie/"
- oozie_setup_sh = "/usr/lib/oozie/bin/oozie-setup.sh"
- oozie_webapps_dir = "/var/lib/oozie/tomcat-deployment/webapps/"
- oozie_webapps_conf_dir = "/var/lib/oozie/tomcat-deployment/conf"
- oozie_libext_dir = "/usr/lib/oozie/libext"
- oozie_server_dir = "/var/lib/oozie/tomcat-deployment"
- oozie_shared_lib = "/usr/lib/oozie/oozie-sharelib.tar.gz"
- oozie_home = "/usr/lib/oozie"
- oozie_bin_dir = "/usr/bin"
- falcon_home = '/usr/lib/falcon'
- tomcat_conf = "/etc/oozie/tomcat-conf.http/conf"
- tomcat_conf_secure = "/etc/oozie/tomcat-conf.https/conf"
-
-execute_path = oozie_bin_dir + os.pathsep + hadoop_bin_dir
-
-hadoop_conf_dir = "/etc/hadoop/conf"
-conf_dir = "/etc/oozie/conf"
-oozie_user = config['configurations']['oozie-env']['oozie_user']
-smokeuser = config['configurations']['cluster-env']['smokeuser']
-user_group = config['configurations']['cluster-env']['user_group']
-jdk_location = config['hostLevelParams']['jdk_location']
-check_db_connection_jar_name = "DBConnectionVerification.jar"
-check_db_connection_jar = format("/usr/lib/ambari-agent/{check_db_connection_jar_name}")
-oozie_tmp_dir = "/var/tmp/oozie"
-oozie_hdfs_user_dir = format("/user/{oozie_user}")
-oozie_pid_dir = status_params.oozie_pid_dir
-pid_file = status_params.pid_file
-hadoop_jar_location = "/usr/lib/hadoop/"
-security_enabled = config['configurations']['cluster-env']['security_enabled']
-
-hive_jar_files = ""
-
-if not os.path.exists(hive_lib_dir):
- raise Fail("Could not find Hive library directory: %s" % (hive_lib_dir))
-
-for entry in os.listdir(hive_lib_dir):
- absolute_path = os.path.join(hive_lib_dir, entry)
- if os.path.isfile(absolute_path) and not os.path.islink(absolute_path):
- if fnmatch.fnmatchcase(entry, "hive-*.jar"):
- if (len(hive_jar_files) == 0):
- hive_jar_files = absolute_path
- else:
- hive_jar_files = hive_jar_files + "," + absolute_path
-
-catalina_properties_common_loader = "/usr/lib/hive-hcatalog/share/hcatalog/*.jar,/usr/lib/hive-hcatalog/share/webhcat/java-client/*.jar"
-
-if (len(hive_jar_files) != 0):
- catalina_properties_common_loader = hive_jar_files + "," + catalina_properties_common_loader
-
-kinit_path_local = functions.get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None))
-oozie_service_keytab = config['configurations']['oozie-site']['oozie.service.HadoopAccessorService.keytab.file']
-oozie_principal = config['configurations']['oozie-site']['oozie.service.HadoopAccessorService.kerberos.principal']
-smokeuser_keytab = config['configurations']['cluster-env']['smokeuser_keytab']
-oozie_keytab = config['configurations']['oozie-env']['oozie_keytab']
-oozie_env_sh_template = config['configurations']['oozie-env']['content']
-
-oracle_driver_jar_name = "ojdbc6.jar"
-
-java_home = config['hostLevelParams']['java_home']
-oozie_metastore_user_name = config['configurations']['oozie-site']['oozie.service.JPAService.jdbc.username']
-oozie_metastore_user_passwd = default("/configurations/oozie-site/oozie.service.JPAService.jdbc.password","")
-oozie_jdbc_connection_url = default("/configurations/oozie-site/oozie.service.JPAService.jdbc.url", "")
-oozie_log_dir = config['configurations']['oozie-env']['oozie_log_dir']
-oozie_data_dir = config['configurations']['oozie-env']['oozie_data_dir']
-oozie_server_port = get_port_from_url(config['configurations']['oozie-site']['oozie.base.url'])
-oozie_server_admin_port = config['configurations']['oozie-env']['oozie_admin_port']
-oozie_env_sh_template = config['configurations']['oozie-env']['content']
-fs_root = config['configurations']['core-site']['fs.defaultFS']
-
-put_shared_lib_to_hdfs_cmd = format("{oozie_setup_sh} sharelib create -fs {fs_root} -locallib {oozie_shared_lib}")
-
-jdbc_driver_name = default("/configurations/oozie-site/oozie.service.JPAService.jdbc.driver", "")
-
-if jdbc_driver_name == "com.mysql.jdbc.Driver":
- jdbc_driver_jar = "/usr/share/java/mysql-connector-java.jar"
-elif jdbc_driver_name == "org.postgresql.Driver":
- jdbc_driver_jar = format("{oozie_home}/libserver/postgresql-9.0-801.jdbc4.jar")
-elif jdbc_driver_name == "oracle.jdbc.driver.OracleDriver":
- jdbc_driver_jar = "/usr/share/java/ojdbc6.jar"
-else:
- jdbc_driver_jar = ""
-
-hostname = config["hostname"]
-ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0]
-falcon_host = default("/clusterHostInfo/falcon_server_hosts", [])
-has_falcon_host = not len(falcon_host) == 0
-
-#oozie-log4j.properties
-if (('oozie-log4j' in config['configurations']) and ('content' in config['configurations']['oozie-log4j'])):
- log4j_props = config['configurations']['oozie-log4j']['content']
-else:
- log4j_props = None
-
-oozie_hdfs_user_mode = 0775
-#for create_hdfs_directory
-hdfs_user_keytab = config['configurations']['hadoop-env']['hdfs_user_keytab']
-hdfs_user = config['configurations']['hadoop-env']['hdfs_user']
-hdfs_principal_name = config['configurations']['hadoop-env']['hdfs_principal_name']
-import functools
-#create partial functions with common arguments for every HdfsDirectory call
-#to create hdfs directory we need to call params.HdfsDirectory in code
-HdfsDirectory = functools.partial(
- HdfsDirectory,
- conf_dir=hadoop_conf_dir,
- hdfs_user=hdfs_user,
- security_enabled = security_enabled,
- keytab = hdfs_user_keytab,
- kinit_path_local = kinit_path_local,
- bin_dir = hadoop_bin_dir
-)
http://git-wip-us.apache.org/repos/asf/ambari/blob/930d4499/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/service_check.py
deleted file mode 100644
index 231ee34..0000000
--- a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/service_check.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/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)
-
- # on PHD1 this file is different
- smoke_test_file_name = 'oozieSmoke2.sh'
-
- oozie_smoke_shell_file( smoke_test_file_name)
-
-def oozie_smoke_shell_file(
- file_name
-):
- import params
-
- File( format("{tmp_dir}/{file_name}"),
- content = StaticFile(file_name),
- mode = 0755
- )
-
- os_family = System.get_instance().os_family
-
- if params.security_enabled:
- sh_cmd = format("{tmp_dir}/{file_name} {os_family} {conf_dir} {oozie_bin_dir} {hadoop_conf_dir} {hadoop_bin_dir} {smokeuser} {security_enabled} {smokeuser_keytab} {kinit_path_local}")
- else:
- sh_cmd = format("{tmp_dir}/{file_name} {os_family} {conf_dir} {oozie_bin_dir} {hadoop_conf_dir} {hadoop_bin_dir} {smokeuser} {security_enabled}")
-
- Execute( format("{tmp_dir}/{file_name}"),
- command = sh_cmd,
- path = params.execute_path,
- tries = 3,
- try_sleep = 5,
- logoutput = True
- )
-
-if __name__ == "__main__":
- OozieServiceCheck().execute()
-
http://git-wip-us.apache.org/repos/asf/ambari/blob/930d4499/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/status_params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/status_params.py b/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/status_params.py
deleted file mode 100644
index a665449..0000000
--- a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/status_params.py
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/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 *
-
-config = Script.get_config()
-
-oozie_pid_dir = config['configurations']['oozie-env']['oozie_pid_dir']
-pid_file = format("{oozie_pid_dir}/oozie.pid")
http://git-wip-us.apache.org/repos/asf/ambari/blob/930d4499/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/templates/catalina.properties.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/templates/catalina.properties.j2 b/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/templates/catalina.properties.j2
deleted file mode 100644
index 96fa996..0000000
--- a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/templates/catalina.properties.j2
+++ /dev/null
@@ -1,81 +0,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.
-
-#
-# List of comma-separated packages that start with or equal this string
-# will cause a security exception to be thrown when
-# passed to checkPackageAccess unless the
-# corresponding RuntimePermission ("accessClassInPackage."+package) has
-# been granted.
-package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans.
-#
-# List of comma-separated packages that start with or equal this string
-# will cause a security exception to be thrown when
-# passed to checkPackageDefinition unless the
-# corresponding RuntimePermission ("defineClassInPackage."+package) has
-# been granted.
-#
-# by default, no packages are restricted for definition, and none of
-# the class loaders supplied with the JDK call checkPackageDefinition.
-#
-package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
-
-#
-#
-# List of comma-separated paths defining the contents of the "common"
-# classloader. Prefixes should be used to define what is the repository type.
-# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
-# If left as blank,the JVM system loader will be used as Catalina's "common"
-# loader.
-# Examples:
-# "foo": Add this folder as a class repository
-# "foo/*.jar": Add all the JARs of the specified folder as class
-# repositories
-# "foo/bar.jar": Add bar.jar as a class repository
-common.loader=/var/lib/oozie/*.jar,/usr/lib/hadoop/client/*.jar,{{catalina_properties_common_loader}},/usr/lib/oozie/libserver/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar
-
-#
-# List of comma-separated paths defining the contents of the "server"
-# classloader. Prefixes should be used to define what is the repository type.
-# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
-# If left as blank, the "common" loader will be used as Catalina's "server"
-# loader.
-# Examples:
-# "foo": Add this folder as a class repository
-# "foo/*.jar": Add all the JARs of the specified folder as class
-# repositories
-# "foo/bar.jar": Add bar.jar as a class repository
-server.loader=
-
-#
-# List of comma-separated paths defining the contents of the "shared"
-# classloader. Prefixes should be used to define what is the repository type.
-# Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
-# the "common" loader will be used as Catalina's "shared" loader.
-# Examples:
-# "foo": Add this folder as a class repository
-# "foo/*.jar": Add all the JARs of the specified folder as class
-# repositories
-# "foo/bar.jar": Add bar.jar as a class repository
-# Please note that for single jars, e.g. bar.jar, you need the URL form
-# starting with file:.
-shared.loader=
-
-#
-# String cache configuration.
-tomcat.util.buf.StringCache.byte.enabled=true
-#tomcat.util.buf.StringCache.char.enabled=true
-#tomcat.util.buf.StringCache.trainThreshold=500000
-#tomcat.util.buf.StringCache.cacheSize=5000
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/930d4499/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/templates/oozie-log4j.properties.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/templates/oozie-log4j.properties.j2 b/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/templates/oozie-log4j.properties.j2
deleted file mode 100644
index 8c9f25e..0000000
--- a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/templates/oozie-log4j.properties.j2
+++ /dev/null
@@ -1,92 +0,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.
-#}
-
-#
-# 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://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 - SERVER[${oozie.instance.id}] %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
http://git-wip-us.apache.org/repos/asf/ambari/blob/930d4499/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/configuration/pig-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/configuration/pig-env.xml b/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/configuration/pig-env.xml
deleted file mode 100644
index aded45f..0000000
--- a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/configuration/pig-env.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?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>
- <!-- pig-env.sh -->
- <property>
- <name>content</name>
- <description>This is the jinja template for pig-env.sh file</description>
- <value>
-JAVA_HOME={{java64_home}}
-HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}
-
-if [ -d "/usr/lib/tez" ]; then
- PIG_OPTS="$PIG_OPTS -Dmapreduce.framework.name=yarn"
-fi
- </value>
- </property>
-
-</configuration>
http://git-wip-us.apache.org/repos/asf/ambari/blob/930d4499/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/configuration/pig-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/configuration/pig-log4j.xml b/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/configuration/pig-log4j.xml
deleted file mode 100644
index 4fe323c..0000000
--- a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/configuration/pig-log4j.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?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.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.
-#
-#
-#
-
-# ***** 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/930d4499/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/configuration/pig-properties.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/configuration/pig-properties.xml b/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/configuration/pig-properties.xml
deleted file mode 100644
index cee3211..0000000
--- a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/configuration/pig-properties.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<?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>Describe all the Pig agent configurations</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.
-
-# Pig default configuration file. All values can be overwritten by pig.properties and command line arguments.
-# see bin/pig -help
-
-# brief logging (no timestamps)
-brief=false
-
-# debug level, INFO is default
-debug=INFO
-
-# verbose print all log messages to screen (default to print only INFO and above to screen)
-verbose=false
-
-# exectype local|mapreduce, mapreduce is default
-exectype=mapreduce
-
-# Enable insertion of information about script into hadoop job conf
-pig.script.info.enabled=true
-
-# 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
-
-# Temporary location to store the intermediate data.
-pig.temp.dir=/tmp/
-
-# Threshold for merging FRJoin fragment files
-pig.files.concatenation.threshold=100
-pig.optimistic.files.concatenation=false;
-
-pig.disable.counter=false
-
-# Avoid pig failures when multiple jobs write to the same location
-pig.location.check.strict=false
-
-hcat.bin=/usr/bin/hcat
-
- </value>
- </property>
-
-</configuration>
http://git-wip-us.apache.org/repos/asf/ambari/blob/930d4499/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/metainfo.xml b/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/metainfo.xml
deleted file mode 100644
index 1b5f681..0000000
--- a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/metainfo.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?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.1.phd.3.0.0.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.sh</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>
- <osSpecifics>
- <osSpecific>
- <osFamily>any</osFamily>
- <packages>
- <package>
- <name>pig</name>
- </package>
- </packages>
- </osSpecific>
- </osSpecifics>
-
- <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/930d4499/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/package/files/pigSmoke.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/package/files/pigSmoke.sh b/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/package/files/pigSmoke.sh
deleted file mode 100644
index a22456e..0000000
--- a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/package/files/pigSmoke.sh
+++ /dev/null
@@ -1,18 +0,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 */
-
-A = load 'passwd' using PigStorage(':');
-B = foreach A generate \$0 as id;
-store B into 'pigsmoke.out';
http://git-wip-us.apache.org/repos/asf/ambari/blob/930d4499/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/package/scripts/params.py b/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/package/scripts/params.py
deleted file mode 100644
index ac1104d..0000000
--- a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/package/scripts/params.py
+++ /dev/null
@@ -1,57 +0,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.
-
-Ambari Agent
-
-"""
-
-from resource_management import *
-
-# server configurations
-config = Script.get_config()
-tmp_dir = Script.get_tmp_dir()
-
-#RPM versioning support
-rpm_version = default("/configurations/cluster-env/rpm_version", None)
-
-#hadoop params
-if rpm_version:
- hadoop_bin_dir = "/usr/phd/current/hadoop-client/bin"
- hadoop_home = '/usr/phd/current/hadoop-client'
- pig_bin_dir = '/usr/phd/current/pig-client/bin'
-else:
- hadoop_bin_dir = "/usr/bin"
- hadoop_home = '/usr'
- pig_bin_dir = ""
-
-hadoop_conf_dir = "/etc/hadoop/conf"
-pig_conf_dir = "/etc/pig/conf"
-hdfs_user = config['configurations']['hadoop-env']['hdfs_user']
-hdfs_principal_name = config['configurations']['hadoop-env']['hdfs_principal_name']
-smokeuser = config['configurations']['cluster-env']['smokeuser']
-user_group = config['configurations']['cluster-env']['user_group']
-security_enabled = config['configurations']['cluster-env']['security_enabled']
-smoke_user_keytab = config['configurations']['cluster-env']['smokeuser_keytab']
-kinit_path_local = functions.get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None))
-pig_env_sh_template = config['configurations']['pig-env']['content']
-
-# not supporting 32 bit jdk.
-java64_home = config['hostLevelParams']['java_home']
-
-pig_properties = config['configurations']['pig-properties']['content']
-
-log4j_props = config['configurations']['pig-log4j']['content']
http://git-wip-us.apache.org/repos/asf/ambari/blob/930d4499/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/package/scripts/pig.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/package/scripts/pig.py b/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/package/scripts/pig.py
deleted file mode 100644
index afdba8d..0000000
--- a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/package/scripts/pig.py
+++ /dev/null
@@ -1,59 +0,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.
-
-Ambari Agent
-
-"""
-import os
-
-from resource_management import *
-
-def pig():
- import params
-
- Directory( params.pig_conf_dir,
- recursive = True,
- owner = params.hdfs_user,
- group = params.user_group
- )
-
- File(format("{pig_conf_dir}/pig-env.sh"),
- owner=params.hdfs_user,
- content=InlineTemplate(params.pig_env_sh_template)
- )
-
- # pig_properties is always set to a default even if it's not in the payload
- File(format("{params.pig_conf_dir}/pig.properties"),
- mode=0644,
- group=params.user_group,
- owner=params.hdfs_user,
- content=params.pig_properties
- )
-
- if (params.log4j_props != None):
- File(format("{params.pig_conf_dir}/log4j.properties"),
- mode=0644,
- group=params.user_group,
- owner=params.hdfs_user,
- content=params.log4j_props
- )
- elif (os.path.exists(format("{params.pig_conf_dir}/log4j.properties"))):
- File(format("{params.pig_conf_dir}/log4j.properties"),
- mode=0644,
- group=params.user_group,
- owner=params.hdfs_user
- )
http://git-wip-us.apache.org/repos/asf/ambari/blob/930d4499/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/package/scripts/pig_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/package/scripts/pig_client.py b/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/package/scripts/pig_client.py
deleted file mode 100644
index 931dceb..0000000
--- a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/package/scripts/pig_client.py
+++ /dev/null
@@ -1,41 +0,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.
-
-Ambari Agent
-
-"""
-
-import sys
-from resource_management import *
-from pig import pig
-
-
-class PigClient(Script):
- def install(self, env):
- self.install_packages(env)
- self.configure(env)
-
- def configure(self, env):
- import params
- env.set_params(params)
- pig()
-
- def status(self, env):
- raise ClientComponentHasNoStatus()
-
-if __name__ == "__main__":
- PigClient().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/930d4499/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/package/scripts/service_check.py
deleted file mode 100644
index 7619bd6..0000000
--- a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/PIG/package/scripts/service_check.py
+++ /dev/null
@@ -1,69 +0,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.
-
-Ambari Agent
-
-"""
-
-from resource_management import *
-
-class PigServiceCheck(Script):
- def service_check(self, env):
- import params
- env.set_params(params)
-
- input_file = 'passwd'
- output_file = "pigsmoke.out"
-
- cleanup_cmd = format("dfs -rmr {output_file} {input_file}")
- #cleanup put below to handle retries; if retrying there wil be a stale file that needs cleanup; exit code is fn of second command
- create_file_cmd = format("{cleanup_cmd}; hadoop --config {hadoop_conf_dir} dfs -put /etc/passwd {input_file} ") #TODO: inconsistent that second command needs hadoop
- test_cmd = format("fs -test -e {output_file}")
-
- ExecuteHadoop( create_file_cmd,
- tries = 3,
- try_sleep = 5,
- user = params.smokeuser,
- conf_dir = params.hadoop_conf_dir,
- # for kinit run
- keytab = params.smoke_user_keytab,
- security_enabled = params.security_enabled,
- kinit_path_local = params.kinit_path_local,
- bin_dir = params.hadoop_bin_dir
- )
-
- File( format("{tmp_dir}/pigSmoke.sh"),
- content = StaticFile("pigSmoke.sh"),
- mode = 0755
- )
-
- Execute( format("pig {tmp_dir}/pigSmoke.sh"),
- tries = 3,
- try_sleep = 5,
- path = format('{pig_bin_dir}:/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin'),
- user = params.smokeuser
- )
-
- ExecuteHadoop( test_cmd,
- user = params.smokeuser,
- conf_dir = params.hadoop_conf_dir,
- bin_dir = params.hadoop_bin_dir
- )
-
-if __name__ == "__main__":
- PigServiceCheck().execute()
-
http://git-wip-us.apache.org/repos/asf/ambari/blob/930d4499/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/YARN/configuration-mapred/mapred-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/YARN/configuration-mapred/mapred-env.xml b/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/YARN/configuration-mapred/mapred-env.xml
deleted file mode 100644
index 14ae20b..0000000
--- a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/YARN/configuration-mapred/mapred-env.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?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>mapred_log_dir_prefix</name>
- <value>/var/log/hadoop-mapreduce</value>
- <description>Mapreduce Log Dir Prefix</description>
- </property>
- <property>
- <name>mapred_pid_dir_prefix</name>
- <value>/var/run/hadoop-mapreduce</value>
- <description>Mapreduce PID Dir Prefix</description>
- </property>
- <property>
- <name>mapred_user</name>
- <value>mapred</value>
- <property-type>USER</property-type>
- <description>Mapreduce User</description>
- </property>
- <property>
- <name>jobhistory_heapsize</name>
- <value>900</value>
- <description>Value for JobHistoryServer heap_size variable in hadoop-env.sh</description>
- </property>
-
- <!-- mapred-env.sh -->
- <property>
- <name>content</name>
- <description>This is the jinja template for mapred-env.sh file</description>
- <value>
-# export JAVA_HOME=/home/y/libexec/jdk1.6.0/
-
-export HADOOP_JOB_HISTORYSERVER_HEAPSIZE={{jobhistory_heapsize}}
-
-export HADOOP_MAPRED_ROOT_LOGGER=INFO,RFA
-
-#export HADOOP_JOB_HISTORYSERVER_OPTS=
-#export HADOOP_MAPRED_LOG_DIR="" # Where log files are stored. $HADOOP_MAPRED_HOME/logs by default.
-#export HADOOP_JHS_LOGGER=INFO,RFA # Hadoop JobSummary logger.
-#export HADOOP_MAPRED_PID_DIR= # The pid files are stored. /tmp by default.
-#export HADOOP_MAPRED_IDENT_STRING= #A string representing this instance of hadoop. $USER by default
-#export HADOOP_MAPRED_NICENESS= #The scheduling priority for daemons. Defaults to 0.
- </value>
- </property>
-</configuration>
http://git-wip-us.apache.org/repos/asf/ambari/blob/930d4499/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/YARN/configuration-mapred/mapred-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/YARN/configuration-mapred/mapred-site.xml b/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/YARN/configuration-mapred/mapred-site.xml
deleted file mode 100644
index 7955cb2..0000000
--- a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/YARN/configuration-mapred/mapred-site.xml
+++ /dev/null
@@ -1,360 +0,0 @@
-<?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.
--->
-
-<!-- Put site-specific property overrides in this file. -->
-
-<configuration supports_final="true" xmlns:xi="http://www.w3.org/2001/XInclude">
-
-<!-- i/o properties -->
-
- <property>
- <name>mapreduce.task.io.sort.mb</name>
- <value>200</value>
- <description>
- The total amount of buffer memory to use while sorting files, in megabytes.
- By default, gives each merge stream 1MB, which should minimize seeks.
- </description>
- </property>
-
- <property>
- <name>mapreduce.map.sort.spill.percent</name>
- <value>0.7</value>
- <description>
- The soft limit in the serialization buffer. Once reached, a thread will
- begin to spill the contents to disk in the background. Note that
- collection will not block if this threshold is exceeded while a spill
- is already in progress, so spills may be larger than this threshold when
- it is set to less than .5
- </description>
- </property>
-
- <property>
- <name>mapreduce.task.io.sort.factor</name>
- <value>100</value>
- <description>
- The number of streams to merge at once while sorting files.
- This determines the number of open file handles.
- </description>
- </property>
-
-<!-- map/reduce properties -->
- <property>
- <name>mapreduce.cluster.administrators</name>
- <value> hadoop</value>
- <description>
- Administrators for MapReduce applications.
- </description>
- </property>
-
- <property>
- <name>mapreduce.reduce.shuffle.parallelcopies</name>
- <value>30</value>
- <description>
- The default number of parallel transfers run by reduce during
- the copy(shuffle) phase.
- </description>
- </property>
-
- <property>
- <name>mapreduce.map.speculative</name>
- <value>false</value>
- <description>
- If true, then multiple instances of some map tasks
- may be executed in parallel.
- </description>
- </property>
-
- <property>
- <name>mapreduce.reduce.speculative</name>
- <value>false</value>
- <description>
- If true, then multiple instances of some reduce tasks may be
- executed in parallel.
- </description>
- </property>
-
- <property>
- <name>mapreduce.job.reduce.slowstart.completedmaps</name>
- <value>0.05</value>
- <description>
- Fraction of the number of maps in the job which should be complete before
- reduces are scheduled for the job.
- </description>
- </property>
-
- <property>
- <name>mapreduce.reduce.shuffle.merge.percent</name>
- <value>0.66</value>
- <description>
- The usage threshold at which an in-memory merge will be
- initiated, expressed as a percentage of the total memory allocated to
- storing in-memory map outputs, as defined by
- mapreduce.reduce.shuffle.input.buffer.percent.
- </description>
- </property>
-
- <property>
- <name>mapreduce.reduce.shuffle.input.buffer.percent</name>
- <value>0.7</value>
- <description>
- The percentage of memory to be allocated from the maximum heap
- size to storing map outputs during the shuffle.
- </description>
- </property>
-
- <property>
- <name>mapreduce.output.fileoutputformat.compress.type</name>
- <value>BLOCK</value>
- <description>
- If the job outputs are to compressed as SequenceFiles, how should
- they be compressed? Should be one of NONE, RECORD or BLOCK.
- </description>
- </property>
-
- <property>
- <name>mapreduce.reduce.input.buffer.percent</name>
- <value>0.0</value>
- <description>
- The percentage of memory- relative to the maximum heap size- to
- retain map outputs during the reduce. When the shuffle is concluded, any
- remaining map outputs in memory must consume less than this threshold before
- the reduce can begin.
- </description>
- </property>
-
- <!-- copied from kryptonite configuration -->
- <property>
- <name>mapreduce.map.output.compress</name>
- <value>false</value>
- <description>
- Should the outputs of the maps be compressed before being sent across the network. Uses SequenceFile compression.
- </description>
- </property>
-
- <property>
- <name>mapreduce.task.timeout</name>
- <value>300000</value>
- <description>
- The number of milliseconds before a task will be
- terminated if it neither reads an input, writes an output, nor
- updates its status string.
- </description>
- </property>
-
- <property>
- <name>mapreduce.map.memory.mb</name>
- <value>1024</value>
- <description>Virtual memory for single Map task</description>
- </property>
-
- <property>
- <name>mapreduce.reduce.memory.mb</name>
- <value>1024</value>
- <description>Virtual memory for single Reduce task</description>
- </property>
-
- <property>
- <name>mapreduce.shuffle.port</name>
- <value>13562</value>
- <description>
- Default port that the ShuffleHandler will run on.
- ShuffleHandler is a service run at the NodeManager to facilitate
- transfers of intermediate Map outputs to requesting Reducers.
- </description>
- </property>
-
- <property>
- <name>mapreduce.jobhistory.intermediate-done-dir</name>
- <value>/mr-history/tmp</value>
- <description>
- Directory where history files are written by MapReduce jobs.
- </description>
- </property>
-
- <property>
- <name>mapreduce.jobhistory.done-dir</name>
- <value>/mr-history/done</value>
- <description>
- Directory where history files are managed by the MR JobHistory Server.
- </description>
- </property>
-
- <property>
- <name>mapreduce.jobhistory.address</name>
- <value>localhost:10020</value>
- <description>Enter your JobHistoryServer hostname.</description>
- </property>
-
- <property>
- <name>mapreduce.jobhistory.webapp.address</name>
- <value>localhost:19888</value>
- <description>Enter your JobHistoryServer hostname.</description>
- </property>
-
- <property>
- <name>mapreduce.framework.name</name>
- <value>yarn</value>
- <description>
- The runtime framework for executing MapReduce jobs. Can be one of local,
- classic or yarn.
- </description>
- </property>
-
- <property>
- <name>yarn.app.mapreduce.am.staging-dir</name>
- <value>/user</value>
- <description>
- The staging dir used while submitting jobs.
- </description>
- </property>
-
- <property>
- <name>yarn.app.mapreduce.am.resource.mb</name>
- <value>512</value>
- <description>The amount of memory the MR AppMaster needs.</description>
- </property>
-
- <property>
- <name>yarn.app.mapreduce.am.command-opts</name>
- <value>-Xmx312m</value>
- <description>
- Java opts for the MR App Master processes.
- The following symbol, if present, will be interpolated: @taskid@ is replaced
- by current TaskID. Any other occurrences of '@' will go unchanged.
- For example, to enable verbose gc logging to a file named for the taskid in
- /tmp and to set the heap maximum to be a gigabyte, pass a 'value' of:
- -Xmx1024m -verbose:gc -Xloggc:/tmp/@taskid@.gc
-
- Usage of -Djava.library.path can cause programs to no longer function if
- hadoop native libraries are used. These values should instead be set as part
- of LD_LIBRARY_PATH in the map / reduce JVM env using the mapreduce.map.env and
- mapreduce.reduce.env config settings.
- </description>
- </property>
-
- <property>
- <name>yarn.app.mapreduce.am.admin-command-opts</name>
- <value>-server -XX:NewRatio=8 -Djava.net.preferIPv4Stack=true -Dhadoop.metrics.log.level=WARN</value>
- <description>
- Java opts for the MR App Master processes for admin purposes.
- It will appears before the opts set by yarn.app.mapreduce.am.command-opts and
- thus its options can be overridden user.
-
- Usage of -Djava.library.path can cause programs to no longer function if
- hadoop native libraries are used. These values should instead be set as part
- of LD_LIBRARY_PATH in the map / reduce JVM env using the mapreduce.map.env and
- mapreduce.reduce.env config settings.
- </description>
- </property>
-
- <property>
- <name>yarn.app.mapreduce.am.log.level</name>
- <value>INFO</value>
- <description>MR App Master process log level.</description>
- </property>
-
- <property>
- <name>mapreduce.admin.map.child.java.opts</name>
- <value>-server -XX:NewRatio=8 -Djava.net.preferIPv4Stack=true -Dhadoop.metrics.log.level=WARN</value>
- <description>This property stores Java options for map tasks.</description>
- </property>
-
- <property>
- <name>mapreduce.admin.reduce.child.java.opts</name>
- <value>-server -XX:NewRatio=8 -Djava.net.preferIPv4Stack=true -Dhadoop.metrics.log.level=WARN</value>
- <description>This property stores Java options for reduce tasks.</description>
- </property>
-
- <property>
- <name>mapreduce.application.classpath</name>
- <value>$HADOOP_MAPRED_HOME/share/hadoop/mapreduce/*,$HADOOP_MAPRED_HOME/share/hadoop/mapreduce/lib/*</value>
- <description>
- CLASSPATH for MR applications. A comma-separated list of CLASSPATH
- entries.
- </description>
- </property>
-
- <property>
- <name>mapreduce.am.max-attempts</name>
- <value>2</value>
- <description>
- The maximum number of application attempts. It is a
- application-specific setting. It should not be larger than the global number
- set by resourcemanager. Otherwise, it will be override. The default number is
- set to 2, to allow at least one retry for AM.
- </description>
- </property>
-
-
-
- <property>
- <name>mapreduce.map.java.opts</name>
- <value>-Xmx756m</value>
- <description>
- Larger heap-size for child jvms of maps.
- </description>
- </property>
-
-
- <property>
- <name>mapreduce.reduce.java.opts</name>
- <value>-Xmx756m</value>
- <description>
- Larger heap-size for child jvms of reduces.
- </description>
- </property>
-
- <property>
- <name>mapreduce.map.log.level</name>
- <value>INFO</value>
- <description>
- The logging level for the map task. The allowed levels are:
- OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE and ALL.
- </description>
- </property>
-
- <property>
- <name>mapreduce.reduce.log.level</name>
- <value>INFO</value>
- <description>
- The logging level for the reduce task. The allowed levels are:
- OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE and ALL.
- </description>
- </property>
-
- <property>
- <name>mapreduce.admin.user.env</name>
- <value>LD_LIBRARY_PATH=/usr/lib/hadoop/lib/native:/usr/lib/hadoop/lib/native/Linux-amd64-64</value>
- <description>
- Additional execution environment entries for map and reduce task processes.
- This is not an additive property. You must preserve the original value if
- you want your map and reduce tasks to have access to native libraries (compression, etc)
- </description>
- </property>
-
- <property>
- <name>mapreduce.output.fileoutputformat.compress</name>
- <value>false</value>
- <description>
- Should the job outputs be compressed?
- </description>
- </property>
-
-</configuration>
http://git-wip-us.apache.org/repos/asf/ambari/blob/930d4499/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/YARN/configuration/capacity-scheduler.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/YARN/configuration/capacity-scheduler.xml b/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/YARN/configuration/capacity-scheduler.xml
deleted file mode 100644
index 6c21848..0000000
--- a/ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/YARN/configuration/capacity-scheduler.xml
+++ /dev/null
@@ -1,132 +0,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="false" supports_adding_forbidden="true">
-
- <property>
- <name>yarn.scheduler.capacity.maximum-applications</name>
- <value>10000</value>
- <description>
- Maximum number of applications that can be pending and running.
- </description>
- </property>
-
- <property>
- <name>yarn.scheduler.capacity.maximum-am-resource-percent</name>
- <value>0.2</value>
- <description>
- Maximum percent of resources in the cluster which can be used to run
- application masters i.e. controls number of concurrent running
- applications.
- </description>
- </property>
-
- <property>
- <name>yarn.scheduler.capacity.root.queues</name>
- <value>default</value>
- <description>
- The queues at the this level (root is the root queue).
- </description>
- </property>
-
- <property>
- <name>yarn.scheduler.capacity.root.capacity</name>
- <value>100</value>
- <description>
- The total capacity as a percentage out of 100 for this queue.
- If it has child queues then this includes their capacity as well.
- The child queues capacity should add up to their parent queue's capacity
- or less.
- </description>
- </property>
-
- <property>
- <name>yarn.scheduler.capacity.root.default.capacity</name>
- <value>100</value>
- <description>Default queue target capacity.</description>
- </property>
-
- <property>
- <name>yarn.scheduler.capacity.root.default.user-limit-factor</name>
- <value>1</value>
- <description>
- Default queue user limit a percentage from 0.0 to 1.0.
- </description>
- </property>
-
- <property>
- <name>yarn.scheduler.capacity.root.default.maximum-capacity</name>
- <value>100</value>
- <description>
- The maximum capacity of the default queue.
- </description>
- </property>
-
- <property>
- <name>yarn.scheduler.capacity.root.default.state</name>
- <value>RUNNING</value>
- <description>
- The state of the default queue. State can be one of RUNNING or STOPPED.
- </description>
- </property>
-
- <property>
- <name>yarn.scheduler.capacity.root.default.acl_submit_applications</name>
- <value>*</value>
- <description>
- The ACL of who can submit jobs to the default queue.
- </description>
- </property>
-
- <property>
- <name>yarn.scheduler.capacity.root.default.acl_administer_jobs</name>
- <value>*</value>
- <description>
- The ACL of who can administer jobs on the default queue.
- </description>
- </property>
-
- <property>
- <name>yarn.scheduler.capacity.root.acl_administer_queue</name>
- <value>*</value>
- <description>
- The ACL for who can administer this queue i.e. change sub-queue
- allocations.
- </description>
- </property>
-
- <property>
- <name>yarn.scheduler.capacity.node-locality-delay</name>
- <value>40</value>
- <description>
- Number of missed scheduling opportunities after which the CapacityScheduler
- attempts to schedule rack-local containers.
- Typically this should be set to number of nodes in the cluster, By default is setting
- approximately number of nodes in one rack which is 40.
- </description>
- </property>
-
- <property>
- <name>yarn.scheduler.capacity.default.minimum-user-limit-percent</name>
- <value>100</value>
- <description>
- Default minimum queue resource limit depends on the number of users who have submitted applications.
- </description>
- </property>
-
-
-</configuration>