[
https://issues.apache.org/jira/browse/HCATALOG-555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13504892#comment-13504892
]
Travis Crawford commented on HCATALOG-555:
------------------------------------------
Hey Arpit, thanks for the patch! A couple minor suggestions though:
{code}
INSTEAD OF THIS:
+if (( `ls -1 $HCAT_PREFIX/share/hcatalog/hcatalog-core-[0-9]*.jar | wc -l` > 1
)) ; then
HOW ABOUT:
if [ "$(ls -1 $HCAT_PREFIX/share/hcatalog/hcatalog-core-[0-9]*.jar | wc -l)"
-ne 1 ]; then
echo "Error: did not find exactly one hcatalog-core jar in
$HCAT_PREFIX/share/hcatalog"
exit 1
fi
The changes are:
* Use $() form instead of backticks which I find easier to read
* Use -ne to compare numbers
* Ensure we actually find the jar instead of just making sure we don't have
more than one.
{code}
{code}
Here we check if the conf directory has a particular file. Why not check if the
directory exists instead?
+elif [ -e "${HCAT_PREFIX}/conf/hcat-env.sh" ]; then
+ DEFAULT_CONF_DIR=${HCAT_PREFIX}/"conf"
{code}
> hcat script should look for hcatalog-core jar and add HCAT_PREFIX/conf as a
> config location that is checked.
> ------------------------------------------------------------------------------------------------------------
>
> Key: HCATALOG-555
> URL: https://issues.apache.org/jira/browse/HCATALOG-555
> Project: HCatalog
> Issue Type: Bug
> Reporter: Arpit Gupta
> Assignee: Arpit Gupta
> Attachments: HCATALOG-555.patch
>
>
> hcat script should look at hcatalog-core.jar and for configs it will be
> easier if we also look at HCAT_PREFIX/conf location to determine the hcatalog
> conf dir. This is similar to what hadoop also does.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira