From 8fc761ce496b8627502155dd7198f6af7d282df8 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Thu, 28 Mar 2019 13:57:51 +0200 Subject: [PATCH] MXS-2363 Add maxctrl show qc_cache --- maxctrl/lib/show.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/maxctrl/lib/show.js b/maxctrl/lib/show.js index a9583e139..45598d849 100644 --- a/maxctrl/lib/show.js +++ b/maxctrl/lib/show.js @@ -279,6 +279,18 @@ exports.builder = function(yargs) { ]) }) }) + .command('qc_cache', 'Show query classifier cache', function(yargs) { + return yargs.epilog('Show contents (statement and hits) of query classifier cache.') + .usage('Usage: show qc_cache') + }, function(argv) { + maxctrl(argv, function(host) { + return getCollection(host, 'maxscale/query_classifier/cache', [ + {'Statement': 'id'}, + {'Hits': 'attributes.hits'}, + {'Type': 'attributes.classification.type_mask' } + ]) + }) + }) .usage('Usage: show ') .help() .command('*', 'the default command', {}, function(argv) {