Skip to content

Instantly share code, notes, and snippets.

@mavencode01
Last active April 10, 2018 13:49
Show Gist options
  • Save mavencode01/e4b658e72b4faf69994e7feb431ae039 to your computer and use it in GitHub Desktop.
Save mavencode01/e4b658e72b4faf69994e7feb431ae039 to your computer and use it in GitHub Desktop.
HDInsight Phoenix upgrade
#!/bin/bash -e
mkdir -p /usr/local/phoenix
PHOENIX_VERSION=4.9.0
HBASE_VERSION=1.1
HDINSIGHT_VERSION=2.6.2.25-1
PHOENIX_HOME=/usr/local/phoenix/apache-phoenix-$PHOENIX_VERSION-HBase-$HBASE_VERSION-bin
mkdir -p $PHOENIX_HOME
cd $PHOENIX_HOME/..
# curl http://apache.forsale.plus/phoenix/apache-phoenix-$PHOENIX_VERSION-HBase-$HBASE_VERSION/bin/apache-phoenix-$PHOENIX_VERSION-HBase-$HBASE_VERSION-bin.tar.gz | tar xz
curl https://archive.apache.org/dist/phoenix/apache-phoenix-4.9.0-HBase-1.1/bin/apache-phoenix-4.9.0-HBase-1.1-bin.tar.gz | tar xz
cd $PHOENIX_HOME
unlink phoenix-client.jar
unlink phoenix-hive.jar
unlink phoenix-server.jar
unlink phoenix-spark2.jar
unlink phoenix-thin-client.jar
ln -s phoenix-$PHOENIX_VERSION-HBase-$HBASE_VERSION-client.jar phoenix-client.jar
ln -s phoenix-$PHOENIX_VERSION-HBase-$HBASE_VERSION-hive.jar phoenix-hive.jar
ln -s phoenix-$PHOENIX_VERSION-HBase-$HBASE_VERSION-server.jar phoenix-server.jar
ln -s phoenix-$PHOENIX_VERSION-HBase-$HBASE_VERSION-spark2.jar phoenix-spark2.jar
ln -s phoenix-$PHOENIX_VERSION-HBase-$HBASE_VERSION-thin-client.jar phoenix-thin-client.jar
cd /usr/hdp/current
unlink phoenix-client
ln -s $PHOENIX_HOME phoenix-client
unlink phoenix-server
ln -s $PHOENIX_HOME phoenix-server
# Update HBase depedency
unlink /usr/hdp/$HDINSIGHT_VERSION/hbase/lib/phoenix-server.jar
ln -s $PHOENIX_HOME/phoenix-server.jar /usr/hdp/$HDINSIGHT_VERSION/hbase/lib/phoenix-server.jar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment