incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Evans <>
Subject Re: question about
Date Fri, 26 Aug 2011 03:51:20 GMT
On Thu, Aug 25, 2011 at 10:13 AM, Koert Kuipers <> wrote:
> hey eric, the one thing i do not agree that it is the element of least
> surprise. i would argue that the default behavior for *nix appplications is
> that they find out what their home directory is and operate relative to
> that. something like:

I'm not sure what you mean by "home directory" here, but *nix
applications tend to have binaries installed to path, library
locations resolved, and other resource locations fixed at
compile-time.  But Java apps seldom adhere to platform conventions
anyway. is meant (was originally meant) to be site config,
providing the means to customize the install.  The one checked in to
bin/ is simply a default, and is (hopefully )setup with what will work
for most people, most of the time.

I guess least surprising might depend on who you ask, but for what
it's worth, the search order has been like that all along and this is
the first time that I'm aware of it coming up.

> script_dir="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
> home_dir=${script_dir%/bin}
> or production quality code from which is sourced by the
> main hadoop script:
> this="${BASH_SOURCE-$0}"
> bin=$(cd -P -- "$(dirname -- "$this")" && pwd -P)
> script="$(basename -- "$this")"
> this="$bin/$script"
> # the root of the Hadoop installation
> if [ -z "$HADOOP_HOME" ]; then
>   export HADOOP_HOME=`dirname "$this"`/..
> fi
> i find setting a variable in your shell like CASSANDRA_INCLUDE to be error
> prone. at some point i will forget what i set it to and them i am by
> accident using the wrong application. once applications are aware of their
> home dir all i have to do is "ln -s /usr/lib/cassandra-0.7/bin/nodetool
> /usr/sbin/nodetool-0.7" and then i can use it without risk of confusion.

Having multiple independent versions, one or more of which are
"installed" to the usual site-wide locations is not at all common that
I can see.  I'd also classify it as falling squarely in the Better
Know What You're Doing category.  Seen that way, editing, or passing an alternate using CASSANDRA_INCLUDE
doesn't seem unreasonable, but YMMV.

Your welcome to open a ticket though.

Eric Evans
Acunu | | @acunu

View raw message