Compare commits
13 Commits
master
...
branch-1.6
Author | SHA1 | Date | |
---|---|---|---|
|
5e25fccdb0 | ||
|
96083fd4fa | ||
|
fb7082b388 | ||
|
f20826e475 | ||
|
35d354c45c | ||
|
9eedeba999 | ||
|
8487889c24 | ||
|
d0401e7b1c | ||
|
06b4775271 | ||
|
eecc164c6d | ||
|
b1c4cc09be | ||
|
2889495a77 | ||
|
d41fb7baf7 |
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
VERSION=666.development
|
VERSION=1.6.6
|
||||||
|
|
||||||
if test -f version
|
if test -f version
|
||||||
then
|
then
|
||||||
|
13
dist/ubuntu/build_deb.sh
vendored
13
dist/ubuntu/build_deb.sh
vendored
@ -8,6 +8,19 @@ fi
|
|||||||
if [ -e debian ] || [ -e build ] || [ -e target ] || [ -e m2 ] || [ -e dependency-reduced-pom.xml ]; then
|
if [ -e debian ] || [ -e build ] || [ -e target ] || [ -e m2 ] || [ -e dependency-reduced-pom.xml ]; then
|
||||||
rm -rf debian build target m2 dependency-reduced-pom.xml
|
rm -rf debian build target m2 dependency-reduced-pom.xml
|
||||||
fi
|
fi
|
||||||
|
sudo apt-get -y update
|
||||||
|
if [ ! -f /usr/bin/git ]; then
|
||||||
|
sudo apt-get -y install git
|
||||||
|
fi
|
||||||
|
if [ ! -f /usr/bin/mk-build-deps ]; then
|
||||||
|
sudo apt-get -y install devscripts
|
||||||
|
fi
|
||||||
|
if [ ! -f /usr/bin/equivs-build ]; then
|
||||||
|
sudo apt-get -y install equivs
|
||||||
|
fi
|
||||||
|
if [ ! -f /usr/bin/lsb_release ]; then
|
||||||
|
sudo apt-get -y install lsb-release
|
||||||
|
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}'`
|
||||||
|
@ -471,7 +471,7 @@ public class APIClient {
|
|||||||
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"),
|
SnapshotDetailsTabularData.from(key, obj.getString("ks"),
|
||||||
obj.getString("cf"), obj.getInt("total"),
|
obj.getString("cf"), obj.getJsonNumber("total").longValue(),
|
||||||
obj.getInt("live"), data);
|
obj.getInt("live"), data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,9 +50,10 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
|||||||
private String keyspace;
|
private String keyspace;
|
||||||
private String name;
|
private String name;
|
||||||
private String mbeanName;
|
private String mbeanName;
|
||||||
|
private ObjectName nameObj;
|
||||||
private static APIClient s_c = new APIClient();
|
private static APIClient s_c = new APIClient();
|
||||||
static final int INTERVAL = 1000; // update every 1second
|
static final int INTERVAL = 1000; // update every 1second
|
||||||
public final ColumnFamilyMetrics metric;
|
public ColumnFamilyMetrics metric;
|
||||||
|
|
||||||
private static Map<String, ColumnFamilyStore> cf = new HashMap<String, ColumnFamilyStore>();
|
private static Map<String, ColumnFamilyStore> cf = new HashMap<String, ColumnFamilyStore>();
|
||||||
private static Timer timer = new Timer("Column Family");
|
private static Timer timer = new Timer("Column Family");
|
||||||
@ -73,7 +74,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
|||||||
mbeanName = getName(type, keyspace, name);
|
mbeanName = getName(type, keyspace, name);
|
||||||
try {
|
try {
|
||||||
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
|
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
|
||||||
ObjectName nameObj = new ObjectName(mbeanName);
|
nameObj = new ObjectName(mbeanName);
|
||||||
mbs.registerMBean(this, nameObj);
|
mbs.registerMBean(this, nameObj);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
@ -120,9 +121,12 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
|||||||
all_cf.add(name);
|
all_cf.add(name);
|
||||||
}
|
}
|
||||||
// removing deleted column family
|
// removing deleted column family
|
||||||
for (String n : cf.keySet()) {
|
Iterator<String> i = cf.keySet().iterator();
|
||||||
|
while (i.hasNext()) {
|
||||||
|
String n = i.next();
|
||||||
if (!all_cf.contains(n)) {
|
if (!all_cf.contains(n)) {
|
||||||
cf.remove(n);
|
cf.get(n).unregister();
|
||||||
|
i.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IllegalStateException e) {
|
} catch (IllegalStateException e) {
|
||||||
@ -130,6 +134,20 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Instead of waiting for the object to be removed by the mbean server,
|
||||||
|
* do it explicitly
|
||||||
|
*/
|
||||||
|
private void unregister() {
|
||||||
|
mbeanName = getName(type, keyspace, name);
|
||||||
|
try {
|
||||||
|
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
|
||||||
|
mbs.unregisterMBean(nameObj);
|
||||||
|
metric = null;
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static final class CheckRegistration extends TimerTask {
|
private static final class CheckRegistration extends TimerTask {
|
||||||
private int missed_response = 0;
|
private int missed_response = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user