Commit Graph

12 Commits

Author SHA1 Message Date
Amnon Heiman
8073af6e06 CompactionManager: add the compaction id when available
This patch adds the compaction id in getCompactions if it returns by the
API, if it's not the current behaviour will be used and it will return none.

After this patch a call to nodetool compactionstats -H

Will return:

id                                   compaction type keyspace  table     completed total unit progress
c942bd30-7a62-11eb-84bc-576502584f9a COMPACTION      keyspace1 standard1 1062      8576  keys 12.38%
c9429620-7a62-11eb-8afb-576402584f9a COMPACTION      keyspace1 standard1 972       8448  keys 11.51%
Active compaction remaining time :   0h00m00s

Fixes scylladb/scylla#7927

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
2021-03-01 10:04:08 +02:00
Calle Wilund
6f916b9d8e scylla-jmx: Add dummy "compactionId" to compation info
To keep nodetool happy. Should maybe add actual Ids to compations.
Message-Id: <1482335118-9595-2-git-send-email-calle@scylladb.com>
2016-12-22 14:17:38 +02:00
elcallio
e49b4ef322 Rework CompactionManager 2016-10-24 11:43:51 +00:00
Calle Wilund
3efcd5103b CompactionManager: update to c3 compat 2016-10-24 11:43:51 +00:00
Pekka Enberg
eec251805a CompactionManager: Fix compaction manager API URLs
The URLs had "compaction_manager" twice in them...
2016-01-21 09:22:51 +02:00
Pekka Enberg
d0757c4505 CompactionManager: Fix JSON conversion in getCompactions()
This makes 'nodetool compactionstats' work:

  [penberg@nero cassandra]$ ./bin/nodetool compactionstats
  pending tasks: 0
     compaction type    keyspace       table   completed    total   unit   progress
          compaction   keyspace1   standard1      170719   500096   keys     34.14%
          compaction   keyspace1   standard1      174781   441600   keys     39.58%
  Active compaction remaining time :   0h00m00s

Fixes scylladb/scylla#745.
2016-01-05 15:15:49 +02:00
Amnon Heiman
2eb9f19236 Clean the jmxproxy output
This patch clean the redundant output the jmx proxy creates.
It set the trace level of the called method to finest and remove some
println leftovers.

Fixes #22

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
2015-12-30 09:27:33 +02:00
Pekka Enberg
0f044e2f47 Rename "com.cloudius.urchin" package to "com.scylladb.jmx"
Move the Scylla JMX code under "com.scylladb.jmx" package.

Signed-off-by: Pekka Enberg <penberg@scylladb.com>
2015-12-17 09:28:17 +02:00
Amnon Heiman
107664dbf1 CompactionManager: Switch to the update compaction history API
This changes the CompactionManager getCompactionHistory to use the new
get_compaction_history API.

It uses the CompactionHistoryTabularData to parse and report the
results.

After this patch nodetool compactionhistory would work.

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
2015-12-16 14:52:21 +02:00
Amnon Heiman
649922fed8 Updating the http client and support API exception
The API returns errors with an HTTP code 400, 404 or 500 depending on
the cause with a json object that contains the failure reason.  The
error message should be populate to the JMX calling client, translated
to the appropriate exception.

This patch adds the ability to detect API failure and throw a runtime
exception with the returned message.

It is up to the calling method what to do with the exception, if it
would do nothing, the calling client would get a RuntimeException,
depends on origin MBean definition, the caller can catch the exception
and throw a specific kind.

Note that any exception that is thrown must be known to the JMX client
or it will not be able to process it.

As a first step, this patch replaces the jersey client to the newer
version under glassfish, which has an easy way of getting a Reply
object, and check its status before returning the results.

The only difference in the method that uses the APIClient is the use of
MultivaluedHashMap.

The following MBean implementation where changed

ColumnFamily
CompactionManager
Gossiper
EndpointSnitchInfo
CacheService
StorageProxy
StorageService

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
2015-10-28 11:25:37 +02:00
Amnon Heiman
81b26d2b53 Adding the CompactionMetrics
The CompactionMetrics is used to report statistics about compaction. It
is based on calling the API that defined in compaction_manager.json

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-02 10:08:00 +03:00
Amnon Heiman
84168d40fb Adding the CompactionManagerMBean
This adds the CompactionManagerMBean and its implementation
CompactionManager.

The implementation is based on the API, that is define in
compaction_manager.json

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-02 09:21:30 +03:00