mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[ML] Stop reading the ml.max_open_jobs node attribute (#115524)
The ml.max_open_jobs node attribute is going away in version 8, as the maximum number of open jobs has been defined by a dynamic cluster-wide setting during the 7 series and there is no chance of version 8 needing to run in a mixed version cluster with version 6. The ml.machine_memory attribute will still be available, so this can be checked instead as a way of detecting ML nodes.
This commit is contained in:
parent
6a1af300f5
commit
9dcf5bf1b7
1 changed files with 2 additions and 2 deletions
|
@ -17,8 +17,8 @@ export async function getMlNodeCount(client: IScopedClusterClient): Promise<MlNo
|
|||
if (typeof body.nodes === 'object') {
|
||||
Object.keys(body.nodes).forEach((k) => {
|
||||
if (body.nodes[k].attributes !== undefined) {
|
||||
const maxOpenJobs = +body.nodes[k].attributes['ml.max_open_jobs'];
|
||||
if (maxOpenJobs !== null && maxOpenJobs > 0) {
|
||||
const machineMemory = +body.nodes[k].attributes['ml.machine_memory'];
|
||||
if (machineMemory !== null && machineMemory > 0) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue