Compare commits

...

13 Commits

Author SHA1 Message Date
Pekka Enberg
5e25fccdb0 release: prepare for 1.6.6 2017-07-14 12:13:06 +03:00
Pekka Enberg
96083fd4fa release: prepare for 1.6.5 2017-06-09 07:53:57 +03:00
Amnon Heiman
fb7082b388 ColumnFamily: Fix column family removal
This patch address two issues with column family removal:
1. Use a safe iterator when removing from a hash
2. Explicitly unregsiter the MBean instead of waiting for the server
to do it, to prevent using MBean that does not have an actual  Column
Family.

See Scylladb/scylla#2340

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <20170510121057.31288-1-amnon@scylladb.com>
2017-06-06 12:09:10 +03:00
Pekka Enberg
f20826e475 release: prepare for 1.6.4 2017-04-24 19:39:48 +03:00
Pekka Enberg
35d354c45c release: prepare for 1.6.3 2017-04-04 14:11:11 +03:00
Pekka Enberg
9eedeba999 release: prepare for 1.6.2 2017-03-10 11:23:40 +02:00
Amnon Heiman
8487889c24 APIClient: Snapshot disk size should be long
When parsing the snapshot disk sizes, it should be long and not int.

See scylladb/scylla#2104

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <1487760019-1354-1-git-send-email-amnon@scylladb.com>
(cherry picked from commit 9c11768b9d)
2017-02-22 15:18:09 +02:00
Shlomi Livne
d0401e7b1c release: prepare for 1.6.1
Signed-off-by: Shlomi Livne <shlomi@scylladb.com>
2017-02-16 22:37:51 +02:00
Pekka Enberg
06b4775271 release: prepare for 1.6.0 2017-02-01 13:59:14 +02:00
Pekka Enberg
eecc164c6d release: prepare for 1.6.rc2 2017-01-24 14:33:41 +02:00
Pekka Enberg
b1c4cc09be release: prepare for 1.6.rc1 2017-01-16 19:01:52 +02:00
Takuya ASADA
2889495a77 dist/ubuntu: check existance of build tools
It normally won't be problem because scylla-jmx usually build after scylla building.
However some tools we required for build_deb.sh doesn't installed on minimal installation, so we should check and install it.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1483004036-2824-1-git-send-email-syuu@scylladb.com>
(cherry picked from commit 7f936862d2)
2016-12-30 10:25:46 +02:00
Pekka Enberg
d41fb7baf7 release: prepare for 1.6.rc0 2016-12-27 12:41:51 +02:00
4 changed files with 37 additions and 6 deletions

View File

@ -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

View File

@ -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}'`

View File

@ -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);
} }
} }

View File

@ -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;