| #!/bin/bash --login |
| |
| # 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 -e |
| |
| echo " * installing some basic stuff..." |
| |
| function safe_sw() { |
| if [ -e "/active/$1" ];then |
| echo " * $1 is already present" |
| else |
| /bin/sw "$@" |
| fi |
| } |
| |
| safe_sw tez ${TEZ_VERSION:-0.9.1} |
| safe_sw hadoop ${HADOOP_VERSION:-3.1.2} |
| safe_sw hive ${HIVE_VERSION:-3.1.2} |
| |
| hive_launch -d -I |
| |
| cat /etc/motd |
| |
| echo "@@@ you may access the processes running via 'screen -r -x'" |
| |
| if [ -t 0 ];then |
| export USER=`whoami` |
| exec bash --login |
| else |
| echo "non-interactive shell detected; waiting for the end of the world... " |
| while :; do sleep 60;done |
| fi |
| |