You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by kt...@apache.org on 2011/11/01 18:09:30 UTC

svn commit: r1196145 - /incubator/accumulo/branches/1.3/bin/upgrade.sh

Author: kturner
Date: Tue Nov  1 17:09:30 2011
New Revision: 1196145

URL: http://svn.apache.org/viewvc?rev=1196145&view=rev
Log:
ACCUMULO-104 fixed upgrade script

Modified:
    incubator/accumulo/branches/1.3/bin/upgrade.sh

Modified: incubator/accumulo/branches/1.3/bin/upgrade.sh
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/bin/upgrade.sh?rev=1196145&r1=1196144&r2=1196145&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/bin/upgrade.sh (original)
+++ incubator/accumulo/branches/1.3/bin/upgrade.sh Tue Nov  1 17:09:30 2011
@@ -21,7 +21,7 @@
 
 # Where are we?
 ACCUMULO_HOME=`dirname "$0"`
-ACCUMULO_HOME=`cd "$bin"; pwd`
+ACCUMULO_HOME=`cd "$ACCUMULO_HOME/.."; pwd`
 
 PREVIOUS=cloudbase
 
@@ -88,7 +88,7 @@ fi
 
 . $ACCUMULO_HOME/conf/accumulo-env.sh
 test -z "$HADOOP_COMMAND" && HADOOP_COMMAND="$HADOOP_HOME/bin/hadoop"
-test -x "$HADOOP_COMMAND" || fail You must set HADOOP_HOME, or set HADOOP_COMMAND to the path for the '"hadoop'" command
+test -x "$HADOOP_COMMAND" || fail You must set HADOOP_HOME, or set HADOOP_COMMAND to the path for the '"hadoop"' command
 test -z "$ZOOKEEPER_COMMAND" && ZOOKEEPER_COMMAND="$ZOOKEEPER_HOME/bin/zkCli.sh"
 test -x "$ZOOKEEPER_COMMAND" || fail You must set ZOOKEEPER_HOME, or set ZOOKEEPER_COMMAND to the path for the '"zkCli.sh"' command
 
@@ -107,11 +107,11 @@ then
 fi
 
 verbose Getting instance name
-NAME=`"$ACCUMULO_HOME/bin/accumulo" org.apache.accumulo.server.util.DumpZookeeper "$ZOOKEEPER" / | grep "$INSTANCE" | grep value | sed "s/.*name='\([^']*\).*/\1/" | head -1` || fail "Unable to get instance name"
+NAME=`"$ACCUMULO_HOME/bin/accumulo" org.apache.accumulo.server.util.DumpZookeeper "$ZOOKEEPER" "/$PREVIOUS/instances" | grep "$INSTANCE" | grep value | sed "s/.*name='\([^']*\).*/\1/" | head -1` || fail "Unable to get instance name"
 verbose instance name "$NAME"
 verbose Getting zookeeper settings
 TEMP=/tmp/accumulo-rename-$$
-./bin/accumulo org.apache.accumulo.server.util.DumpZookeeper "$ZOOKEEPER" "/$PREVIOUS/$INSTANCE" >"$TEMP"
+"$ACCUMULO_HOME"/bin/accumulo org.apache.accumulo.server.util.DumpZookeeper "$ZOOKEEPER" "/$PREVIOUS/$INSTANCE" >"$TEMP"
 grep -q ephemeral "$TEMP" && fail There are running programs still using zookeeper.
 verbose switching names
 sed -i.xml \
@@ -209,7 +209,7 @@ sed -i.xml \
  -e "s%/$PREVIOUS/$INSTANCE%/accumulo/$INSTANCE%g" \
  "$TEMP"
 verbose Loading zookeeper with renamed values
-./bin/accumulo org.apache.accumulo.server.util.RestoreZookeeper "$ZOOKEEPER" "$TEMP" --overwrite || fail unable to load new settings into zookeeper
+"$ACCUMULO_HOME"/bin/accumulo org.apache.accumulo.server.util.RestoreZookeeper "$ZOOKEEPER" "$TEMP" --overwrite || fail unable to load new settings into zookeeper
 verbose Making final instance name setting
 
 "$ZOOKEEPER_COMMAND" -server "$ZOOKEEPER" 'create /accumulo/instances instances' >/dev/null 2>/dev/null
@@ -220,4 +220,4 @@ verbose Making final instance name setti
 
 verbose Renaming the main directory in HDFS
 "$HADOOP_COMMAND" fs -mv "$DFSBEFORE" "$DFSAFTER" || fail unable to move $PREVIOUS to the new location
-verbose Rename successful
\ No newline at end of file
+verbose Rename successful