-
Notifications
You must be signed in to change notification settings - Fork 608
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
SOLR-15164: Implement Task Management Interface #76
Conversation
This commit introduces the concept of task management in Solr. Tasks can be marked as cancellable (thus, trackable) and can then be listed (ps -all), cancelled and specific task's status be queried. This commit also implements SOLR-15165. Please refer to the JIRA for more information.
Original PR: Pushing per discussion with @anshumg on JIRA |
|
||
import java.io.IOException; | ||
import java.util.ArrayList; | ||
import java.util.Iterator; |
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.
This is an unused import which causes precommit to fail. I'm removing it in another PR but you may consider doing a separate commit?
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 fine either way -- whichever helps make it faster :)
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.
It's fixed as part of #77
This commit introduces the concept of task management in Solr. Tasks can be marked as cancellable (thus, trackable) and can then be listed (ps -all), cancelled and specific task's status be queried. This commit also implements SOLR-15165. Please refer to the JIRA for more information.
This commit introduces the concept of task management in Solr. Tasks can be marked as cancellable (thus, trackable) and can then be listed (ps -all), cancelled and specific task's status be queried. This commit also implements SOLR-15165. Please refer to the JIRA for more information.
*/ | ||
protected void processRequest(SolrQueryRequest req, ResponseBuilder rb, Map<String, String> extraParams) throws IOException { | ||
ShardHandler shardHandler = shardHandlerFactory.getShardHandler(); | ||
List<SearchComponent> components = rb.components; |
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.
@atris I'm commenting on this years later, I realize, but I question the complexity in this design in using SearchComponents. SearchComponents are designed expressly for SearchHandler; to allow many interesting features to exist together in a search pipeline of sorts for one request. Pretty excellent. Here, I see that the same design was used but only for one function -- a simple requirement. It's a heavyweight solution for a simple task. If your answer is, for distributed-processing -- that's not necessary. For example see org.apache.solr.handler.admin.AdminHandlersProxy#maybeProxyToNodes (granted I don't love it) or places in SolrCloud that use ShardHandler directly (better).
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.
Something similar happened once -- RealTimeGetHandler. It's really a handler only for RealtimeGetComponent, so I might also question that design too. But RTGH is subclassing SearchHandler, so there is no duplication of SearchHandler's complexity. If you have time, I recommend a simple change of these handlers you added to mimick RTGH.
This commit introduces the concept of task management in Solr.
Tasks can be marked as cancellable (thus, trackable) and can then be listed (ps -all), cancelled and specific task's status be
queried.
This commit also implements SOLR-15165.
Please refer to the JIRA for more information.