Compare commits

...

8 Commits

Author SHA1 Message Date
Pekka Enberg
7059795d7b dist/ubuntu: Remove unneeded startup parameters
Fixes #19.

Signed-off-by: Pekka Enberg <penberg@scylladb.com>
2015-12-16 17:55:47 +02:00
Pekka Enberg
e647abb17e release: prepare for 0.13.2 2015-12-16 11:46:27 +02:00
Takuya ASADA
e940576504 dist: remove unneeded parameters
Since scylla-jmx supports to read configuration from scylla.yaml, we
don't need to pass these parameters from program arguments.

Fixes #17.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2015-12-14 11:29:17 +02:00
Amnon Heiman
d60b75f665 APIClient: snapshot details should align to the API
There was a confusion in the API between key and keyspace.
It was changed in the API so the JMX should be modified accordingly.
After this change

nodetool listsnapshots
Will show the current snapshots.

On scylla-jmx:
Fixes #15

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
2015-12-14 09:06:55 +02:00
Amnon Heiman
186931a02a StorageService: getLoadMap should format the load
Similiar to origin, the load map should return a formated load value.

After this patch the nodetool status command:
$nodetool status
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address    Load       Tokens  Owns    Host ID
Rack
UN  127.0.0.1  394.97 MB  256     ?
292a6c7f-2063-484c-b54d-9015216f1750  rack1
UN  127.0.0.2  151.07 MB  256     ?
102b6ecd-2081-4073-8172-bf818c35e27b  rack1

Under scylla-jmx
Fixes #18

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
2015-12-14 09:05:07 +02:00
Amnon Heiman
20501bb224 Do not add command line param by default
With the addition of the configuration file, the scylla-jmx should not
add command line configuration parameters by default. Instead, it should
add those parameters only if they are explicitely given to it.

Fixes #16.

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
2015-12-14 08:37:56 +02:00
Pekka Enberg
fab577c9c6 release: prepare for 0.13.1
Signed-off-by: Pekka Enberg <penberg@scylladb.com>
2015-12-09 14:19:17 +02:00
Pekka Enberg
ca9b0a5513 release: prepare for 0.13
Signed-off-by: Pekka Enberg <penberg@scylladb.com>
2015-12-08 11:25:49 +02:00
8 changed files with 28 additions and 24 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
VERSION=1.0
VERSION=0.13.2
if test -f version
then

View File

@ -1,12 +1,3 @@
# The jmx port to open
JMX_PORT=7199
# The API port to connect to
API_PORT=10000
# The API address to connect to
ADDR=127.0.0.1
# scylla home dir
SCYLLA_HOME=/var/lib/scylla

View File

@ -8,7 +8,7 @@ Type=simple
EnvironmentFile=/etc/sysconfig/scylla-jmx
User=scylla
Group=scylla
ExecStart=/usr/lib/scylla/jmx/scylla-jmx -jp $JMX_PORT -p $API_PORT -a $ADDR -l /usr/lib/scylla/jmx
ExecStart=/usr/lib/scylla/jmx/scylla-jmx -l /usr/lib/scylla/jmx
KillMode=process
Restart=always

View File

@ -30,7 +30,7 @@ SCRIPTNAME=/etc/init.d/$NAME
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
export SCYLLA_HOME SCYLLA_CONF
DAEMON=/usr/lib/scylla/jmx/scylla-jmx -jp $JMX_PORT -p $API_PORT -a $ADDR -l /usr/lib/scylla/jmx
DAEMON=/usr/lib/scylla/jmx/scylla-jmx -l /usr/lib/scylla/jmx
# Define LSB log_* functions.
. /lib/lsb/init-functions

View File

@ -14,5 +14,5 @@ console log
script
. /etc/default/scylla-jmx
export SCYLLA_HOME SCYLLA_CONF
exec /usr/lib/scylla/jmx/scylla-jmx -jp $JMX_PORT -p $API_PORT -a $ADDR -l /usr/lib/scylla/jmx
exec /usr/lib/scylla/jmx/scylla-jmx -l /usr/lib/scylla/jmx
end script

