MetricsInfoOperator refactoring#142935
Conversation
Make constructors private. Use scratch instead of creating BytesRef each time we need to read _source.
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
|
Hi @leontyevdv, I've created a changelog YAML for you. |
Make constructors private. Use scratch instead of creating BytesRef each time we need to read _source.
docs/changelog/142935.yaml
Outdated
There was a problem hiding this comment.
Given it doesn't change functionality, should we add >non-issue
There was a problem hiding this comment.
Yes, thanks! Added a tag
|
LGTM. Please take a look at my comment, I think it is safe to tag as |
| } | ||
|
|
||
| private MetricsInfoOperator createInitialOperator() { | ||
| return (MetricsInfoOperator) new MetricsInfoOperator.Factory(SIMPLE_LOOKUP, METADATA_CHANNEL, INDEX_CHANNEL).get(driverContext()); |
There was a problem hiding this comment.
Do we need the casts, here and below?
There was a problem hiding this comment.
Yeah, polished this. It required because I used specific (MetricsInfoOperator) types in the client methods, but base class is enough actually. Thanks!
| * Creates an INITIAL-mode operator (data nodes). | ||
| */ | ||
| public MetricsInfoOperator(BlockFactory blockFactory, MetricFieldLookup fieldLookup, int metadataSourceChannel, int indexChannel) { | ||
| private MetricsInfoOperator(BlockFactory blockFactory, MetricFieldLookup fieldLookup, int metadataSourceChannel, int indexChannel) { |
There was a problem hiding this comment.
You can even keep a single constructor as private, and pass the right combination of args in each factory.
There was a problem hiding this comment.
That's even better. Polished. Thanks!
…on-sliced-reindex
* upstream/main:
Mute org.elasticsearch.reindex.management.ReindexManagementClientYamlTestSuiteIT test {yaml=reindex/30_cancel_reindex/Cancel running reindex returns response and GET confirms completed} elastic#142079
[ESQL] Fix async logging consistency and severity (elastic#142401)
more consistent allow_no_indices=false errors (elastic#142373)
Attribute ES|QL shard search load in Lucene operators (elastic#142841)
MetricsInfoOperator refactoring (elastic#142935)
Uh oh!
There was an error while loading. Please reload this page.