Index: bin/ext/cli.sh =================================================================== --- bin/ext/cli.sh (revision 796966) +++ bin/ext/cli.sh (working copy) @@ -10,6 +10,10 @@ exit 3; fi +if $cygwin; then + HIVE_LIB=`cygpath -w "$HIVE_LIB"` +fi + exec $HADOOP jar $AUX_JARS_CMD_LINE ${HIVE_LIB}/hive_cli.jar $CLASS $HIVE_OPTS "$@" } Index: bin/ext/hwi.sh =================================================================== --- bin/ext/hwi.sh (revision 796966) +++ bin/ext/hwi.sh (working copy) @@ -3,6 +3,10 @@ hwi() { + if $cygwin; then + HIVE_LIB=`cygpath -w "$HIVE_LIB"` + fi + CLASS=org.apache.hadoop.hive.hwi.HWIServer export HWI_JAR_FILE=${HIVE_LIB}/hive_hwi.jar export HWI_WAR_FILE=${HIVE_LIB}/hive_hwi.war Index: bin/ext/hiveserver.sh =================================================================== --- bin/ext/hiveserver.sh (revision 796966) +++ bin/ext/hiveserver.sh (working copy) @@ -4,6 +4,9 @@ hiveserver() { echo "Starting Hive Thrift Server" CLASS=org.apache.hadoop.hive.service.HiveServer + if $cygwin; then + HIVE_LIB=`cygpath -w "$HIVE_LIB"` + fi JAR=${HIVE_LIB}/hive_service.jar if [ "$HIVE_PORT" != "" ]; then HIVE_OPTS=$HIVE_PORT Index: bin/ext/lineage.sh =================================================================== --- bin/ext/lineage.sh (revision 796966) +++ bin/ext/lineage.sh (working copy) @@ -24,6 +24,11 @@ echo "Missing Hive exec Jar" exit 3; fi + + if $cygwin; then + HIVE_LIB=`cygpath -w "$HIVE_LIB"` + fi + exec $HADOOP jar ${HIVE_LIB}/hive_exec.jar $CLASS "$@" } Index: bin/hive =================================================================== --- bin/hive (revision 796966) +++ bin/hive (working copy) @@ -15,6 +15,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +cygwin=false +case "`uname`" in + CYGWIN*) cygwin=true;; +esac + bin=`dirname "$0"` bin=`cd "$bin"; pwd` @@ -51,6 +56,9 @@ if [[ ! -f $f ]]; then continue; fi + if $cygwin; then + f=`cygpath -w "$f"` + fi AUX_CLASSPATH=${AUX_CLASSPATH}:$f if [ "${AUX_PARAM}" == "" ]; then AUX_PARAM=file://$f @@ -59,6 +67,11 @@ fi done elif [ "${HIVE_AUX_JARS_PATH}" != "" ]; then + if $cygwin; then + HIVE_AUX_JARS_PATH=`echo $HIVE_AUX_JARS_PATH | sed 's/,/:/g'` + HIVE_AUX_JARS_PATH=`cygpath -p -w "$HIVE_AUX_JARS_PATH"` + HIVE_AUX_JARS_PATH=`echo $HIVE_AUX_JARS_PATH | sed 's/;/,/g'` + fi AUX_CLASSPATH=${HIVE_AUX_JARS_PATH} AUX_PARAM=file://${HIVE_AUX_JARS_PATH} AUX_PARAM=`echo $AUX_PARAM | sed 's/,/,file:\/\//g'` @@ -69,7 +82,9 @@ if [[ ! -f $f ]]; then continue; fi - + if $cygwin; then + f=`cygpath -w "$f"` + fi AUX_CLASSPATH=${AUX_CLASSPATH}:$f if [ "${AUX_PARAM}" == "" ]; then AUX_PARAM=file://$f @@ -77,7 +92,12 @@ AUX_PARAM=${AUX_PARAM},file://$f; fi done -CLASSPATH=${CLASSPATH}:${AUX_CLASSPATH} +if $cygwin; then + CLASSPATH=`cygpath -p -w "$CLASSPATH"` + CLASSPATH=${CLASSPATH};${AUX_CLASSPATH} +else + CLASSPATH=${CLASSPATH}:${AUX_CLASSPATH} +fi # pass classpath to hadoop export HADOOP_CLASSPATH=${CLASSPATH}