Install Apache Tez 0.7.0

// install jdk 1.7
// install hadoop 2.7
// install maven 3.3
// install npm and bower

wget https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz

tar -xvf protobuf-2.5.0.tar.gz

cd protobuf-2.5.0/

sudo apt-get install g++
sudo ./configure
sudo make
sudo make check
sudo make install
sudo ldconfig
cd ../

wget http://apache.lauf-forum.at/tez/0.7.0/apache-tez-0.7.0-src.tar.gz

tar -xvf apache-tez-0.7.0-src.tar.gz

cd apache-tez-0.7.0-src

$HADOOP_HOME/bin/hadoop version
Hadoop 2.7.1

// update hadoop.version in pom.xml to 2.7.1 and protobuf.version to 2.5.0

mvn clean package -DskipTests=true -Dmaven.javadoc.skip=true

$HADOOP_HOME/sbin/start-dfs.sh

$HADOOP_HOME/bin/hadoop dfs -mkdir -p hdfs://localhost/apps/tez

$HADOOP_HOME/bin/hadoop dfs -copyFromLocal tez-dist/target/tez-0.7.0.tar.gz hdfs://localhost/apps/tez

mkdir conf
vim conf/tez-site.xml

<?xml version=”1.0″ encoding=”UTF-8″?>
<?xml-stylesheet type=”text/xsl” href=”configuration.xsl”?>
<configuration>
<property>
<name>tez.lib.uris</name>
<value>${fs.defaultFS}/apps/tez/tez-0.7.0.tar.gz</value>
</property>
</configuration>

export TEZ_HOME=$(pwd)
export TEZ_JARS=$TEZ_HOME/tez-dist/target/tez-0.7.0
export TEZ_CONF_DIR=$TEZ_HOME/conf
export HADOOP_CLASSPATH=$TEZ_CONF_DIR:$TEZ_JARS/*:$TEZ_JARS/lib/*:$HADOOP_CLASSPATH

mkdir in
mkdir out

vim in/test.txt
Hello World!

rm $TEZ_HOME/tez-dist/target/tez-0.7.0/lib/slf4j-log4j12-1.7.5.jar
$HADOOP_HOME/sbin/stop-dfs.sh
$HADOOP_HOME/sbin/start-dfs.sh
$HADOOP_HOME/sbin/stop-yarn.sh
$HADOOP_HOME/sbin/start-yarn.sh

$HADOOP_HOME/bin/hadoop dfs -mkdir -p hdfs://localhost/apps/in
$HADOOP_HOME/bin/hadoop dfs -copyFromLocal in/test.txt hdfs://localhost/apps/in

$HADOOP_HOME/bin/hadoop jar $TEZ_HOME/tez-examples/target/tez-examples-0.7.0.jar orderedwordcount hdfs://localhost/apps/in hdfs://localhost/apps/out