Skip to content
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

Combine node name and task id into single string task id #16744

Merged
merged 1 commit into from
Feb 24, 2016

Conversation

imotov
Copy link
Contributor

@imotov imotov commented Feb 21, 2016

This commit changes the URL for task operations from /_tasks/{nodeId}/{taskId} to /_tasks/{taskId}, where {taskId} has a form of nodeid:id

@imotov imotov added >feature review v5.0.0-alpha1 :Distributed/Task Management Issues for anything around the Tasks API - both persistent and node level. labels Feb 21, 2016
@dakrone
Copy link
Member

dakrone commented Feb 21, 2016

@imotov so what seems weird about this to me is the way it reads: request.taskId().getId(), do you think the taskId() method should be renamed? It feels like overloading the term "id" in this case

@imotov
Copy link
Contributor Author

imotov commented Feb 21, 2016

@dakrone I agree, do you have a suggestion for the name?

if (Strings.hasLength(taskId)) {
String[] s = Strings.split(taskId, ":");
if (s == null || s.length != 2) {
throw new IllegalArgumentException("malformed task id" + taskId);
Copy link
Member

Choose a reason for hiding this comment

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

Missing a space here after id

@dakrone
Copy link
Member

dakrone commented Feb 22, 2016

Left some comments that are mostly minor :)

@imotov
Copy link
Contributor Author

imotov commented Feb 22, 2016

@dakrone pushed the changes to address your comments.

@dakrone
Copy link
Member

dakrone commented Feb 22, 2016

LGTM

This commit changes the URL for task operations from `/_tasks/{nodeId}/{taskId}` to `/_tasks/{taskId}`, where `{taskId}` has a form of nodeid:id
@imotov imotov merged commit d6af669 into elastic:master Feb 24, 2016
@imotov imotov mentioned this pull request Feb 29, 2016
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed/Task Management Issues for anything around the Tasks API - both persistent and node level. >enhancement v5.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants