You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by br...@apache.org on 2014/05/29 17:37:58 UTC
[2/3] git commit: Move less common tools into a new cassandra-tools
package.
Move less common tools into a new cassandra-tools package.
Patch by Michael Shuler, reviewed by brandonwilliams for CASSANDRA-7160
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e4090f10
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e4090f10
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e4090f10
Branch: refs/heads/trunk
Commit: e4090f10e5c01ec5330b32a799a3d32bdc99e324
Parents: a4bea74
Author: Brandon Williams <br...@apache.org>
Authored: Thu May 29 10:20:07 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Thu May 29 10:24:27 2014 -0500
----------------------------------------------------------------------
.gitignore | 3 +-
CHANGES.txt | 1 +
bin/json2sstable | 50 ---------------------------
bin/json2sstable.bat | 67 -------------------------------------
bin/sstable2json | 51 ----------------------------
bin/sstable2json.bat | 67 -------------------------------------
bin/sstablesplit | 50 ---------------------------
bin/sstablesplit.bat | 61 ---------------------------------
debian/README.Debian | 7 ++--
debian/cassandra-tools.install | 7 ++++
debian/cassandra.install | 6 ----
debian/control | 9 +++++
tools/bin/cassandra.in.sh | 22 ++++++------
tools/bin/json2sstable | 50 +++++++++++++++++++++++++++
tools/bin/json2sstable.bat | 67 +++++++++++++++++++++++++++++++++++++
tools/bin/sstable2json | 51 ++++++++++++++++++++++++++++
tools/bin/sstable2json.bat | 67 +++++++++++++++++++++++++++++++++++++
tools/bin/sstablesplit | 50 +++++++++++++++++++++++++++
tools/bin/sstablesplit.bat | 61 +++++++++++++++++++++++++++++++++
19 files changed, 380 insertions(+), 367 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4090f10/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 8013e30..e086ced 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,8 +9,9 @@ src/resources/org/apache/cassandra/config/
build-stamp
build.properties
debian/cassandra*debhelper*
-debian/cassandra.substvars
+debian/cassandra*.substvars
debian/cassandra/
+debian/cassandra-tools/
debian/files
# gitignore doesn't help with modified files - you may wish to:
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4090f10/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 2fc6751..cb745d9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
2.1.0-rc1
+ * Move less common tools into a new cassandra-tools package (CASSANDRA-7160)
* Support more concurrent requests in native protocol (CASSANDRA-7231)
* Add tab-completion to debian nodetool packaging (CASSANDRA-6421)
* Change concurrent_compactors defaults (CASSANDRA-7139)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4090f10/bin/json2sstable
----------------------------------------------------------------------
diff --git a/bin/json2sstable b/bin/json2sstable
deleted file mode 100755
index fff559f..0000000
--- a/bin/json2sstable
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/sh
-
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-if [ "x$CASSANDRA_INCLUDE" = "x" ]; then
- for include in "`dirname "$0"`/cassandra.in.sh" \
- "$HOME/.cassandra.in.sh" \
- /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
- fi
- done
-elif [ -r "$CASSANDRA_INCLUDE" ]; then
- . "$CASSANDRA_INCLUDE"
-fi
-
-# Use JAVA_HOME if set, otherwise look for java in PATH
-if [ -x "$JAVA_HOME/bin/java" ]; then
- JAVA="$JAVA_HOME/bin/java"
-else
- JAVA="`which java`"
-fi
-
-if [ -z "$CLASSPATH" ]; then
- echo "You must set the CLASSPATH var" >&2
- exit 1
-fi
-
-"$JAVA" $JAVA_AGENT -cp "$CLASSPATH" -Dstorage-config="$CASSANDRA_CONF" \
- -Dlogback.configurationFile=logback-tools.xml \
- org.apache.cassandra.tools.SSTableImport "$@"
-
-# vi:ai sw=4 ts=4 tw=0 et
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4090f10/bin/json2sstable.bat
----------------------------------------------------------------------
diff --git a/bin/json2sstable.bat b/bin/json2sstable.bat
deleted file mode 100644
index 291fd22..0000000
--- a/bin/json2sstable.bat
+++ /dev/null
@@ -1,67 +0,0 @@
-@REM
-@REM Licensed to the Apache Software Foundation (ASF) under one or more
-@REM contributor license agreements. See the NOTICE file distributed with
-@REM this work for additional information regarding copyright ownership.
-@REM The ASF licenses this file to You under the Apache License, Version 2.0
-@REM (the "License"); you may not use this file except in compliance with
-@REM the License. You may obtain a copy of the License at
-@REM
-@REM http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing, software
-@REM distributed under the License is distributed on an "AS IS" BASIS,
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@REM See the License for the specific language governing permissions and
-@REM limitations under the License.
-
-@echo off
-if "%OS%" == "Windows_NT" setlocal
-
-if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%~dp0..
-if NOT DEFINED CASSANDRA_CONF set CASSANDRA_CONF="%CASSANDRA_HOME%\conf"
-if NOT DEFINED CASSANDRA_MAIN set CASSANDRA_MAIN=org.apache.cassandra.tools.SSTableImport
-if NOT DEFINED JAVA_HOME goto :err
-
-REM ***** JAVA options *****
-set JAVA_OPTS=^
- -Dlogback.configurationFile=logback-tools.xml
-
-REM ***** CLASSPATH library setting *****
-
-REM Ensure that any user defined CLASSPATH variables are not used on startup
-set CLASSPATH="%CASSANDRA_HOME%\conf"
-
-REM For each jar in the CASSANDRA_HOME lib directory call append to build the CLASSPATH variable.
-for %%i in ("%CASSANDRA_HOME%\lib\*.jar") do call :append "%%i"
-goto okClasspath
-
-:append
-set CLASSPATH=%CLASSPATH%;%1
-goto :eof
-
-:okClasspath
-REM Include the build\classes\main directory so it works in development
-set CASSANDRA_CLASSPATH=%CLASSPATH%;"%CASSANDRA_HOME%\build\classes\main";%CASSANDRA_CONF%;"%CASSANDRA_HOME%\build\classes\thrift"
-
-set CASSANDRA_PARAMS=
-set TOOLS_PARAMS=
-
-FOR %%A IN (%*) DO call :appendToolsParams %%A
-
-goto runTool
-
-:appendToolsParams
-set TOOLS_PARAMS=%TOOLS_PARAMS% %1
-goto :eof
-
-:runTool
-"%JAVA_HOME%\bin\java" %JAVA_OPTS% %CASSANDRA_PARAMS% -cp %CASSANDRA_CLASSPATH% "%CASSANDRA_MAIN%" %TOOLS_PARAMS%
-goto finally
-
-:err
-echo JAVA_HOME environment variable must be set!
-pause
-
-:finally
-
-ENDLOCAL
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4090f10/bin/sstable2json
----------------------------------------------------------------------
diff --git a/bin/sstable2json b/bin/sstable2json
deleted file mode 100755
index bcd346c..0000000
--- a/bin/sstable2json
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/sh
-
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-if [ "x$CASSANDRA_INCLUDE" = "x" ]; then
- for include in "`dirname "$0"`/cassandra.in.sh" \
- "$HOME/.cassandra.in.sh" \
- /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
- fi
- done
-elif [ -r "$CASSANDRA_INCLUDE" ]; then
- . "$CASSANDRA_INCLUDE"
-fi
-
-
-# Use JAVA_HOME if set, otherwise look for java in PATH
-if [ -x "$JAVA_HOME/bin/java" ]; then
- JAVA="$JAVA_HOME/bin/java"
-else
- JAVA="`which java`"
-fi
-
-if [ -z "$CLASSPATH" ]; then
- echo "You must set the CLASSPATH var" >&2
- exit 1
-fi
-
-"$JAVA" $JAVA_AGENT -cp "$CLASSPATH" -Dstorage-config="$CASSANDRA_CONF" \
- -Dlogback.configurationFile=logback-tools.xml \
- org.apache.cassandra.tools.SSTableExport "$@"
-
-# vi:ai sw=4 ts=4 tw=0 et
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4090f10/bin/sstable2json.bat
----------------------------------------------------------------------
diff --git a/bin/sstable2json.bat b/bin/sstable2json.bat
deleted file mode 100644
index b67c7ad..0000000
--- a/bin/sstable2json.bat
+++ /dev/null
@@ -1,67 +0,0 @@
-@REM
-@REM Licensed to the Apache Software Foundation (ASF) under one or more
-@REM contributor license agreements. See the NOTICE file distributed with
-@REM this work for additional information regarding copyright ownership.
-@REM The ASF licenses this file to You under the Apache License, Version 2.0
-@REM (the "License"); you may not use this file except in compliance with
-@REM the License. You may obtain a copy of the License at
-@REM
-@REM http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing, software
-@REM distributed under the License is distributed on an "AS IS" BASIS,
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@REM See the License for the specific language governing permissions and
-@REM limitations under the License.
-
-@echo off
-if "%OS%" == "Windows_NT" setlocal
-
-if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%~dp0..
-if NOT DEFINED CASSANDRA_CONF set CASSANDRA_CONF="%CASSANDRA_HOME%\conf"
-if NOT DEFINED CASSANDRA_MAIN set CASSANDRA_MAIN=org.apache.cassandra.tools.SSTableExport
-if NOT DEFINED JAVA_HOME goto :err
-
-REM ***** JAVA options *****
-set JAVA_OPTS=^
- -Dlogback.configurationFile=logback-tools.xml
-
-REM ***** CLASSPATH library setting *****
-
-REM Ensure that any user defined CLASSPATH variables are not used on startup
-set CLASSPATH="%CASSANDRA_HOME%\conf"
-
-REM For each jar in the CASSANDRA_HOME lib directory call append to build the CLASSPATH variable.
-for %%i in ("%CASSANDRA_HOME%\lib\*.jar") do call :append "%%i"
-goto okClasspath
-
-:append
-set CLASSPATH=%CLASSPATH%;%1
-goto :eof
-
-:okClasspath
-REM Include the build\classes\main directory so it works in development
-set CASSANDRA_CLASSPATH=%CLASSPATH%;"%CASSANDRA_HOME%\build\classes\main";%CASSANDRA_CONF%;"%CASSANDRA_HOME%\build\classes\thrift"
-
-set CASSANDRA_PARAMS=
-set TOOLS_PARAMS=
-
-FOR %%A IN (%*) DO call :appendToolsParams %%A
-
-goto runTool
-
-:appendToolsParams
-set TOOLS_PARAMS=%TOOLS_PARAMS% %1
-goto :eof
-
-:runTool
-"%JAVA_HOME%\bin\java" %JAVA_OPTS% %CASSANDRA_PARAMS% -cp %CASSANDRA_CLASSPATH% "%CASSANDRA_MAIN%" %TOOLS_PARAMS%
-goto finally
-
-:err
-echo JAVA_HOME environment variable must be set!
-pause
-
-:finally
-
-ENDLOCAL
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4090f10/bin/sstablesplit
----------------------------------------------------------------------
diff --git a/bin/sstablesplit b/bin/sstablesplit
deleted file mode 100755
index 13a81ef..0000000
--- a/bin/sstablesplit
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/sh
-
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# 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 \
- ~/.cassandra.in.sh \
- `dirname $0`/cassandra.in.sh; do
- if [ -r $include ]; then
- . $include
- break
- fi
- done
-elif [ -r $CASSANDRA_INCLUDE ]; then
- . $CASSANDRA_INCLUDE
-fi
-
-# Use JAVA_HOME if set, otherwise look for java in PATH
-if [ -x $JAVA_HOME/bin/java ]; then
- JAVA=$JAVA_HOME/bin/java
-else
- JAVA=`which java`
-fi
-
-if [ -z $CLASSPATH ]; then
- echo "You must set the CLASSPATH var" >&2
- exit 1
-fi
-
-$JAVA $JAVA_AGENT -ea -cp $CLASSPATH -Xmx256M \
- -Dlogback.configurationFile=logback-tools.xml \
- org.apache.cassandra.tools.StandaloneSplitter "$@"
-
-# vi:ai sw=4 ts=4 tw=0 et
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4090f10/bin/sstablesplit.bat
----------------------------------------------------------------------
diff --git a/bin/sstablesplit.bat b/bin/sstablesplit.bat
deleted file mode 100644
index 16ccac1..0000000
--- a/bin/sstablesplit.bat
+++ /dev/null
@@ -1,61 +0,0 @@
-@REM
-@REM Licensed to the Apache Software Foundation (ASF) under one or more
-@REM contributor license agreements. See the NOTICE file distributed with
-@REM this work for additional information regarding copyright ownership.
-@REM The ASF licenses this file to You under the Apache License, Version 2.0
-@REM (the "License"); you may not use this file except in compliance with
-@REM the License. You may obtain a copy of the License at
-@REM
-@REM http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing, software
-@REM distributed under the License is distributed on an "AS IS" BASIS,
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@REM See the License for the specific language governing permissions and
-@REM limitations under the License.
-
-@echo off
-if "%OS%" == "Windows_NT" setlocal
-
-if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%~dp0..
-if NOT DEFINED CASSANDRA_CONF set CASSANDRA_CONF="%CASSANDRA_HOME%\conf"
-if NOT DEFINED CASSANDRA_MAIN set CASSANDRA_MAIN=org.apache.cassandra.tools.StandaloneSplitter
-if NOT DEFINED JAVA_HOME goto :err
-
-REM ***** JAVA options *****
-set JAVA_OPTS=^
- -Dlogback.configurationFile=logback-tools.xml
-
-REM ***** CLASSPATH library setting *****
-
-REM Ensure that any user defined CLASSPATH variables are not used on startup
-set CLASSPATH="%CASSANDRA_HOME%\conf"
-
-REM For each jar in the CASSANDRA_HOME lib directory call append to build the CLASSPATH variable.
-for %%i in ("%CASSANDRA_HOME%\lib\*.jar") do call :append "%%i"
-goto okClasspath
-
-:append
-set CLASSPATH=%CLASSPATH%;%1
-goto :eof
-
-:okClasspath
-REM Include the build\classes\main directory so it works in development
-set CASSANDRA_CLASSPATH=%CLASSPATH%;"%CASSANDRA_HOME%\build\classes\main";%CASSANDRA_CONF%;"%CASSANDRA_HOME%\build\classes\thrift"
-
-set CASSANDRA_PARAMS=
-set TOOLS_PARAMS=
-
-goto runTool
-
-:runTool
-"%JAVA_HOME%\bin\java" %JAVA_OPTS% %CASSANDRA_PARAMS% -cp %CASSANDRA_CLASSPATH% "%CASSANDRA_MAIN%" %*
-goto finally
-
-:err
-echo JAVA_HOME environment variable must be set!
-pause
-
-:finally
-
-ENDLOCAL
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4090f10/debian/README.Debian
----------------------------------------------------------------------
diff --git a/debian/README.Debian b/debian/README.Debian
index 9d7ea40..0a54d2b 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -2,7 +2,8 @@ Cassandra for Debian
====================
This package is not a part of Debian, (and there are no immediate plans
-to have it added). Bugs should be sent to eevans@apache.org, *not* filed
-in the Debian BTS.
+to have it added). Bugs should be sent to the Apache Cassandra JIRA, *not*
+filed in the Debian BTS.
+
+ https://issues.apache.org/jira/browse/CASSANDRA
- -- Eric Evans <ee...@apache.org> Sun, 26 Jul 2009 14:35:11 -0500
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4090f10/debian/cassandra-tools.install
----------------------------------------------------------------------
diff --git a/debian/cassandra-tools.install b/debian/cassandra-tools.install
new file mode 100644
index 0000000..6df21f3
--- /dev/null
+++ b/debian/cassandra-tools.install
@@ -0,0 +1,7 @@
+tools/bin/json2sstable usr/bin
+tools/bin/sstable2json usr/bin
+tools/bin/sstablelevelreset usr/bin
+tools/bin/sstablemetadata usr/bin
+tools/bin/sstablerepairedset usr/bin
+tools/bin/sstablesplit usr/bin
+tools/bin/token-generator usr/bin
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4090f10/debian/cassandra.install
----------------------------------------------------------------------
diff --git a/debian/cassandra.install b/debian/cassandra.install
index ff50457..5b6a81b 100644
--- a/debian/cassandra.install
+++ b/debian/cassandra.install
@@ -13,19 +13,13 @@ debian/cassandra-sysctl.conf etc/sysctl.d
bin/cassandra usr/sbin
bin/cassandra-cli usr/bin
bin/nodetool usr/bin
-bin/json2sstable usr/bin
-bin/sstable2json usr/bin
bin/sstablekeys usr/bin
bin/sstableloader usr/bin
bin/cqlsh usr/bin
bin/sstablescrub usr/bin
bin/sstableupgrade usr/bin
-bin/sstablesplit usr/bin
bin/cassandra-shuffle usr/bin
tools/bin/cassandra-stress usr/bin
-tools/bin/token-generator usr/bin
-tools/bin/sstablelevelreset usr/bin
-tools/bin/sstablemetadata usr/bin
lib/*.jar usr/share/cassandra/lib
lib/*.zip usr/share/cassandra/lib
lib/licenses usr/share/doc/cassandra
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4090f10/debian/control
----------------------------------------------------------------------
diff --git a/debian/control b/debian/control
index b481e30..cc0c49b 100644
--- a/debian/control
+++ b/debian/control
@@ -18,3 +18,12 @@ Replaces: apache-cassandra1
Description: distributed storage system for structured data
Cassandra is a distributed (peer-to-peer) system for the management
and storage of structured data.
+
+Package: cassandra-tools
+Architecture: all
+Depends: cassandra (= ${binary:Version}), ${misc:Depends}
+Description: distributed storage system for structured data
+ Cassandra is a distributed (peer-to-peer) system for the management
+ and storage of structured data.
+ .
+ This package contains extra tools for working with Cassandra clusters.
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4090f10/tools/bin/cassandra.in.sh
----------------------------------------------------------------------
diff --git a/tools/bin/cassandra.in.sh b/tools/bin/cassandra.in.sh
index 74f1cc8..4b81514 100644
--- a/tools/bin/cassandra.in.sh
+++ b/tools/bin/cassandra.in.sh
@@ -15,31 +15,31 @@
# limitations under the License.
if [ "x$CASSANDRA_HOME" = "x" ]; then
- CASSANDRA_HOME=`dirname $0`/../../
+ CASSANDRA_HOME="`dirname $0`/../.."
fi
# The directory where Cassandra's configs live (required)
if [ "x$CASSANDRA_CONF" = "x" ]; then
- CASSANDRA_CONF=$CASSANDRA_HOME/conf
+ CASSANDRA_CONF="$CASSANDRA_HOME/conf"
fi
# This can be the path to a jar file, or a directory containing the
# compiled classes. NOTE: This isn't needed by the startup script,
# it's just used here in constructing the classpath.
-cassandra_bin=$CASSANDRA_HOME/build/classes/main
-cassandra_bin=$cassandra_bin:$CASSANDRA_HOME/build/classes/stress
-cassandra_bin=$cassandra_bin:$CASSANDRA_HOME/build/classes/thrift
-#cassandra_bin=$cassandra_home/build/cassandra.jar
+cassandra_bin="$CASSANDRA_HOME/build/classes/main"
+cassandra_bin="$cassandra_bin:$CASSANDRA_HOME/build/classes/stress"
+cassandra_bin="$cassandra_bin:$CASSANDRA_HOME/build/classes/thrift"
+#cassandra_bin="$cassandra_home/build/cassandra.jar"
# JAVA_HOME can optionally be set here
#JAVA_HOME=/usr/local/jdk6
# The java classpath (required)
-CLASSPATH=$CASSANDRA_CONF:$cassandra_bin
+CLASSPATH="$CASSANDRA_CONF:$cassandra_bin"
-for jar in $CASSANDRA_HOME/tools/lib/*.jar; do
- CLASSPATH=$CLASSPATH:$jar
+for jar in "$CASSANDRA_HOME"/tools/lib/*.jar; do
+ CLASSPATH="$CLASSPATH:$jar"
done
-for jar in $CASSANDRA_HOME/lib/*.jar; do
- CLASSPATH=$CLASSPATH:$jar
+for jar in "$CASSANDRA_HOME"/lib/*.jar; do
+ CLASSPATH="$CLASSPATH:$jar"
done
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4090f10/tools/bin/json2sstable
----------------------------------------------------------------------
diff --git a/tools/bin/json2sstable b/tools/bin/json2sstable
new file mode 100755
index 0000000..fff559f
--- /dev/null
+++ b/tools/bin/json2sstable
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if [ "x$CASSANDRA_INCLUDE" = "x" ]; then
+ for include in "`dirname "$0"`/cassandra.in.sh" \
+ "$HOME/.cassandra.in.sh" \
+ /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
+ fi
+ done
+elif [ -r "$CASSANDRA_INCLUDE" ]; then
+ . "$CASSANDRA_INCLUDE"
+fi
+
+# Use JAVA_HOME if set, otherwise look for java in PATH
+if [ -x "$JAVA_HOME/bin/java" ]; then
+ JAVA="$JAVA_HOME/bin/java"
+else
+ JAVA="`which java`"
+fi
+
+if [ -z "$CLASSPATH" ]; then
+ echo "You must set the CLASSPATH var" >&2
+ exit 1
+fi
+
+"$JAVA" $JAVA_AGENT -cp "$CLASSPATH" -Dstorage-config="$CASSANDRA_CONF" \
+ -Dlogback.configurationFile=logback-tools.xml \
+ org.apache.cassandra.tools.SSTableImport "$@"
+
+# vi:ai sw=4 ts=4 tw=0 et
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4090f10/tools/bin/json2sstable.bat
----------------------------------------------------------------------
diff --git a/tools/bin/json2sstable.bat b/tools/bin/json2sstable.bat
new file mode 100644
index 0000000..291fd22
--- /dev/null
+++ b/tools/bin/json2sstable.bat
@@ -0,0 +1,67 @@
+@REM
+@REM Licensed to the Apache Software Foundation (ASF) under one or more
+@REM contributor license agreements. See the NOTICE file distributed with
+@REM this work for additional information regarding copyright ownership.
+@REM The ASF licenses this file to You under the Apache License, Version 2.0
+@REM (the "License"); you may not use this file except in compliance with
+@REM the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+
+@echo off
+if "%OS%" == "Windows_NT" setlocal
+
+if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%~dp0..
+if NOT DEFINED CASSANDRA_CONF set CASSANDRA_CONF="%CASSANDRA_HOME%\conf"
+if NOT DEFINED CASSANDRA_MAIN set CASSANDRA_MAIN=org.apache.cassandra.tools.SSTableImport
+if NOT DEFINED JAVA_HOME goto :err
+
+REM ***** JAVA options *****
+set JAVA_OPTS=^
+ -Dlogback.configurationFile=logback-tools.xml
+
+REM ***** CLASSPATH library setting *****
+
+REM Ensure that any user defined CLASSPATH variables are not used on startup
+set CLASSPATH="%CASSANDRA_HOME%\conf"
+
+REM For each jar in the CASSANDRA_HOME lib directory call append to build the CLASSPATH variable.
+for %%i in ("%CASSANDRA_HOME%\lib\*.jar") do call :append "%%i"
+goto okClasspath
+
+:append
+set CLASSPATH=%CLASSPATH%;%1
+goto :eof
+
+:okClasspath
+REM Include the build\classes\main directory so it works in development
+set CASSANDRA_CLASSPATH=%CLASSPATH%;"%CASSANDRA_HOME%\build\classes\main";%CASSANDRA_CONF%;"%CASSANDRA_HOME%\build\classes\thrift"
+
+set CASSANDRA_PARAMS=
+set TOOLS_PARAMS=
+
+FOR %%A IN (%*) DO call :appendToolsParams %%A
+
+goto runTool
+
+:appendToolsParams
+set TOOLS_PARAMS=%TOOLS_PARAMS% %1
+goto :eof
+
+:runTool
+"%JAVA_HOME%\bin\java" %JAVA_OPTS% %CASSANDRA_PARAMS% -cp %CASSANDRA_CLASSPATH% "%CASSANDRA_MAIN%" %TOOLS_PARAMS%
+goto finally
+
+:err
+echo JAVA_HOME environment variable must be set!
+pause
+
+:finally
+
+ENDLOCAL
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4090f10/tools/bin/sstable2json
----------------------------------------------------------------------
diff --git a/tools/bin/sstable2json b/tools/bin/sstable2json
new file mode 100755
index 0000000..bcd346c
--- /dev/null
+++ b/tools/bin/sstable2json
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if [ "x$CASSANDRA_INCLUDE" = "x" ]; then
+ for include in "`dirname "$0"`/cassandra.in.sh" \
+ "$HOME/.cassandra.in.sh" \
+ /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
+ fi
+ done
+elif [ -r "$CASSANDRA_INCLUDE" ]; then
+ . "$CASSANDRA_INCLUDE"
+fi
+
+
+# Use JAVA_HOME if set, otherwise look for java in PATH
+if [ -x "$JAVA_HOME/bin/java" ]; then
+ JAVA="$JAVA_HOME/bin/java"
+else
+ JAVA="`which java`"
+fi
+
+if [ -z "$CLASSPATH" ]; then
+ echo "You must set the CLASSPATH var" >&2
+ exit 1
+fi
+
+"$JAVA" $JAVA_AGENT -cp "$CLASSPATH" -Dstorage-config="$CASSANDRA_CONF" \
+ -Dlogback.configurationFile=logback-tools.xml \
+ org.apache.cassandra.tools.SSTableExport "$@"
+
+# vi:ai sw=4 ts=4 tw=0 et
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4090f10/tools/bin/sstable2json.bat
----------------------------------------------------------------------
diff --git a/tools/bin/sstable2json.bat b/tools/bin/sstable2json.bat
new file mode 100644
index 0000000..b67c7ad
--- /dev/null
+++ b/tools/bin/sstable2json.bat
@@ -0,0 +1,67 @@
+@REM
+@REM Licensed to the Apache Software Foundation (ASF) under one or more
+@REM contributor license agreements. See the NOTICE file distributed with
+@REM this work for additional information regarding copyright ownership.
+@REM The ASF licenses this file to You under the Apache License, Version 2.0
+@REM (the "License"); you may not use this file except in compliance with
+@REM the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+
+@echo off
+if "%OS%" == "Windows_NT" setlocal
+
+if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%~dp0..
+if NOT DEFINED CASSANDRA_CONF set CASSANDRA_CONF="%CASSANDRA_HOME%\conf"
+if NOT DEFINED CASSANDRA_MAIN set CASSANDRA_MAIN=org.apache.cassandra.tools.SSTableExport
+if NOT DEFINED JAVA_HOME goto :err
+
+REM ***** JAVA options *****
+set JAVA_OPTS=^
+ -Dlogback.configurationFile=logback-tools.xml
+
+REM ***** CLASSPATH library setting *****
+
+REM Ensure that any user defined CLASSPATH variables are not used on startup
+set CLASSPATH="%CASSANDRA_HOME%\conf"
+
+REM For each jar in the CASSANDRA_HOME lib directory call append to build the CLASSPATH variable.
+for %%i in ("%CASSANDRA_HOME%\lib\*.jar") do call :append "%%i"
+goto okClasspath
+
+:append
+set CLASSPATH=%CLASSPATH%;%1
+goto :eof
+
+:okClasspath
+REM Include the build\classes\main directory so it works in development
+set CASSANDRA_CLASSPATH=%CLASSPATH%;"%CASSANDRA_HOME%\build\classes\main";%CASSANDRA_CONF%;"%CASSANDRA_HOME%\build\classes\thrift"
+
+set CASSANDRA_PARAMS=
+set TOOLS_PARAMS=
+
+FOR %%A IN (%*) DO call :appendToolsParams %%A
+
+goto runTool
+
+:appendToolsParams
+set TOOLS_PARAMS=%TOOLS_PARAMS% %1
+goto :eof
+
+:runTool
+"%JAVA_HOME%\bin\java" %JAVA_OPTS% %CASSANDRA_PARAMS% -cp %CASSANDRA_CLASSPATH% "%CASSANDRA_MAIN%" %TOOLS_PARAMS%
+goto finally
+
+:err
+echo JAVA_HOME environment variable must be set!
+pause
+
+:finally
+
+ENDLOCAL
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4090f10/tools/bin/sstablesplit
----------------------------------------------------------------------
diff --git a/tools/bin/sstablesplit b/tools/bin/sstablesplit
new file mode 100755
index 0000000..13a81ef
--- /dev/null
+++ b/tools/bin/sstablesplit
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# 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 \
+ ~/.cassandra.in.sh \
+ `dirname $0`/cassandra.in.sh; do
+ if [ -r $include ]; then
+ . $include
+ break
+ fi
+ done
+elif [ -r $CASSANDRA_INCLUDE ]; then
+ . $CASSANDRA_INCLUDE
+fi
+
+# Use JAVA_HOME if set, otherwise look for java in PATH
+if [ -x $JAVA_HOME/bin/java ]; then
+ JAVA=$JAVA_HOME/bin/java
+else
+ JAVA=`which java`
+fi
+
+if [ -z $CLASSPATH ]; then
+ echo "You must set the CLASSPATH var" >&2
+ exit 1
+fi
+
+$JAVA $JAVA_AGENT -ea -cp $CLASSPATH -Xmx256M \
+ -Dlogback.configurationFile=logback-tools.xml \
+ org.apache.cassandra.tools.StandaloneSplitter "$@"
+
+# vi:ai sw=4 ts=4 tw=0 et
http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4090f10/tools/bin/sstablesplit.bat
----------------------------------------------------------------------
diff --git a/tools/bin/sstablesplit.bat b/tools/bin/sstablesplit.bat
new file mode 100644
index 0000000..16ccac1
--- /dev/null
+++ b/tools/bin/sstablesplit.bat
@@ -0,0 +1,61 @@
+@REM
+@REM Licensed to the Apache Software Foundation (ASF) under one or more
+@REM contributor license agreements. See the NOTICE file distributed with
+@REM this work for additional information regarding copyright ownership.
+@REM The ASF licenses this file to You under the Apache License, Version 2.0
+@REM (the "License"); you may not use this file except in compliance with
+@REM the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+
+@echo off
+if "%OS%" == "Windows_NT" setlocal
+
+if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%~dp0..
+if NOT DEFINED CASSANDRA_CONF set CASSANDRA_CONF="%CASSANDRA_HOME%\conf"
+if NOT DEFINED CASSANDRA_MAIN set CASSANDRA_MAIN=org.apache.cassandra.tools.StandaloneSplitter
+if NOT DEFINED JAVA_HOME goto :err
+
+REM ***** JAVA options *****
+set JAVA_OPTS=^
+ -Dlogback.configurationFile=logback-tools.xml
+
+REM ***** CLASSPATH library setting *****
+
+REM Ensure that any user defined CLASSPATH variables are not used on startup
+set CLASSPATH="%CASSANDRA_HOME%\conf"
+
+REM For each jar in the CASSANDRA_HOME lib directory call append to build the CLASSPATH variable.
+for %%i in ("%CASSANDRA_HOME%\lib\*.jar") do call :append "%%i"
+goto okClasspath
+
+:append
+set CLASSPATH=%CLASSPATH%;%1
+goto :eof
+
+:okClasspath
+REM Include the build\classes\main directory so it works in development
+set CASSANDRA_CLASSPATH=%CLASSPATH%;"%CASSANDRA_HOME%\build\classes\main";%CASSANDRA_CONF%;"%CASSANDRA_HOME%\build\classes\thrift"
+
+set CASSANDRA_PARAMS=
+set TOOLS_PARAMS=
+
+goto runTool
+
+:runTool
+"%JAVA_HOME%\bin\java" %JAVA_OPTS% %CASSANDRA_PARAMS% -cp %CASSANDRA_CLASSPATH% "%CASSANDRA_MAIN%" %*
+goto finally
+
+:err
+echo JAVA_HOME environment variable must be set!
+pause
+
+:finally
+
+ENDLOCAL