Skip to content

Commit

Permalink
Change order of directory searching for cassandra.in.sh to favor loca…
Browse files Browse the repository at this point in the history
…l one, patch by Wei Deng for CASSANDRA-11628
  • Loading branch information
weideng1 committed Apr 21, 2016
1 parent de1a96c commit ef52d0a
Show file tree
Hide file tree
Showing 17 changed files with 80 additions and 64 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
3.6
* Change order of directory searching for cassandra.in.sh to favor local one (CASSANDRA-11628)
* Support large partitions on the 3.0 sstable format (CASSANDRA-11206)
* JSON datetime formatting needs timezone (CASSANDRA-11137)
* Add support to rebuild from specific range (CASSANDRA-10409)
Expand Down
8 changes: 4 additions & 4 deletions bin/debug-cql
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

if [ "x$CASSANDRA_INCLUDE" = "x" ]; then
# Locations (in order) to use when searching for an include file.
for include in /usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh \
for include in "`dirname "$0"`/cassandra.in.sh" \
"$HOME/.cassandra.in.sh" \
"`dirname $0`/cassandra.in.sh"; do
/usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh; do
if [ -r "$include" ]; then
. "$include"
break
Expand Down
9 changes: 5 additions & 4 deletions bin/nodetool
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ if [ "`basename "$0"`" = 'nodeprobe' ]; then
fi

if [ "x$CASSANDRA_INCLUDE" = "x" ]; then
for include in /usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh \
# Locations (in order) to use when searching for an include file.
for include in "`dirname "$0"`/cassandra.in.sh" \
"$HOME/.cassandra.in.sh" \
"`dirname "$0"`/cassandra.in.sh"; do
/usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh; do
if [ -r "$include" ]; then
. "$include"
break
Expand Down
9 changes: 5 additions & 4 deletions bin/sstableloader
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
# limitations under the License.

if [ "x$CASSANDRA_INCLUDE" = "x" ]; then
for include in /usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh \
# Locations (in order) to use when searching for an include file.
for include in "`dirname "$0"`/cassandra.in.sh" \
"$HOME/.cassandra.in.sh" \
"`dirname "$0"`/cassandra.in.sh"; do
/usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh; do
if [ -r "$include" ]; then
. "$include"
break
Expand Down
9 changes: 5 additions & 4 deletions bin/sstablescrub
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
# limitations under the License.

if [ "x$CASSANDRA_INCLUDE" = "x" ]; then
for include in /usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh \
# Locations (in order) to use when searching for an include file.
for include in "`dirname "$0"`/cassandra.in.sh" \
"$HOME/.cassandra.in.sh" \
"`dirname "$0"`/cassandra.in.sh"; do
/usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh; do
if [ -r "$include" ]; then
. "$include"
break
Expand Down
9 changes: 5 additions & 4 deletions bin/sstableupgrade
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
# limitations under the License.

if [ "x$CASSANDRA_INCLUDE" = "x" ]; then
for include in /usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh \
# Locations (in order) to use when searching for an include file.
for include in "`dirname "$0"`/cassandra.in.sh" \
"$HOME/.cassandra.in.sh" \
"`dirname "$0"`/cassandra.in.sh"; do
/usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh; do
if [ -r "$include" ]; then
. "$include"
break
Expand Down
9 changes: 5 additions & 4 deletions bin/sstableutil
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
# limitations under the License.

if [ "x$CASSANDRA_INCLUDE" = "x" ]; then
for include in /usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh \
# Locations (in order) to use when searching for an include file.
for include in "`dirname "$0"`/cassandra.in.sh" \
"$HOME/.cassandra.in.sh" \
"`dirname "$0"`/cassandra.in.sh"; do
/usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh; do
if [ -r "$include" ]; then
. "$include"
break
Expand Down
9 changes: 5 additions & 4 deletions bin/sstableverify
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
# limitations under the License.

if [ "x$CASSANDRA_INCLUDE" = "x" ]; then
for include in /usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh \
# Locations (in order) to use when searching for an include file.
for include in "`dirname "$0"`/cassandra.in.sh" \
"$HOME/.cassandra.in.sh" \
"`dirname "$0"`/cassandra.in.sh"; do
/usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh; do
if [ -r "$include" ]; then
. "$include"
break
Expand Down
9 changes: 5 additions & 4 deletions tools/bin/cassandra-stress
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
# limitations under the License.

