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
|
||||
|
||||
VERSION=666.development
|
||||
VERSION=1.7.5
|
||||
|
||||
if test -f version
|
||||
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
|
||||
sudo apt-get -y install lsb-release
|
||||
fi
|
||||
if [ ! -f /usr/bin/python ]; then
|
||||
sudo apt-get -y install python
|
||||
fi
|
||||
DISTRIBUTION=`lsb_release -i|awk '{print $3}'`
|
||||
RELEASE=`lsb_release -r|awk '{print $2}'`
|
||||
CODENAME=`lsb_release -c|awk '{print $2}'`
|
||||
@ -28,6 +31,7 @@ fi
|
||||
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 apt-get -y update
|
||||
sudo apt-get install -t jessie-backports -y ca-certificates-java
|
||||
fi
|
||||
|
||||
VERSION=$(./SCYLLA-VERSION-GEN)
|
||||
|
@ -98,6 +98,7 @@ do
|
||||
;;
|
||||
-Dcom.sun.management.jmxremote.host=*)
|
||||
JMX_ADDR=$1
|
||||
HOSTNAME=${1:36}
|
||||
shift
|
||||
;;
|
||||
-Dcom.sun.management.jmxremote.authenticate=*)
|
||||
@ -127,6 +128,7 @@ if [ $REMOTE -eq 0 ]; then
|
||||
if [ -z $JMX_ADDR ]; then
|
||||
JMX_ADDR=-Dcom.sun.management.jmxremote.host=localhost
|
||||
fi
|
||||
HOSTNAME=localhost
|
||||
else
|
||||
if [ -z $JMX_LOCAL ]; then
|
||||
JMX_LOCAL=-Dcom.sun.management.jmxremote.local.only=false
|
||||
|
@ -472,8 +472,8 @@ public class APIClient {
|
||||
for (int i = 0; i < arr.size(); i++) {
|
||||
JsonObject obj = arr.getJsonObject(i);
|
||||
if (obj.containsKey("ks") && obj.containsKey("cf")) {
|
||||
SnapshotDetailsTabularData.from(key, obj.getString("ks"), obj.getString("cf"), obj.getInt("total"),
|
||||
obj.getInt("live"), data);
|
||||
SnapshotDetailsTabularData.from(key, obj.getString("ks"), obj.getString("cf"), obj.getJsonNumber("total").longValue(),
|
||||
obj.getJsonNumber("live").longValue(), data);
|
||||
}
|
||||
}
|
||||
return data;
|
||||
|
@ -196,11 +196,11 @@ public class MetricsRegistry {
|
||||
|
||||
private static final TimeUnit RATE_UNIT = TimeUnit.SECONDS;
|
||||
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 double toDuration(double nanos) {
|
||||
return nanos * DURATION_FACTOR;
|
||||
private static double toDuration(double micro) {
|
||||
return micro * DURATION_FACTOR;
|
||||
}
|
||||
|
||||
private static String unitString(TimeUnit u) {
|
||||
@ -650,61 +650,73 @@ public class MetricsRegistry {
|
||||
|
||||
@Override
|
||||
public double getMin() {
|
||||
update();
|
||||
return toDuration(histogram.getMin());
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMax() {
|
||||
update();
|
||||
return toDuration(histogram.getMax());
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMean() {
|
||||
update();
|
||||
return toDuration(histogram.getMean());
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getStdDev() {
|
||||
update();
|
||||
return toDuration(histogram.getStdDev());
|
||||
}
|
||||
|
||||
@Override
|
||||
public double get50thPercentile() {
|
||||
update();
|
||||
return toDuration(histogram.getValue(.5));
|
||||
}
|
||||
|
||||
@Override
|
||||
public double get75thPercentile() {
|
||||
update();
|
||||
return toDuration(histogram.getValue(.75));
|
||||
}
|
||||
|
||||
@Override
|
||||
public double get95thPercentile() {
|
||||
update();
|
||||
return toDuration(histogram.getValue(.95));
|
||||
}
|
||||
|
||||
@Override
|
||||
public double get98thPercentile() {
|
||||
update();
|
||||
return toDuration(histogram.getValue(.98));
|
||||
}
|
||||
|
||||
@Override
|
||||
public double get99thPercentile() {
|
||||
update();
|
||||
return toDuration(histogram.getValue(.99));
|
||||
}
|
||||
|
||||
@Override
|
||||
public double get999thPercentile() {
|
||||
update();
|
||||
return toDuration(histogram.getValue(.999));
|
||||
}
|
||||
|
||||
@Override
|
||||
public long[] values() {
|
||||
update();
|
||||
return histogram.getValues();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDurationUnit() {
|
||||
update();
|
||||
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.Function;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import javax.management.MalformedObjectNameException;
|
||||
import javax.management.ObjectName;
|
||||
|
||||
import org.apache.cassandra.db.ColumnFamilyStore;
|
||||
import org.apache.cassandra.metrics.MetricsRegistry.MetricMBean;
|
||||
|
||||
import com.scylladb.jmx.api.APIClient;
|
||||
|
||||
@ -110,15 +112,22 @@ public class TableMetrics implements Metrics {
|
||||
final MetricNameFactory factory;
|
||||
final MetricNameFactory aliasFactory;
|
||||
final String cfName;
|
||||
final MetricsRegistry other;
|
||||
|
||||
public Registry(MetricsRegistry other, MetricNameFactory factory, MetricNameFactory aliasFactory,
|
||||
String cfName) {
|
||||
super(other);
|
||||
this.other = other;
|
||||
this.cfName = cfName;
|
||||
this.factory = factory;
|
||||
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 {
|
||||
createTableGauge(name, name, uri);
|
||||
}
|
||||
|
@ -582,6 +582,7 @@ public class StorageService extends MetricsMBean implements StorageServiceMBean,
|
||||
/**
|
||||
* Forces major compaction of a single keyspace
|
||||
*/
|
||||
@Override
|
||||
public void 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)
|
||||
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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user