diff --git a/core/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java b/core/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java index 4169e0f4c1d..352588cca71 100644 --- a/core/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java +++ b/core/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java @@ -250,6 +250,15 @@ public class RestIndicesAction extends AbstractCatAction { table.addCell("search.query_total", "sibling:pri;alias:sqto,searchQueryTotal;default:false;text-align:right;desc:total query phase ops"); table.addCell("pri.search.query_total", "default:false;text-align:right;desc:total query phase ops"); + table.addCell("search.scroll_current", "sibling:pri;alias:scc,searchScrollCurrent;default:false;text-align:right;desc:open scroll contexts"); + table.addCell("pri.search.scroll_current", "default:false;text-align:right;desc:open scroll contexts"); + + table.addCell("search.scroll_time", "sibling:pri;alias:scti,searchScrollTime;default:false;text-align:right;desc:time scroll contexts held open"); + table.addCell("pri.search.scroll_time", "default:false;text-align:right;desc:time scroll contexts held open"); + + table.addCell("search.scroll_total", "sibling:pri;alias:scto,searchScrollTotal;default:false;text-align:right;desc:completed scroll contexts"); + table.addCell("pri.search.scroll_total", "default:false;text-align:right;desc:completed scroll contexts"); + table.addCell("segments.count", "sibling:pri;alias:sc,segmentsCount;default:false;text-align:right;desc:number of segments"); table.addCell("pri.segments.count", "default:false;text-align:right;desc:number of segments"); @@ -449,6 +458,15 @@ public class RestIndicesAction extends AbstractCatAction { table.addCell(indexStats == null ? null : indexStats.getTotal().getSearch().getTotal().getQueryCount()); table.addCell(indexStats == null ? null : indexStats.getPrimaries().getSearch().getTotal().getQueryCount()); + table.addCell(indexStats == null ? null : indexStats.getTotal().getSearch().getTotal().getScrollCurrent()); + table.addCell(indexStats == null ? null : indexStats.getPrimaries().getSearch().getTotal().getScrollCurrent()); + + table.addCell(indexStats == null ? null : indexStats.getTotal().getSearch().getTotal().getScrollTime()); + table.addCell(indexStats == null ? null : indexStats.getPrimaries().getSearch().getTotal().getScrollTime()); + + table.addCell(indexStats == null ? null : indexStats.getTotal().getSearch().getTotal().getScrollCount()); + table.addCell(indexStats == null ? null : indexStats.getPrimaries().getSearch().getTotal().getScrollCount()); + table.addCell(indexStats == null ? null : indexStats.getTotal().getSegments().getCount()); table.addCell(indexStats == null ? null : indexStats.getPrimaries().getSegments().getCount()); diff --git a/core/src/main/java/org/elasticsearch/rest/action/cat/RestNodesAction.java b/core/src/main/java/org/elasticsearch/rest/action/cat/RestNodesAction.java index c2b63cea49f..91e0235f54b 100644 --- a/core/src/main/java/org/elasticsearch/rest/action/cat/RestNodesAction.java +++ b/core/src/main/java/org/elasticsearch/rest/action/cat/RestNodesAction.java @@ -190,6 +190,9 @@ public class RestNodesAction extends AbstractCatAction { table.addCell("search.query_current", "alias:sqc,searchQueryCurrent;default:false;text-align:right;desc:current query phase ops"); table.addCell("search.query_time", "alias:sqti,searchQueryTime;default:false;text-align:right;desc:time spent in query phase"); table.addCell("search.query_total", "alias:sqto,searchQueryTotal;default:false;text-align:right;desc:total query phase ops"); + table.addCell("search.scroll_current", "alias:scc,searchScrollCurrent;default:false;text-align:right;desc:open scroll contexts"); + table.addCell("search.scroll_time", "alias:scti,searchScrollTime;default:false;text-align:right;desc:time scroll contexts held open"); + table.addCell("search.scroll_total", "alias:scto,searchScrollTotal;default:false;text-align:right;desc:completed scroll contexts"); table.addCell("segments.count", "alias:sc,segmentsCount;default:false;text-align:right;desc:number of segments"); table.addCell("segments.memory", "alias:sm,segmentsMemory;default:false;text-align:right;desc:memory used by segments"); @@ -322,6 +325,9 @@ public class RestNodesAction extends AbstractCatAction { table.addCell(searchStats == null ? null : searchStats.getTotal().getQueryCurrent()); table.addCell(searchStats == null ? null : searchStats.getTotal().getQueryTime()); table.addCell(searchStats == null ? null : searchStats.getTotal().getQueryCount()); + table.addCell(searchStats == null ? null : searchStats.getTotal().getScrollCurrent()); + table.addCell(searchStats == null ? null : searchStats.getTotal().getScrollTime()); + table.addCell(searchStats == null ? null : searchStats.getTotal().getScrollCount()); SegmentsStats segmentsStats = indicesStats == null ? null : indicesStats.getSegments(); table.addCell(segmentsStats == null ? null : segmentsStats.getCount()); diff --git a/core/src/main/java/org/elasticsearch/rest/action/cat/RestShardsAction.java b/core/src/main/java/org/elasticsearch/rest/action/cat/RestShardsAction.java index 802607829ff..76698efcaa6 100644 --- a/core/src/main/java/org/elasticsearch/rest/action/cat/RestShardsAction.java +++ b/core/src/main/java/org/elasticsearch/rest/action/cat/RestShardsAction.java @@ -146,6 +146,9 @@ public class RestShardsAction extends AbstractCatAction { table.addCell("search.query_current", "alias:sqc,searchQueryCurrent;default:false;text-align:right;desc:current query phase ops"); table.addCell("search.query_time", "alias:sqti,searchQueryTime;default:false;text-align:right;desc:time spent in query phase"); table.addCell("search.query_total", "alias:sqto,searchQueryTotal;default:false;text-align:right;desc:total query phase ops"); + table.addCell("search.scroll_current", "alias:scc,searchScrollCurrent;default:false;text-align:right;desc:open scroll contexts"); + table.addCell("search.scroll_time", "alias:scti,searchScrollTime;default:false;text-align:right;desc:time scroll contexts held open"); + table.addCell("search.scroll_total", "alias:scto,searchScrollTotal;default:false;text-align:right;desc:completed scroll contexts"); table.addCell("segments.count", "alias:sc,segmentsCount;default:false;text-align:right;desc:number of segments"); table.addCell("segments.memory", "alias:sm,segmentsMemory;default:false;text-align:right;desc:memory used by segments"); @@ -277,6 +280,9 @@ public class RestShardsAction extends AbstractCatAction { table.addCell(shardStats == null ? null : shardStats.getSearch().getTotal().getQueryCurrent()); table.addCell(shardStats == null ? null : shardStats.getSearch().getTotal().getQueryTime()); table.addCell(shardStats == null ? null : shardStats.getSearch().getTotal().getQueryCount()); + table.addCell(shardStats == null ? null : shardStats.getSearch().getTotal().getScrollCurrent()); + table.addCell(shardStats == null ? null : shardStats.getSearch().getTotal().getScrollTime()); + table.addCell(shardStats == null ? null : shardStats.getSearch().getTotal().getScrollCount()); table.addCell(shardStats == null ? null : shardStats.getSegments().getCount()); table.addCell(shardStats == null ? null : shardStats.getSegments().getMemory()); diff --git a/docs/reference/cat/nodes.asciidoc b/docs/reference/cat/nodes.asciidoc index eb7bb7c3386..0eccba76827 100644 --- a/docs/reference/cat/nodes.asciidoc +++ b/docs/reference/cat/nodes.asciidoc @@ -182,6 +182,9 @@ phase operations |0 phase |43ms |`search.query_total` |`sqto`, `searchFetchTotal` |No |Number of query operations |9 +|`search.scroll_current` |`scc`, `searchScrollCurrent` |No |Open scroll contexts |2 +|`search.scroll_time` |`scti`, `searchScrollTime` |No |Time scroll contexts held open|2m +|`search.scroll_total` |`scto`, `searchScrollTotal` |No |Completed scroll contexts |1 |`segments.count` |`sc`, `segmentsCount` |No |Number of segments |4 |`segments.memory` |`sm`, `segmentsMemory` |No |Memory used by segments |1.4kb diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/cat.shards/10_basic.yaml b/rest-api-spec/src/main/resources/rest-api-spec/test/cat.shards/10_basic.yaml index 0efb307e133..2838dcb1a55 100755 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/cat.shards/10_basic.yaml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/cat.shards/10_basic.yaml @@ -60,6 +60,9 @@ search.query_current .+ \n search.query_time .+ \n search.query_total .+ \n + search.scroll_current .+ \n + search.scroll_time .+ \n + search.scroll_total .+ \n segments.count .+ \n segments.memory .+ \n segments.index_writer_memory .+ \n