-
Notifications
You must be signed in to change notification settings - Fork 25.3k
copy LifecyclePolicy to protocol.xpack #32915
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a6bb033
a2f675f
7d76855
880e3f9
8c764b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,9 +51,9 @@ public static Phase parse(XContentParser parser, String name) { | |
return PARSER.apply(parser, name); | ||
} | ||
|
||
private String name; | ||
private Map<String, LifecycleAction> actions; | ||
private TimeValue after; | ||
private final String name; | ||
private final Map<String, LifecycleAction> actions; | ||
private final TimeValue after; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good catch. |
||
|
||
/** | ||
* @param name | ||
|
@@ -133,12 +133,12 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws | |
builder.endObject(); | ||
return builder; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(name, after, actions); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (obj == null) { | ||
|
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -19,7 +19,12 @@ | |||||||||
package org.elasticsearch.protocol.xpack.indexlifecycle; | ||||||||||
|
||||||||||
/** | ||||||||||
* Marker interface for index lifecycle management actions | ||||||||||
* interface for index lifecycle management actions | ||||||||||
*/ | ||||||||||
public class LifecycleAction { | ||||||||||
public interface LifecycleAction { | ||||||||||
|
||||||||||
/** | ||||||||||
* @return the name of this action | ||||||||||
*/ | ||||||||||
String getName(); | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: could we call this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do you think that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fair enough There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that being said, I agree that it is unfortunate there is no strong consistency here. For posterity, I'll link to the equivalent info from the Ingest world which uses elasticsearch/modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/GrokProcessor.java Lines 86 to 89 in cf74898
|
||||||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that I previously said these were no longer needed to be registered here but I'm actually wondering now if the actions and LifecycleType need to be registered here for the transport client? I think because the Action class will still reference these and the transport client uses the action objects rather than the client objects we might need to keep them registered here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to revert this change and we can address the correct place for these in a follow-up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, on second thought... doesn't the transport client talk to ES using the wire protocol? why would it need the xcontent bits?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Lets leave this as is then