Compare commits
17 Commits
master
...
branch-1.7
Author | SHA1 | Date | |
---|---|---|---|
|
1c249f9917 | ||
|
51ba6ea4e5 | ||
|
a2d7c777e3 | ||
|
84fd0eff69 | ||
|
671fa173db | ||
|
aeb89f535e | ||
|
ea1da250ca | ||
|
21091b6d4d | ||
|
c20ddc47b3 | ||
|
c252dcbdad | ||
|
4b367372a6 | ||
|
4586c90544 | ||
|
7674fa8082 | ||
|
8b8fe07298 | ||
|
a1ea187aa6 | ||
|
c947223b96 | ||
|
2581642a5b |
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
VERSION=666.development
|
VERSION=1.7.5
|
||||||
|
|
||||||
if test -f version
|
if test -f version
|
||||||
then
|
then
|
||||||
|
4
dist/ubuntu/build_deb.sh
vendored
4
dist/ubuntu/build_deb.sh
vendored
@ -15,6 +15,9 @@ fi
|
|||||||
if [ ! -f /usr/bin/lsb_release ]; then
|
if [ ! -f /usr/bin/lsb_release ]; then
|
||||||
sudo apt-get -y install lsb-release
|
sudo apt-get -y install lsb-release
|
||||||
fi
|
fi
|
||||||
|
if [ ! -f /usr/bin/python ]; then
|
||||||
|
sudo apt-get -y install python
|
||||||
|
fi
|
||||||
DISTRIBUTION=`lsb_release -i|awk '{print $3}'`
|
DISTRIBUTION=`lsb_release -i|awk '{print $3}'`
|
||||||
RELEASE=`lsb_release -r|awk '{print $2}'`
|
RELEASE=`lsb_release -r|awk '{print $2}'`
|
||||||
CODENAME=`lsb_release -c|awk '{print $2}'`
|
CODENAME=`lsb_release -c|awk '{print $2}'`
|
||||||
@ -28,6 +31,7 @@ fi
|
|||||||
if [ "$CODENAME" = "jessie" ]; then
|
if [ "$CODENAME" = "jessie" ]; then
|
||||||
sudo sh -c 'echo deb "http://httpredir.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list'
|
sudo sh -c 'echo deb "http://httpredir.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list'
|
||||||
sudo apt-get -y update
|
sudo apt-get -y update
|
||||||
|
sudo apt-get install -t jessie-backports -y ca-certificates-java
|
||||||
fi
|
fi
|
||||||
|
|
||||||
VERSION=$(./SCYLLA-VERSION-GEN)
|
VERSION=$(./SCYLLA-VERSION-GEN)
|
||||||
|
@ -98,6 +98,7 @@ do
|
|||||||
;;
|
;;
|
||||||
-Dcom.sun.management.jmxremote.host=*)
|
-Dcom.sun.management.jmxremote.host=*)
|
||||||
JMX_ADDR=$1
|
JMX_ADDR=$1
|
||||||
|
HOSTNAME=${1:36}
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-Dcom.sun.management.jmxremote.authenticate=*)
|
-Dcom.sun.management.jmxremote.authenticate=*)
|
||||||
@ -127,6 +128,7 @@ if [ $REMOTE -eq 0 ]; then
|
|||||||
if [ -z $JMX_ADDR ]; then
|
if [ -z $JMX_ADDR ]; then
|
||||||
JMX_ADDR=-Dcom.sun.management.jmxremote.host=localhost
|
JMX_ADDR=-Dcom.sun.management.jmxremote.host=localhost
|
||||||
fi
|
fi
|
||||||
|
HOSTNAME=localhost
|
||||||
else
|
else
|
||||||
if [ -z $JMX_LOCAL ]; then
|
if [ -z $JMX_LOCAL ]; then
|
||||||
JMX_LOCAL=-Dcom.sun.management.jmxremote.local.only=false
|
JMX_LOCAL=-Dcom.sun.management.jmxremote.local.only=false
|
||||||
|
@ -472,8 +472,8 @@ public class APIClient {
|
|||||||
for (int i = 0; i < arr.size(); i++) {
|
for (int i = 0; i < arr.size(); i++) {
|
||||||
JsonObject obj = arr.getJsonObject(i);
|
JsonObject obj = arr.getJsonObject(i);
|
||||||
if (obj.containsKey("ks") && obj.containsKey("cf")) {
|
if (obj.containsKey("ks") && obj.containsKey("cf")) {
|
||||||
SnapshotDetailsTabularData.from(key, obj.getString("ks"), obj.getString("cf"), obj.getInt("total"),
|
SnapshotDetailsTabularData.from(key, obj.getString("ks"), obj.getString("cf"), obj.getJsonNumber("total").longValue(),
|
||||||
obj.getInt("live"), data);
|
obj.getJsonNumber("live").longValue(), data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
|
@ -196,11 +196,11 @@ public class MetricsRegistry {
|
|||||||
|
|
||||||
private static final TimeUnit RATE_UNIT = TimeUnit.SECONDS;
|
private static final TimeUnit RATE_UNIT = TimeUnit.SECONDS;
|
||||||
private static final TimeUnit DURATION_UNIT = TimeUnit.MICROSECONDS;
|
private static final TimeUnit DURATION_UNIT = TimeUnit.MICROSECONDS;
|
||||||
private static final TimeUnit API_DURATION_UNIT = TimeUnit.NANOSECONDS;
|
private static final TimeUnit API_DURATION_UNIT = TimeUnit.MICROSECONDS;
|
||||||
private static final double DURATION_FACTOR = 1.0 / API_DURATION_UNIT.convert(1, DURATION_UNIT);
|
private static final double DURATION_FACTOR = 1.0 / API_DURATION_UNIT.convert(1, DURATION_UNIT);
|
||||||
|
|
||||||
private static double toDuration(double nanos) {
|
private static double toDuration(double micro) {
|
||||||
return nanos * DURATION_FACTOR;
|
return micro * DURATION_FACTOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String unitString(TimeUnit u) {
|
private static String unitString(TimeUnit u) {
|
||||||
@ -650,61 +650,73 @@ public class MetricsRegistry {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double getMin() {
|
public double getMin() {
|
||||||
|
update();
|
||||||
return toDuration(histogram.getMin());
|
return toDuration(histogram.getMin());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double getMax() {
|
public double getMax() {
|
||||||
|
update();
|
||||||
return toDuration(histogram.getMax());
|
return toDuration(histogram.getMax());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double getMean() {
|
public double getMean() {
|
||||||
|
update();
|
||||||
return toDuration(histogram.getMean());
|
return toDuration(histogram.getMean());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double getStdDev() {
|
public double getStdDev() {
|
||||||
|
update();
|
||||||
return toDuration(histogram.getStdDev());
|
return toDuration(histogram.getStdDev());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double get50thPercentile() {
|
public double get50thPercentile() {
|
||||||
|
update();
|
||||||
return toDuration(histogram.getValue(.5));
|
return toDuration(histogram.getValue(.5));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double get75thPercentile() {
|
public double get75thPercentile() {
|
||||||
|
update();
|
||||||
return toDuration(histogram.getValue(.75));
|
return toDuration(histogram.getValue(.75));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double get95thPercentile() {
|
public double get95thPercentile() {
|
||||||
|
update();
|
||||||
return toDuration(histogram.getValue(.95));
|
return toDuration(histogram.getValue(.95));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double get98thPercentile() {
|
public double get98thPercentile() {
|
||||||
|
update();
|
||||||
return toDuration(histogram.getValue(.98));
|
return toDuration(histogram.getValue(.98));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double get99thPercentile() {
|
public double get99thPercentile() {
|
||||||
|
update();
|
||||||
return toDuration(histogram.getValue(.99));
|
return toDuration(histogram.getValue(.99));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double get999thPercentile() {
|
public double get999thPercentile() {
|
||||||
|
update();
|
||||||
return toDuration(histogram.getValue(.999));
|
return toDuration(histogram.getValue(.999));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long[] values() {
|
public long[] values() {
|
||||||
|
update();
|
||||||
return histogram.getValues();
|
return histogram.getValues();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDurationUnit() {
|
public String getDurationUnit() {
|
||||||
|
update();
|
||||||
return DURATION_UNIT.toString().toLowerCase(Locale.US);
|
return DURATION_UNIT.toString().toLowerCase(Locale.US);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,11 +21,13 @@ import static com.scylladb.jmx.api.APIClient.getReader;
|
|||||||
|
|
||||||
import java.util.function.BiFunction;
|
import java.util.function.BiFunction;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
import javax.management.MalformedObjectNameException;
|
import javax.management.MalformedObjectNameException;
|
||||||
import javax.management.ObjectName;
|
import javax.management.ObjectName;
|
||||||
|
|
||||||
import org.apache.cassandra.db.ColumnFamilyStore;
|
import org.apache.cassandra.db.ColumnFamilyStore;
|
||||||
|
import org.apache.cassandra.metrics.MetricsRegistry.MetricMBean;
|
||||||
|
|
||||||
import com.scylladb.jmx.api.APIClient;
|
import com.scylladb.jmx.api.APIClient;
|
||||||
|
|
||||||
@ -110,15 +112,22 @@ public class TableMetrics implements Metrics {
|
|||||||
final MetricNameFactory factory;
|
final MetricNameFactory factory;
|
||||||
final MetricNameFactory aliasFactory;
|
final MetricNameFactory aliasFactory;
|
||||||
final String cfName;
|
final String cfName;
|
||||||
|
final MetricsRegistry other;
|
||||||
|
|
||||||
public Registry(MetricsRegistry other, MetricNameFactory factory, MetricNameFactory aliasFactory,
|
public Registry(MetricsRegistry other, MetricNameFactory factory, MetricNameFactory aliasFactory,
|
||||||
String cfName) {
|
String cfName) {
|
||||||
super(other);
|
super(other);
|
||||||
|
this.other = other;
|
||||||
this.cfName = cfName;
|
this.cfName = cfName;
|
||||||
this.factory = factory;
|
this.factory = factory;
|
||||||
this.aliasFactory = aliasFactory;
|
this.aliasFactory = aliasFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void register(Supplier<MetricMBean> f, ObjectName... objectNames) {
|
||||||
|
other.register(f, objectNames);
|
||||||
|
}
|
||||||
|
|
||||||
public void createTableGauge(String name, String uri) throws MalformedObjectNameException {
|
public void createTableGauge(String name, String uri) throws MalformedObjectNameException {
|
||||||
createTableGauge(name, name, uri);
|
createTableGauge(name, name, uri);
|
||||||
}
|
}
|
||||||
|
@ -582,6 +582,7 @@ public class StorageService extends MetricsMBean implements StorageServiceMBean,
|
|||||||
/**
|
/**
|
||||||
* Forces major compaction of a single keyspace
|
* Forces major compaction of a single keyspace
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void forceKeyspaceCompaction(String keyspaceName, String... columnFamilies)
|
public void forceKeyspaceCompaction(String keyspaceName, String... columnFamilies)
|
||||||
throws IOException, ExecutionException, InterruptedException {
|
throws IOException, ExecutionException, InterruptedException {
|
||||||
log(" forceKeyspaceCompaction(String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException");
|
log(" forceKeyspaceCompaction(String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException");
|
||||||
|
@ -291,6 +291,12 @@ public interface StorageServiceMBean extends NotificationEmitter {
|
|||||||
public void forceKeyspaceCompaction(boolean splitOutput, String keyspaceName, String... tableNames)
|
public void forceKeyspaceCompaction(boolean splitOutput, String keyspaceName, String... tableNames)
|
||||||
throws IOException, ExecutionException, InterruptedException;
|
throws IOException, ExecutionException, InterruptedException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Forces major compaction of a single keyspace.
|
||||||
|
*/
|
||||||
|
public void forceKeyspaceCompaction(String keyspaceName, String... tableNames)
|
||||||
|
throws IOException, ExecutionException, InterruptedException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Trigger a cleanup of keys on a single keyspace
|
* Trigger a cleanup of keys on a single keyspace
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user