Author: ivol37 at gmail.com
Date: Mon Jan 17 16:06:05 2011
New Revision: 667

Log:
[AMDATU-272] Added nodetool module

Added:
   trunk/amdatu-cassandra/cassandra-tools/
   trunk/amdatu-cassandra/cassandra-tools/pom.xml
   trunk/amdatu-cassandra/cassandra-tools/src/
   trunk/amdatu-cassandra/cassandra-tools/src/main/
   trunk/amdatu-cassandra/cassandra-tools/src/main/assembly/
   trunk/amdatu-cassandra/cassandra-tools/src/main/assembly/assembly.xml
   trunk/amdatu-cassandra/cassandra-tools/src/main/resources/
   trunk/amdatu-cassandra/cassandra-tools/src/main/resources/nodetool
   trunk/amdatu-cassandra/cassandra-tools/src/main/resources/nodetool.bat
   trunk/amdatu-cassandra/cassandra-tools/src/main/resources/readme.txt

Added: trunk/amdatu-cassandra/cassandra-tools/pom.xml
==============================================================================
--- (empty file)
+++ trunk/amdatu-cassandra/cassandra-tools/pom.xml      Mon Jan 17 16:06:05 2011
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.amdatu</groupId>
+    <artifactId>org.amdatu.cassandra</artifactId>
+    <version>0.1.0-SNAPSHOT</version>
+  </parent>
+  <groupId>org.amdatu.cassandra</groupId>
+  <artifactId>tools</artifactId>
+  <packaging>jar</packaging>
+  <name>Amdatu Cassandra - Tools</name>
+  <description>This bundle contains tools for managing Apache Cassandra nodes 
in a cluster</description>
+
+  <properties>
+    
<cassandra.lib.filename>cassandra-${cassandra.version}</cassandra.lib.filename>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.cassandra</groupId>
+      <artifactId>apache-cassandra</artifactId>
+      <version>${cassandra.version}</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>libthrift</groupId>
+      <artifactId>libthrift</artifactId>
+      <version>0.5</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <version>1.2.16</version>
+      <scope>compile</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>javax.jms</groupId>
+          <artifactId>jms</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>com.sun.jmx</groupId>
+          <artifactId>jmxri</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>com.sun.jdmk</groupId>
+          <artifactId>jmxtools</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+      <version>1.5.6</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-jdk14</artifactId>
+      <version>1.5.6</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>commons-cli</groupId>
+      <artifactId>commons-cli</artifactId>
+      <version>1.2</version>
+      <scope>compile</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>create-jar</id>
+            <phase>package</phase>
+            <goals>
+              <goal>single</goal>
+            </goals>
+            </execution>
+         </executions>
+        <configuration>
+          <descriptors>
+            <descriptor>src/main/assembly/assembly.xml</descriptor>
+          </descriptors>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Added: trunk/amdatu-cassandra/cassandra-tools/src/main/assembly/assembly.xml
==============================================================================
--- (empty file)
+++ trunk/amdatu-cassandra/cassandra-tools/src/main/assembly/assembly.xml       
Mon Jan 17 16:06:05 2011
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<assembly 
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0
 http://maven.apache.org/xsd/assembly-1.1.0.xsd";>
+
+  <id>bin</id>
+  <formats>
+    <format>dir</format>
+    <format>zip</format>
+  </formats>
+  <includeBaseDirectory>false</includeBaseDirectory>
+
+  <dependencySets>
+    <dependencySet>
+      <outputDirectory>lib</outputDirectory>
+    </dependencySet>
+  </dependencySets>
+
+ <fileSets>
+    <fileSet>
+      <directory>src/main/resources</directory>
+      <outputDirectory>.</outputDirectory>
+      <filtered>true</filtered>
+    </fileSet>
+  </fileSets>
+</assembly>
\ No newline at end of file

