#!/bin/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. HCFS_USER="hdfs" SMOKE_TESTS=${1:-mapreduce,pig} export HADOOP_CONF_DIR=/etc/hadoop/conf/ export BIGTOP_HOME=/bigtop-home/ export HADOOP_MAPRED_HOME=/usr/lib/hadoop-mapreduce/ export HIVE_HOME=/usr/lib/hive/ export PIG_HOME=/usr/lib/pig/ export FLUME_HOME=/usr/lib/flume/ export SQOOP_HOME=/usr/lib/sqoop/ export HIVE_CONF_DIR=/etc/hive/conf/ export JAVA_HOME="/usr/lib/jvm/java-openjdk/" export MAHOUT_HOME="/usr/lib/mahout" export ITEST="0.7.0" su -s /bin/bash $HCFS_USER -c '/usr/bin/hadoop fs -mkdir /user/vagrant /user/root' su -s /bin/bash $HCFS_USER -c 'hadoop fs -chmod 777 /user/vagrant' su -s /bin/bash $HCFS_USER -c 'hadoop fs -chmod 777 /user/root' if [ -f /etc/debian_version ] ; then apt-get -y install pig hive flume mahout sqoop else yum install -y pig hive flume mahout sqoop fi cd /bigtop-home/bigtop-tests/smoke-tests && ./gradlew clean compileGroovy test -Dsmoke.tests=$SMOKE_TESTS --info