Skip to content

Conversation

@jasontedor
Copy link
Member

@jasontedor jasontedor commented Aug 3, 2019

This commit builds on the ability for plugins to introduce new roles to add a formal node ML role.

Relates #43175
Closes #29943

This commit builds on the ability for plugins to introduce new roles to
add a formal node ML role.
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core

public static final Setting<Boolean> ML_ENABLED =
Setting.boolSetting("node.ml", XPackSettings.MACHINE_LEARNING_ENABLED, Property.NodeScope);

static DiscoveryNodeRole ML_ROLE = new DiscoveryNodeRole("ml", "l") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"final"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed c7122e5.

protected Setting<Boolean> roleSetting() {
return ML_ENABLED;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Excessive blank line

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have very little in the way of style agreements, mostly what is enforced by checkstyle and a few loosely-enforced guidelines. We've discussed over the years adding an auto-formatter to avoid style issues once and for all, but we've not had the time to invest in it. Until then, we've mostly left style up to individual developers, although for particularly contentious issues we can have discussions amongst the teams that work in this codebase to see if we want to formalize a rule. Regarding this specific one, our codebase is inconsistently full of white space or not between the opening brace of a class and its body, and the closing brace of a class and its body. My preference is to have this whitespace.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation. +1 for the idea of automated formatting some day...

// TESTRESPONSE[s/3.07/(\\d+\\.\\d+( \\d+\\.\\d+ (\\d+\\.\\d+)?)?)?/]
// TESTRESPONSE[s/65 99 42/\\d+ \\d+ \\d+/]
// TESTRESPONSE[s/[*]/[*]/ s/mJw06l1/.+/ non_json]
// TESTRESPONSE[s/dim/.+/ s/[*]/[*]/ s/mJw06l1/.+/ non_json]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 101 of this file has the old mdi ordering.

Also, is it worth adding l to the docs on line 101 or is it deliberate to leave roles added by modules out of the table?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's leave tweaking that to a possible follow-up, as it would include adding voting-only nodes too.

Copy link
Contributor

@przemekwitek przemekwitek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

protected Setting<Boolean> roleSetting() {
return ML_ENABLED;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation. +1 for the idea of automated formatting some day...

Copy link

@droberts195 droberts195 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jasontedor
Copy link
Member Author

@elasticmachine run elasticsearch-ci/2

@jasontedor jasontedor merged commit 5fee557 into elastic:master Aug 6, 2019
jasontedor added a commit that referenced this pull request Aug 6, 2019
This commit builds on the ability for plugins to introduce new roles to
add a formal node ML role.
@jasontedor jasontedor deleted the node-ml-role branch August 6, 2019 17:00
@jasontedor
Copy link
Member Author

@droberts195 I missed the discussion on #29943 until I saw that when I merged this issue, it closed that one. About the abbreviation, I want to double check that you're okay with l (you know, for learning). I saw a for analytics proposed there too.

@droberts195
Copy link

I want to double check that you're okay with l

I think whether it's a or l people will not initially know what it means, so it doesn't really matter. If I Google "what does a stand for in elasticsearch cat nodes" or "what does l stand for in elasticsearch cat nodes" the top hit in both cases is https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-nodes.html. So I think the most important thing is that that page has the answer.

@davidkyle
Copy link
Member

The important thing here is the anagrams. With l we have a mild node but using a opens possibility of having a mad node which I personally would like to see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ML] indicate ML node type in _cat/nodes

6 participants