if [ "x$CASSANDRA_INCLUDE" = "x" ]; then
for include in /usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh \
# Locations (in order) to use when searching for an include file.
for include in "`dirname "$0"`/cassandra.in.sh" \
"$HOME/.cassandra.in.sh" \
"`dirname "$0"`/cassandra.in.sh"; do
/usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh; do
if [ -r "$include" ]; then
. "$include"
break
Expand Down
9 changes: 5 additions & 4 deletions tools/bin/cassandra-stressd
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@

DESC="Cassandra Stress Test Daemon"
if [ "x$CASSANDRA_INCLUDE" = "x" ]; then
for include in /usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh \
# Locations (in order) to use when searching for an include file.
for include in "`dirname "$0"`/cassandra.in.sh" \
"$HOME/.cassandra.in.sh" \
"`dirname "$0"`/cassandra.in.sh"; do
/usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh; do
if [ -r "$include" ]; then
. "$include"
break
Expand Down
9 changes: 5 additions & 4 deletions tools/bin/sstabledump
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
# limitations under the License.

if [ "x$CASSANDRA_INCLUDE" = "x" ]; then
for include in /usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh \
# Locations (in order) to use when searching for an include file.
for include in "`dirname "$0"`/cassandra.in.sh" \
"$HOME/.cassandra.in.sh" \
"`dirname "$0"`/cassandra.in.sh"; do
/usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh; do
if [ -r "$include" ]; then
. "$include"
break
Expand Down
9 changes: 5 additions & 4 deletions tools/bin/sstableexpiredblockers
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
# limitations under the License.

if [ "x$CASSANDRA_INCLUDE" = "x" ]; then
for include in /usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh \
# Locations (in order) to use when searching for an include file.
for include in "`dirname "$0"`/cassandra.in.sh" \
"$HOME/.cassandra.in.sh" \
"`dirname "$0"`/cassandra.in.sh"; do
/usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh; do
if [ -r "$include" ]; then
. "$include"
break
Expand Down
9 changes: 5 additions & 4 deletions tools/bin/sstablelevelreset
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
# limitations under the License.

if [ "x$CASSANDRA_INCLUDE" = "x" ]; then
for include in /usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh \
# Locations (in order) to use when searching for an include file.
for include in "`dirname "$0"`/cassandra.in.sh" \
"$HOME/.cassandra.in.sh" \
"`dirname "$0"`/cassandra.in.sh"; do
/usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh; do
if [ -r "$include" ]; then
. "$include"
break
Expand Down
9 changes: 5 additions & 4 deletions tools/bin/sstablemetadata
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
# limitations under the License.

if [ "x$CASSANDRA_INCLUDE" = "x" ]; then
for include in /usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh \
# Locations (in order) to use when searching for an include file.
for include in "`dirname "$0"`/cassandra.in.sh" \
"$HOME/.cassandra.in.sh" \
"`dirname "$0"`/cassandra.in.sh"; do
/usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh; do
if [ -r "$include" ]; then
. "$include"
break
Expand Down
9 changes: 5 additions & 4 deletions tools/bin/sstableofflinerelevel
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
# limitations under the License.

if [ "x$CASSANDRA_INCLUDE" = "x" ]; then
for include in /usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh \
# Locations (in order) to use when searching for an include file.
for include in "`dirname "$0"`/cassandra.in.sh" \
"$HOME/.cassandra.in.sh" \
"`dirname "$0"`/cassandra.in.sh"; do
/usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh; do
if [ -r "$include" ]; then
. "$include"
break
Expand Down
9 changes: 5 additions & 4 deletions tools/bin/sstablerepairedset
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
# limitations under the License.

if [ "x$CASSANDRA_INCLUDE" = "x" ]; then
for include in /usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh \
# Locations (in order) to use when searching for an include file.
for include in "`dirname "$0"`/cassandra.in.sh" \
"$HOME/.cassandra.in.sh" \
"`dirname "$0"`/cassandra.in.sh"; do
/usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh; do
if [ -r "$include" ]; then
. "$include"
break
Expand Down
9 changes: 5 additions & 4 deletions tools/bin/sstablesplit
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
# limitations under the License.

if [ "x$CASSANDRA_INCLUDE" = "x" ]; then
for include in /usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh \
# Locations (in order) to use when searching for an include file.
for include in "`dirname "$0"`/cassandra.in.sh" \
"$HOME/.cassandra.in.sh" \
"`dirname "$0"`/cassandra.in.sh"; do
/usr/share/cassandra/cassandra.in.sh \
/usr/local/share/cassandra/cassandra.in.sh \
/opt/cassandra/cassandra.in.sh; do
if [ -r "$include" ]; then
. "$include"
break
Expand Down

0 comments on commit ef52d0a

Please sign in to comment.