Add data-format-aware stats APIs (Plugin.nodeStats + dataformat_stats endpoint)#21860
Add data-format-aware stats APIs (Plugin.nodeStats + dataformat_stats endpoint)#21860ask-kamal-nayan wants to merge 3 commits into
Conversation
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit 8effa56.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
f82afe3 to
37d72ac
Compare
PR Reviewer Guide 🔍(Review updated until commit afd9e13)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to afd9e13 Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit fbfcd89
Suggestions up to commit 37d72ac
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #21860 +/- ##
============================================
+ Coverage 73.36% 73.42% +0.05%
- Complexity 75430 75527 +97
============================================
Files 6034 6034
Lines 342604 342604
Branches 49279 49279
============================================
+ Hits 251357 251552 +195
+ Misses 71220 71083 -137
+ Partials 20027 19969 -58 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3c76162 to
fbfcd89
Compare
|
Persistent review updated to latest commit fbfcd89 |
Signed-off-by: Kamal Nayan <askkamal@amazon.com>
fbfcd89 to
35c5a18
Compare
Signed-off-by: Kamal Nayan <askkamal@amazon.com>
|
Persistent review updated to latest commit afd9e13 |
| public ParquetShardStats( | ||
| long docsIndexedTotal, | ||
| long indexTimeMillis, | ||
| long vsrRotationsTotal, | ||
| long nativeWriteTotal, | ||
| long nativeWriteTimeMillis, | ||
| long nativeWriteFailures, | ||
| long nativeFinalizeTotal, | ||
| long nativeFinalizeTimeMillis, | ||
| long nativeFinalizeFailures, | ||
| long nativeSyncTotal, | ||
| long nativeSyncTimeMillis, | ||
| long nativeSyncFailures, | ||
| long mergeTotal, | ||
| long mergeTimeMillis, | ||
| long mergeFailures, | ||
| long mergeInputFilesTotal, | ||
| long mergeOutputRowsTotal, | ||
| long backgroundWriteTotal, | ||
| long backgroundWriteWaitMillis, | ||
| long backgroundWriteTimeouts, | ||
| long backgroundWriteFailures | ||
| ) { | ||
| this.docsIndexedTotal = docsIndexedTotal; |
There was a problem hiding this comment.
Can we add rayon/tokio stats as well?
Signed-off-by: Kamal Nayan <askkamal@amazon.com>
Description
Summary
Adds runtime visibility into the composite data-format engine via per-format stats APIs. Each registered data format exposes its own pair of REST endpoints, discovered automatically
via a small SPI. Open for extension (new format = new provider), closed for modification (composite-engine never references concrete formats).
API mirrors OpenSearch's standard
_statsconventions — same parameter names, same JSON shape, sameIndicesOptionssemantics — so existing tooling works unchanged.API surface
GET /_plugins/{format}/{index}/_stats?level=shardsfor per-shard breakdown)GET /_plugins/{format}/_nodes/_statsGET /_plugins/{format}/_nodes/{nodeId}/_stats{format}isparquetorlucenetoday.Query params:
level=index|shards,shards=0,2,5,nodes=node1,node2or_local,ignore_unavailable,allow_no_indices,expand_wildcards. Standard?filter_pathworks onall responses.
Sample — parquet
GET /_plugins/parquet/myindex/_stats { "_shards": { "total": 1, "successful": 1, "failed": 0 }, "format": "parquet", "indices": { "myindex": { "indexing": { "docs_indexed_total": 12345, "index_time_millis": 234 }, "vsr": { "vsr_rotations_total": 4 }, "native_write": { "native_write_total": 4, "native_finalize_total": 4, "native_write_failures": 0 }, "merge": { "merge_total": 1, "merge_input_files_total": 4, "merge_output_rows_total": 12345, "merge_failures": 0 } } } }Sample — lucene
Shard-level (?level=shards) wraps per-shard routing in a routing sub-object (state, primary, node, relocating_node) matching the standard _stats shape.
Architecture
class so aggregation is type-safe end-to-end.
single source of truth.
GET /_plugins/orc/{index}/_stats and GET /_plugins/orc/_nodes/_stats work automatically — no edits to composite-engine.
Related Issues
Resolves #[Issue number to be closed when this PR is merged]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.