Skip to content

Instantly share code, notes, and snippets.

@phaneesh
Last active January 24, 2020 09:15
Show Gist options
  • Save phaneesh/3422cf818f1f8462906f3e13b490802e to your computer and use it in GitHub Desktop.
Save phaneesh/3422cf818f1f8462906f3e13b490802e to your computer and use it in GitHub Desktop.
Upgrade to Tez 0.9.1 on HDP
#!/usr/bin/env bash
HDP_VERSION=2.6.5.0-292
hdfs dfs -put /usr/hdp/${HDP_VERSION}/apache-tez-0.9.1/share/tez.tar.gz /hdp/apps/${HDP_VERSION}/tez/
hdfs dfs -chown -R hdfs:hadoop /hdp
hdfs dfs -chmod -R 555 /hdp/apps/${HDP_VERSION}/tez
hdfs dfs -chmod -R 444 /hdp/apps/${HDP_VERSION}/tez/tez.tar.gz
#!/usr/bin/env bash
HDP_VERSION=2.6.5.0-292
HDP_INSTALL_PATH=/usr/hdp/${HDP_VERSION}
TEZ_INSTALL_PATH=${HDP_INSTALL_PATH}/tez
cd /tmp
wget http://redrockdigimark.com/apachemirror/tez/0.9.1/apache-tez-0.9.1-bin.tar.gz
tar -xvf apache-tez-0.9.1-bin.tar.gz
cp -r apache-tez-0.9.1-bin ${HDP_INSTALL_PATH}/apache-tez-0.9.1
UPGRADE_TEZ_INSTALL_DIR=${HDP_INSTALL_PATH}/apache-tez-0.9.1
rm -rf apache-tez-0.9.1-bin.tar.gz
rm -rf apache-tez-0.9.1-bin
echo "Backing up existing install..."
cp -r ${TEZ_INSTALL_PATH} ${HDP_INSTALL_PATH}/tez-backup
echo "Backup cocmplete..."
for f in ${TEZ_INSTALL_PATH}/*.jar
do
echo "Deleting file ${f} ..."
rm -rf $f
done
echo "Installing ..."
cd ${TEZ_INSTALL_PATH}
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/tez-api-0.9.1.jar tez-api-0.7.0.2.6.1.0-129.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/tez-common-0.9.1.jar tez-common-0.7.0.2.6.1.0-129.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/tez-dag-0.9.1.jar tez-dag-0.7.0.2.6.1.0-129.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/tez-examples-0.9.1.jar tez-examples-0.7.0.2.6.1.0-129.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/tez-history-parser-0.9.1.jar tez-history-parser-0.7.0.2.6.1.0-129.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/tez-job-analyzer-0.9.1.jar tez-job-analyzer-0.7.0.2.6.1.0-129.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/tez-mapreduce-0.9.1.jar tez-mapreduce-0.7.0.2.6.1.0-129.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/tez-runtime-internals-0.9.1.jar tez-runtime-internals-0.7.0.2.6.1.0-129.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/tez-runtime-library-0.9.1.jar tez-runtime-library-0.7.0.2.6.1.0-129.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/tez-tests-0.9.1.jar tez-tests-0.7.0.2.6.1.0-129.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/tez-yarn-timeline-history-0.9.1.jar tez-yarn-timeline-history-0.7.0.2.6.1.0-129.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/tez-yarn-timeline-history-with-acls-0.9.1.jar tez-yarn-timeline-history-with-acls-0.7.0.2.6.1.0-129.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/hadoop-shim-0.9.1.jar hadoop-shim-0.7.0.2.6.1.0-129.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/hadoop-shim-2.7-0.9.1.jar hadoop-shim-2.7-0.7.0.2.6.1.0-129.jar
cd ${TEZ_INSTALL_PATH}/ui
rm -rf tez-ui-0.7.0.${HDP_VERSION}.war
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/tez-ui-0.9.1.war tez-ui-0.7.0.{HDP_VERSION}.war
cd ${TEZ_INSTALL_PATH}/lib
echo "Deleting old library files..."
rm -rf commons-lang-2.6.jar
rm -rf jersey-json-1.9.jar
rm -rf protobuf-java-2.5.0.jar
rm -rf commons-cli-1.2.jar
rm -rf commons-math3-3.1.1.jar
rm -rf jettison-1.3.4.jar
rm -rf servlet-api-2.5.jar
rm -rf commons-codec-1.4.jar
rm -rf guava-11.0.2.jar
rm -rf jetty-6.1.26.hwx.jar
rm -rf slf4j-api-1.7.5.jar
rm -rf commons-collections-3.2.2.jar
rm -rf jetty-util-6.1.26.hwx.jar
rm -rf commons-collections4-4.1.jar
rm -rf jsr305-2.0.3.jar
rm -rf commons-io-2.4.jar
rm -rf jersey-client-1.9.jar
rm -rf metrics-core-3.1.0.jar
rm -rf tez.tar.gz
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/lib/async-http-client-1.8.16.jar async-http-client-1.8.16.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/lib/commons-collections4-4.1.jar commons-collections4-4.1.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/lib/guava-11.0.2.jar guava-11.0.2.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/lib/jersey-json-1.9.jar jersey-json-1.9.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/lib/jsr305-3.0.0.jar jsr305-3.0.0.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/lib/RoaringBitmap-0.4.9.jar RoaringBitmap-0.4.9.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/lib/commons-cli-1.2.jar commons-cli-1.2.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/lib/commons-io-2.4.jar commons-io-2.4.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/lib/jettison-1.3.4.jar jettison-1.3.4.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/lib/metrics-core-3.1.0.jar metrics-core-3.1.0.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/lib/servlet-api-2.5.jar servlet-api-2.5.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/lib/commons-codec-1.4.jar commons-codec-1.4.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/lib/commons-lang-2.6.jar commons-lang-2.6.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/lib/jetty-6.1.26.jar jetty-6.1.26.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/lib/netty-3.6.2.Final.jar netty-3.6.2.Final.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/lib/slf4j-api-1.7.10.jar slf4j-api-1.7.10.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/lib/commons-collections-3.2.2.jar commons-collections-3.2.2.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/lib/commons-math3-3.1.1.jar commons-math3-3.1.1.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/lib/jersey-client-1.9.jar jersey-client-1.9.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/lib/jetty-util-6.1.26.jar jetty-util-6.1.26.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/lib/protobuf-java-2.5.0.jar protobuf-java-2.5.0.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/lib/slf4j-log4j12-1.7.10.jar slf4j-log4j12-1.7.10.jar
ln -s ${UPGRADE_TEZ_INSTALL_DIR}/share/tez.tar.gz tez.tar.gz
echo "Done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment