You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Zheng Shao (JIRA)" <ji...@apache.org> on 2009/11/02 01:20:59 UTC

[jira] Commented: (HIVE-902) cli.sh can not correctly identify Hadoop minor version numbers less than 20

    [ https://issues.apache.org/jira/browse/HIVE-902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12772391#action_12772391 ] 

Zheng Shao commented on HIVE-902:
---------------------------------

HIVE-902.1.patch:

I remember there is a hadoop version 0.17.2.1. It seems the patch does not handle this case.
Can you change the regex to work for that?
Also, please print out the hadoop version in the error message in case we cannot detect hadoop version, to make it easier to debug.

Can you also help try it out on earlier versions of bash (bash 3.00 for example)?


> cli.sh can not correctly identify Hadoop minor version numbers less than 20
> ---------------------------------------------------------------------------
>
>                 Key: HIVE-902
>                 URL: https://issues.apache.org/jira/browse/HIVE-902
>             Project: Hadoop Hive
>          Issue Type: Bug
>            Reporter: Carl Steinbach
>         Attachments: HIVE-902.1.patch
>
>
> cli.sh uses the following logic to detect the version of hadoop:
>   version=$($HADOOP version | awk '{print $2;}');
>   if [[ $version =~ "^0\.17" ]] || [[ $version =~ "^0\.18" ]] || [[ $version =~ "^0.19" ]]; then
>       exec $HADOOP jar $AUX_JARS_CMD_LINE ${HIVE_LIB}/hive_cli.jar $CLASS $HIVE_OPTS "$@"
>   else
>       # hadoop 20 or newer - skip the aux_jars option. picked up from hiveconf
>       exec $HADOOP jar ${HIVE_LIB}/hive_cli.jar $CLASS $HIVE_OPTS "$@" 
>   fi
> Apparently bash doesn't expect you to quote the regex:
> % ./bash -version
> GNU bash, version 4.0.0(1)-release (i386-apple-darwin9.8.0)
> % hadoop version
> Hadoop 0.19.0
> Subversion https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.19 -r 713890
> Compiled by ndaley on Fri Nov 14 03:12:29 UTC 2008
> % version=$(hadoop version | awk '{print $2;}')
> % echo $version
> 0.19.0 https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.19 by
> % [[ $version =~ "^0\.19" ]] && echo "Yes" || echo "No"
> No
> % [[ $version =~ "^0.19" ]] && echo "Yes" || echo "No"
> No
> % [[ $version =~ ^0.19 ]] && echo "Yes" || echo "No"
> Yes

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.