hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashish Singhi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-11873) Hbase Version CLI enhancement
Date Fri, 12 Sep 2014 06:39:36 GMT

    [ https://issues.apache.org/jira/browse/HBASE-11873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14131177#comment-14131177
] 

Ashish Singhi commented on HBASE-11873:
---------------------------------------

Thanks [~stack] for taking a look into the patch.

bq. What about the above? What happens when I build on a mac say?

This I have handled in the script like below.
{code}
which md5sum > /dev/null
if [ "$?" != "0" ] ; then
  which md5 > /dev/null
  if [ "$?" != "0" ] ; then
    srcChecksum="Unknown"
  else
    srcChecksum=`find hbase-*/src/main/ | grep -e "\.java" -e "\.proto" | LC_ALL=C sort |
xargs md5 | md5 | cut -d ' ' -f 1`
  fi
else
  srcChecksum=`find hbase-*/src/main/ | grep -e "\.java" -e "\.proto" | LC_ALL=C sort | xargs
md5sum | md5sum | cut -d ' ' -f 1`
fi
{code}
The first if command will check whether md5sum command exists, if it does then it will use
md5sum to generate checksum. If not, then it will check the same for md5 command existence
if it does then it will use md5 to generate the checksum else it will mark checksum as Unknown.
I hope you understand it.

P.S: Mac uses md5 command to generate checksum

> Hbase Version CLI enhancement
> -----------------------------
>
>                 Key: HBASE-11873
>                 URL: https://issues.apache.org/jira/browse/HBASE-11873
>             Project: HBase
>          Issue Type: Improvement
>          Components: build
>            Reporter: Guo Ruijing
>            Priority: Minor
>              Labels: beginner
>         Attachments: HBASE-11873-1.patch, HBASE-11873-2.patch, HBASE-11873-3.patch, HBASE-11873.patch
>
>
> Hbase Version CLI enhancements:
> 1) include source code checksum.
> 2) change "Subversion" to "Source code repository"
> Existing implementation:
> hadoop@localhost p4_wspaces]$ hbase version
> 2014-09-01 03:29:40,773 INFO  [main] util.VersionInfo: HBase 0.98.1-hadoop2
> 2014-09-01 03:29:40,773 INFO  [main] util.VersionInfo: Subversion <...>
> 2014-09-01 03:29:40,773 INFO  [main] util.VersionInfo: Compiled by <...>
> Expected implematation:
> hadoop@localhost p4_wspaces]$ hbase version
> 2014-09-01 03:29:40,773 INFO  [main] util.VersionInfo: HBase 0.98.1-hadoop2
> 2014-09-01 03:29:40,773 INFO  [main] util.VersionInfo: Source code repository <...>
  <<< change "Subversion" to "Source code repository"
> 2014-09-01 03:29:40,773 INFO  [main] util.VersionInfo: Compiled by <...>
> 2014-09-01 03:29:40,773 INFO  [main] util.VersionInfo: From source with checksum eb1b9e8d63c302bed1168a7122d70
 <<< include source code checksum



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message