Compare commits

...

21 Commits

Author SHA1 Message Date
Hagit Segev
9002c6d517 release: prepare for 3.1.4 2020-02-24 23:53:19 +02:00
Hagit Segev
cc446862c8 release: prepare for 3.1.3 2020-01-28 14:10:14 +02:00
Yaron Kaikov
5a383709b3 release: prepare for 3.1.2 2019-11-27 10:25:00 +02:00
Yaron Kaikov
4f73c69863 release: prepare for 3.1.1 2019-10-24 21:56:07 +03:00
Yaron Kaikov
d17d5bc73d release: prepare for 3.1.0 2019-10-12 08:46:07 +03:00
yaronkaikov
e3b5c65895 release: prepare for 3.1.0.rc9 2019-10-06 10:51:52 +03:00
Hagit Segev
7a13ae97bb release: prepare for 3.1.0.rc8 2019-09-23 07:01:20 +03:00
yaronkaikov
61dbbb3254 release: prepare for3.1.0.rc7 2019-09-10 18:57:13 +03:00
Hagit Segev
b7efec5e99 release: prepare for3.1.0.rc6 2019-09-08 10:32:39 +03:00
Amnon Heiman
a8b9849480 ColumnFamilyStore: Mbean API support the hex format param (#69)
Cassandra 3.0 version of the JMX added a parameter that allows accepting
the parameter as hex.

This breaks the current implementation with a NoSuchMethodException.

This patch adds the missing implementation.

For a full support, a follow up patch in Scylla is needed, but for the
current functionality it would work.

After this patch usage example:

nodetool getsstables keyspace1 standard1 39303138374b4d343830

Fixes #78

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
(cherry picked from commit ff0723abc6)
2019-09-03 13:28:39 +03:00
yaronkaikov
3d7226bf3d release: prepare for3.1.0.rc5 2019-09-02 14:43:01 +03:00
Hagit Segev
fb3d56d033 release: prepare for 3.1.0.rc4 2019-08-22 21:12:55 +03:00
yaronkaikov
f4e5fefd3b release: prepare for 3.1.0.rc3 2019-07-25 12:16:16 +03:00
Amnon Heiman
ae74b2e865 APIMBeanServer: Support both Table and Tables as metric name
Fixes #71

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
(cherry picked from commit c7bce65919)
2019-07-24 15:09:49 +03:00
Amnon Heiman
095cbd02e5 APIClient: delete command should check for errors
delete commands do not return a value, still, it is possible that the
command will return a value different than OK.

In such a case, the error should be propagate to the caller via an
exception.

Fixes #65

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <20190618135312.2776-1-amnon@scylladb.com>
(cherry picked from commit 2fac82434b)
2019-07-24 15:06:56 +03:00
Amnon Heiman
3619024b44 ColumnFamilyStore: finishLocalSampling should respect count limit
When calling nodetool toppartitions with size limit, finishLocalSampling
should respect that and limit the number of the results.

Example:
$ nodetool toppartitions -k 2 keyspace1 standard1 20
WRITES Sampler:
  Cardinality: ~2 (256 capacity)
  Top 2 partitions:
	Partition                Count       +/-
	38333032394d4f4d5030         4         3
	4e353937383137503330         4         3

READS Sampler:
  Cardinality: ~2 (256 capacity)
  Top 2 partitions:
	Nothing recorded during sampling period...

Fixes #66

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
(cherry picked from commit 9dae28e2f0)
2019-06-27 13:09:15 +03:00
Calle Wilund
b925da76d8 APIMBeanServer: Handle nodeprobe wildcard queries in CF refresh
Fixes #63
Message-Id: <20190311082942.3310-2-calle@scylladb.com>

(cherry picked from commit 512638ed6e)
2019-06-27 13:08:26 +03:00
Calle Wilund
76b30ba915 ColumnFamilyStore: Propapgate exception cause in sampling wait
Message-Id: <20190311082942.3310-1-calle@scylladb.com>
(cherry picked from commit 5f974bc2bb)
2019-06-27 13:08:26 +03:00
Hagit Segev
d8a8651de9 release: prepare for 3.1.0.rc2 2019-06-16 20:28:47 +03:00
Hagit Segev
b12549c260 release: prepare for 3.1.0.rc1 2019-06-06 18:16:21 +03:00
Hagit Segev
ce502ed3b7 release: prepare for 3.1.0.rc0 2019-05-13 15:03:45 +03:00
5 changed files with 36 additions and 6 deletions

View File

@ -1,7 +1,7 @@
#!/bin/sh
PRODUCT=scylla
VERSION=666.development
VERSION=3.1.4
if test -f version
then

View File

@ -152,7 +152,11 @@ public class APIClient {
get(path, queryParams).delete();
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) {

View File

@ -36,6 +36,7 @@ import org.apache.cassandra.metrics.StreamingMetrics;
import com.scylladb.jmx.api.APIClient;
import com.sun.jmx.mbeanserver.JmxMBeanServer;
@SuppressWarnings("restriction")
public class APIMBeanServer implements MBeanServer {
@SuppressWarnings("unused")
private static final Logger logger = Logger.getLogger(APIMBeanServer.class.getName());
@ -284,7 +285,7 @@ public class APIMBeanServer implements MBeanServer {
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) {
if (name != null && server.isRegistered(name)) {

View File

@ -136,7 +136,7 @@ public class ColumnFamilyStore extends MetricsMBean implements ColumnFamilyStore
}
} catch (InterruptedException | ExecutionException e) {
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);
}
/**
* 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
* 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");
long size = 0;
if (counters != null) {
size = counters.size();
for (int i = 0; i < counters.size(); i++) {
size = (count > counters.size()) ? counters.size() : count;
for (int i = 0; i < size; i++) {
JsonObject counter = counters.getJsonObject(i);
result.put(new CompositeDataSupport(COUNTER_COMPOSITE_TYPE, COUNTER_NAMES,
new Object[] { counter.getString("partition"), // raw

View File

@ -141,6 +141,14 @@ public interface ColumnFamilyStoreMBean {
*/
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
* SSTables should be loaded and load them