Index: bin/ext/cli.sh =================================================================== --- bin/ext/cli.sh (revision 772605) +++ bin/ext/cli.sh (working copy) @@ -9,7 +9,9 @@ echo "Missing Hive CLI Jar" exit 3; fi - + if $cygwin; then + HIVE_LIB=`cygpath -d "$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 772605) +++ bin/ext/hwi.sh (working copy) @@ -2,6 +2,9 @@ export SERVICE_LIST="${SERVICE_LIST}${THISSERVICE} " hwi() { + if $cygwin; then + HIVE_LIB=`cygpath -d "$HIVE_LIB"` + fi CLASS=org.apache.hadoop.hive.hwi.HWIServer export HWI_JAR_FILE=${HIVE_LIB}/hive_hwi.jar Index: bin/ext/hiveserver.sh =================================================================== --- bin/ext/hiveserver.sh (revision 772605) +++ 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 -d "$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 772605) +++ bin/ext/lineage.sh (working copy) @@ -24,6 +24,9 @@ echo "Missing Hive exec Jar" exit 3; fi + if $cygwin; then + HIVE_LIB=`cygpath -d "$HIVE_LIB"` + fi exec $HADOOP jar ${HIVE_LIB}/hive_exec.jar $CLASS "$@" } Index: bin/hive =================================================================== --- bin/hive (revision 772605) +++ 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` @@ -100,6 +105,12 @@ exit 4; fi +if $cygwin; then + CLASSPATH=`cygpath -p -w "$CLASSPATH"` + HADOOP_CLASSPATH=`cygpath -p -w "$HADOOP_CLASSPATH"` + AUX_PARAM=`cygpath -p -w "$AUX_PARAM"` +fi + if [ "${AUX_PARAM}" != "" ]; then HIVE_OPTS="$HIVE_OPTS -hiveconf hive.aux.jars.path=${AUX_PARAM}" AUX_JARS_CMD_LINE="-libjars ${AUX_PARAM}"