Added: trunk/amdatu-cassandra/cassandra-tools/src/main/resources/nodetool
==============================================================================
--- (empty file)
+++ trunk/amdatu-cassandra/cassandra-tools/src/main/resources/nodetool  Mon Jan 
17 16:06:05 2011
@@ -0,0 +1,62 @@
+#!/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 [ `basename $0` = 'nodeprobe' ]; then
+    echo "***************************************************************" >&2
+    echo "WARNING: $0 is obsolete, use `dirname $0`/nodetool instead" >&2
+    echo "***************************************************************" >&2
+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 \
+                   `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 $CASSANDRA_CONF -o -z $CLASSPATH ]; then
+    echo "You must set the CASSANDRA_CONF and CLASSPATH vars" >&2
+    exit 1
+fi
+
+# Special-case path variables.
+case "`uname`" in
+    CYGWIN*) 
+        CLASSPATH=`cygpath -p -w "$CLASSPATH"`
+        CASSANDRA_CONF=`cygpath -p -w "$CASSANDRA_CONF"`
+    ;;
+esac
+
+$JAVA -cp $CLASSPATH -Dstorage-config=$CASSANDRA_CONF \
+        -Dlog4j.configuration=log4j-tools.properties \
+        org.apache.cassandra.tools.NodeCmd $@
+
+# vi:ai sw=4 ts=4 tw=0 et

Added: trunk/amdatu-cassandra/cassandra-tools/src/main/resources/nodetool.bat
==============================================================================
--- (empty file)
+++ trunk/amdatu-cassandra/cassandra-tools/src/main/resources/nodetool.bat      
Mon Jan 17 16:06:05 2011
@@ -0,0 +1,51 @@
+ at REM
+ at REM Licensed to the Apache Software Foundation (ASF) under one or more
+ at REM contributor license agreements. See the NOTICE file distributed with
+ at REM this work for additional information regarding copyright ownership.
+ at REM The ASF licenses this file to You under the Apache License, Version 2.0
+ at REM (the "License"); you may not use this file except in compliance with
+ at REM the License. You may obtain a copy of the License at
+ at REM
+ at REM http://www.apache.org/licenses/LICENSE-2.0
+ at REM
+ at REM Unless required by applicable law or agreed to in writing, software
+ at REM distributed under the License is distributed on an "AS IS" BASIS,
+ at REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ at REM See the License for the specific language governing permissions and
+ at REM limitations under the License.
+
+ at echo off
+if "%OS%" == "Windows_NT" setlocal
+
+set CASSANDRA_HOME=.
+if NOT DEFINED JAVA_HOME goto err
+
+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.
+rem for %%i in (%CASSANDRA_HOME%\lib*.jar) do call :append %%~fi
+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 directory so it works in development
+set CASSANDRA_CLASSPATH=%CLASSPATH%;%CASSANDRA_HOME%\build\classes
+goto runNodeTool
+
+:runNodeTool
+echo Starting NodeTool
+"%JAVA_HOME%\bin\java" -cp "%CASSANDRA_CLASSPATH%" 
-Dlog4j.configuration=log4j-tools.properties org.apache.cassandra.tools.NodeCmd 
%*
+goto finally
+
+:err
+echo The JAVA_HOME environment variable must be set to run this program!
+pause
+
+:finally
+
+ENDLOCAL
\ No newline at end of file

Added: trunk/amdatu-cassandra/cassandra-tools/src/main/resources/readme.txt
==============================================================================
--- (empty file)
+++ trunk/amdatu-cassandra/cassandra-tools/src/main/resources/readme.txt        
Mon Jan 17 16:06:05 2011
@@ -0,0 +1,13 @@
+
+notetool
+--------
+nodetool -h ${cassandra.listen_address} -p ${cassandra.rpc_port}
+
+More information:
+  - http://www.datastax.com/docs/0.7/utilities/nodetool
+  - http://wiki.apache.org/cassandra/NodeProbe
+
+cassandra-cli
+-------------
+More information:
+  - http://wiki.apache.org/cassandra/CassandraCli
\ No newline at end of file

Reply via email to