[ML] Refactor ProcessCtrl into Autodetect and Normalizer builders#32720
Conversation
This moves the helper functionality for creating the autodetect and mormalizer processes into corresponding builders.
|
Pinging @elastic/ml-core |
droberts195
left a comment
There was a problem hiding this comment.
LGTM
I just left a couple of nits about Prelert vintage log messages that could be reformatted.
| command.add(timeFieldArg); | ||
|
|
||
| int intervalStagger = calculateStaggeringInterval(job.getId()); | ||
| logger.debug("Periodic operations staggered by " + intervalStagger +" seconds for job '" + job.getId() + "'"); |
There was a problem hiding this comment.
I know you've only moved this message between files but it might be worth making the format more consistent with others, i.e. [job_id] message.
| // Supply a URL for persisting/restoring model state unless model | ||
| // persistence has been explicitly disabled. | ||
| if (DONT_PERSIST_MODEL_STATE_SETTING.get(settings)) { | ||
| logger.info("Will not persist model state - " + DONT_PERSIST_MODEL_STATE_SETTING + " setting was set"); |
There was a problem hiding this comment.
Similar to above, [job_id] message.
| import java.nio.file.Path; | ||
| import java.util.List; | ||
|
|
||
| public class ProcessBuilderUtils { |
There was a problem hiding this comment.
final with a private constructor
| static final String AUTODETECT_PATH = "./" + AUTODETECT; | ||
|
|
||
| /* | ||
| * Arguments used by both autodetect and normalize |
There was a problem hiding this comment.
Consider moving the common options to ProcessBuilderUtils
There was a problem hiding this comment.
I thought about that. I ended up favouring keeping them at AutodetectBuilder because I think the normalizer is an add-on process that is designed to run on top of autodetect. So it is reusing some of its parameters. However, new processes will be completely unrelated. So, ProcessBuilderUtils should have things that could be common for all process builders. Does it make sense?
…2720) This moves the helper functionality for creating the autodetect and mormalizer processes into corresponding builders.
…listeners * elastic/master: (58 commits) [ML] Partition-wise maximum scores (elastic#32748) [DOCS] XContentBuilder#bytes method removed, using BytesReference.bytes(docBuilder) (elastic#32771) HLRC: migration get assistance API (elastic#32744) Add a task to run forbiddenapis using cli (elastic#32076) [Kerberos] Add debug log statement for exceptions (elastic#32663) Make x-pack core pull transport-nio (elastic#32757) Painless: Clean Up Whitelist Names (elastic#32791) Cat apis: Fix index creation time to use strict date format (elastic#32510) Clear Job#finished_time when it is opened (elastic#32605) (elastic#32755) Test: Only sniff host metadata for node_selectors (elastic#32750) Update scripted metric docs to use `state` variable (elastic#32695) Painless: Clean up PainlessCast (elastic#32754) [TEST] Certificate NONE not allowed in FIPS JVM (elastic#32753) [ML] Refactor ProcessCtrl into Autodetect and Normalizer builders (elastic#32720) Access build tools resources (elastic#32201) Tests: Disable rolling upgrade tests with system key on fips JVM (elastic#32775) HLRC: Ban LoggingDeprecationHandler (elastic#32756) Fix test reproducability in AbstractBuilderTestCase setup (elastic#32403) Only require java<version>_home env var if needed Tests: Muted ScriptDocValuesDatesTests.testJodaTimeBwc ...
This moves the helper functionality for creating the autodetect
and mormalizer processes into corresponding builders.