Compare commits
21 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
9002c6d517 | ||
|
cc446862c8 | ||
|
5a383709b3 | ||
|
4f73c69863 | ||
|
d17d5bc73d | ||
|
e3b5c65895 | ||
|
7a13ae97bb | ||
|
61dbbb3254 | ||
|
b7efec5e99 | ||
|
a8b9849480 | ||
|
3d7226bf3d | ||
|
fb3d56d033 | ||
|
f4e5fefd3b | ||
|
ae74b2e865 | ||
|
095cbd02e5 | ||
|
3619024b44 | ||
|
b925da76d8 | ||
|
76b30ba915 | ||
|
d8a8651de9 | ||
|
b12549c260 | ||
|
ce502ed3b7 |
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
PRODUCT=scylla
|
PRODUCT=scylla
|
||||||
VERSION=666.development
|
VERSION=3.1.4
|
||||||
|
|
||||||
if test -f version
|
if test -f version
|
||||||
then
|
then
|
||||||
|
@ -152,7 +152,11 @@ public class APIClient {
|
|||||||
get(path, queryParams).delete();
|
get(path, queryParams).delete();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
get(path).delete();
|
Response response = get(path).delete();
|
||||||
|
if (response.getStatus() != Response.Status.OK.getStatusCode()) {
|
||||||
|
throw getException("Scylla API server HTTP delete to URL '" + path + "' failed",
|
||||||
|
response.readEntity(String.class));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void delete(String path) {
|
public void delete(String path) {
|
||||||
|
@ -36,6 +36,7 @@ import org.apache.cassandra.metrics.StreamingMetrics;
|
|||||||
import com.scylladb.jmx.api.APIClient;
|
import com.scylladb.jmx.api.APIClient;
|
||||||
import com.sun.jmx.mbeanserver.JmxMBeanServer;
|
import com.sun.jmx.mbeanserver.JmxMBeanServer;
|
||||||
|
|
||||||
|
@SuppressWarnings("restriction")
|
||||||
public class APIMBeanServer implements MBeanServer {
|
public class APIMBeanServer implements MBeanServer {
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
private static final Logger logger = Logger.getLogger(APIMBeanServer.class.getName());
|
private static final Logger logger = Logger.getLogger(APIMBeanServer.class.getName());
|
||||||
@ -284,7 +285,7 @@ public class APIMBeanServer implements MBeanServer {
|
|||||||
return server.getClassLoaderRepository();
|
return server.getClassLoaderRepository();
|
||||||
}
|
}
|
||||||
|
|
||||||
static final Pattern tables = Pattern.compile("^(ColumnFamil(ies|y)|(Index)?Tables?)$");
|
static final Pattern tables = Pattern.compile("^\\*?((Index)?ColumnFamil(ies|y)|(Index)?(Table(s)?)?)$");
|
||||||
|
|
||||||
private boolean checkRegistrations(ObjectName name) {
|
private boolean checkRegistrations(ObjectName name) {
|
||||||
if (name != null && server.isRegistered(name)) {
|
if (name != null && server.isRegistered(name)) {
|
||||||
|
@ -136,7 +136,7 @@ public class ColumnFamilyStore extends MetricsMBean implements ColumnFamilyStore
|
|||||||
}
|
}
|
||||||
} catch (InterruptedException | ExecutionException e) {
|
} catch (InterruptedException | ExecutionException e) {
|
||||||
futureTableSamperResult = null;
|
futureTableSamperResult = null;
|
||||||
throw new RuntimeException("Failed getting table statistics");
|
throw new RuntimeException("Failed getting table statistics", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -368,6 +368,23 @@ public class ColumnFamilyStore extends MetricsMBean implements ColumnFamilyStore
|
|||||||
return client.getListStrValue("column_family/sstables/by_key/" + getCFName(), queryParams);
|
return client.getListStrValue("column_family/sstables/by_key/" + getCFName(), queryParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a list of filenames that contain the given key on this node
|
||||||
|
* @param key
|
||||||
|
* @param hexFormat if key is in hex string format
|
||||||
|
* @return list of filenames containing the key
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<String> getSSTablesForKey(String key, boolean hexFormat)
|
||||||
|
{
|
||||||
|
log(" getSSTablesForKey(String key)");
|
||||||
|
MultivaluedMap<String, String> queryParams = new MultivaluedHashMap<String, String>();
|
||||||
|
queryParams.add("key", key);
|
||||||
|
if (hexFormat) {
|
||||||
|
queryParams.add("format", "hex");
|
||||||
|
}
|
||||||
|
return client.getListStrValue("column_family/sstables/by_key/" + getCFName(), queryParams);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Scan through Keyspace/ColumnFamily's data directory determine which
|
* Scan through Keyspace/ColumnFamily's data directory determine which
|
||||||
* SSTables should be loaded and load them
|
* SSTables should be loaded and load them
|
||||||
@ -519,8 +536,8 @@ public class ColumnFamilyStore extends MetricsMBean implements ColumnFamilyStore
|
|||||||
JsonArray counters = tableSamplerResult.getJsonArray((samplerType.equalsIgnoreCase("reads")) ? "read" : "write");
|
JsonArray counters = tableSamplerResult.getJsonArray((samplerType.equalsIgnoreCase("reads")) ? "read" : "write");
|
||||||
long size = 0;
|
long size = 0;
|
||||||
if (counters != null) {
|
if (counters != null) {
|
||||||
size = counters.size();
|
size = (count > counters.size()) ? counters.size() : count;
|
||||||
for (int i = 0; i < counters.size(); i++) {
|
for (int i = 0; i < size; i++) {
|
||||||
JsonObject counter = counters.getJsonObject(i);
|
JsonObject counter = counters.getJsonObject(i);
|
||||||
result.put(new CompositeDataSupport(COUNTER_COMPOSITE_TYPE, COUNTER_NAMES,
|
result.put(new CompositeDataSupport(COUNTER_COMPOSITE_TYPE, COUNTER_NAMES,
|
||||||
new Object[] { counter.getString("partition"), // raw
|
new Object[] { counter.getString("partition"), // raw
|
||||||
|
@ -141,6 +141,14 @@ public interface ColumnFamilyStoreMBean {
|
|||||||
*/
|
*/
|
||||||
public List<String> getSSTablesForKey(String key);
|
public List<String> getSSTablesForKey(String key);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a list of filenames that contain the given key on this node
|
||||||
|
* @param key
|
||||||
|
* @param hexFormat if key is in hex string format
|
||||||
|
* @return list of filenames containing the key
|
||||||
|
*/
|
||||||
|
public List<String> getSSTablesForKey(String key, boolean hexFormat);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Scan through Keyspace/ColumnFamily's data directory determine which
|
* Scan through Keyspace/ColumnFamily's data directory determine which
|
||||||
* SSTables should be loaded and load them
|
* SSTables should be loaded and load them
|
||||||
|
Loading…
Reference in New Issue
Block a user