View File

@ -2,20 +2,22 @@
#
# Copyright (C) 2015 Cloudius Systems, Ltd.
JMX_PORT=7199
API_ADDR="127.0.0.1"
API_PORT="10000"
JMX_PORT="7199"
API_ADDR=""
API_PORT=""
CONF_FILE=""
PARAM_HELP="-h"
PARAM_JMX_PORT="-jp"
PARAM_API_PORT="-p"
PARAM_ADDR="-a"
PARAM_LOCATION="-l"
LOCATION="target"
PARAM_FILE="-cf"
print_help() {
cat <<HLPEND
scylla-jmx [$PARAM_HELP] [$PARAM_PORT port] [$PARAM_ADDR address]
scylla-jmx [$PARAM_HELP] [$PARAM_API_PORT port] [$PARAM_ADDR address] [$PARAM_JMX_PORT port] [$PARAM_FILE file]
This script is used to run the jmx proxy
@ -27,6 +29,7 @@ This script receives the following command line arguments:
$PARAM_JMX_PORT <port> - The jmx port to open
$PARAM_API_PORT <port> - The API port to connect to
$PARAM_ADDR <address> - The API address to connect to
$PARAM_FILE <file> - A configuration file to use
$PARAM_LOCATION <location> - The location of the jmx proxy jar file
HLPEND
}
@ -35,11 +38,11 @@ while test "$#" -ne 0
do
case "$1" in
"$PARAM_API_PORT")
API_PORT=$2
API_PORT="-Dapiport="$2
shift 2
;;
"$PARAM_ADDR")
API_ADDR=$2
API_ADDR="-Dapiaddress="$2
shift 2
;;
"$PARAM_PORT")
@ -54,6 +57,10 @@ do
LOCATION=$2
shift 2
;;
"$PARAM_FILE")
CONF_FILE="-Dapiconfig="$2
shift 2
;;
"$PARAM_HELP")
print_help
exit 0
@ -62,4 +69,4 @@ do
esac
done
exec java -Dapiaddress=$API_ADDR -Dapiport=$API_PORT -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=$JMX_PORT -Dcom.sun.management.jmxremote.rmi.port=$JMX_PORT -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -jar $LOCATION/urchin-mbean-1.0.jar
exec java $API_ADDR $API_PORT $CONF_FILE -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=$JMX_PORT -Dcom.sun.management.jmxremote.rmi.port=$JMX_PORT -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -jar $LOCATION/urchin-mbean-1.0.jar

View File

@ -423,14 +423,14 @@ public class APIClient {
return null;
}
private TabularDataSupport getSnapshotData(String ks, JsonArray arr) {
private TabularDataSupport getSnapshotData(String key, JsonArray arr) {
TabularDataSupport data = new TabularDataSupport(
SnapshotDetailsTabularData.TABULAR_TYPE);
for (int i = 0; i < arr.size(); i++) {
JsonObject obj = arr.getJsonObject(i);
if (obj.containsKey("key") && obj.containsKey("cf")) {
SnapshotDetailsTabularData.from(obj.getString("key"), ks,
if (obj.containsKey("ks") && obj.containsKey("cf")) {
SnapshotDetailsTabularData.from(key, obj.getString("ks"),
obj.getString("cf"), obj.getInt("total"),
obj.getInt("live"), data);
}

View File

@ -329,7 +329,13 @@ public class StorageService extends NotificationBroadcasterSupport
/** Human-readable load value. Keys are IP addresses. */
public Map<String, String> getLoadMap() {
log(" getLoadMap()");
return c.getMapStrValue("/storage_service/load_map");
Map<String, String> load = c.getMapStrValue("/storage_service/load_map");
Map<String, String> map = new HashMap<>();
for (Map.Entry<String, String> entry : load.entrySet())
{
map.put(entry.getKey(), FileUtils.stringifyFileSize(Double.parseDouble(entry.getValue())));
}
return map;
}
/**