-
Notifications
You must be signed in to change notification settings - Fork 0
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
Basic monitor solution #1
base: reviewed-monitor
Are you sure you want to change the base?
Conversation
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.
A few comments to start with
solr/core/src/java/org/apache/solr/update/processor/MonitorUpdateProcessor.java
Outdated
Show resolved
Hide resolved
solr/core/src/java/org/apache/solr/update/processor/MonitorUpdateProcessorFactory.java
Outdated
Show resolved
Hide resolved
solr/core/src/test/org/apache/solr/cloud/QueryRegisterTest.java
Outdated
Show resolved
Hide resolved
solr/core/src/java/org/apache/solr/handler/QueryRegisterHandler.java
Outdated
Show resolved
Hide resolved
*/ | ||
synchronized private void registerQueryToZk(SolrZkClient client, String queryId, Query query, String paramString) throws KeeperException, InterruptedException, JoseException { | ||
String path = MonitorUpdateProcessorFactory.zkQueryPath; | ||
if (!client.exists(path, true)) { |
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.
Doing this on initializaton of the handler/update request processor factory will probably suffice and lower the number of zk calls you need to make.
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.
Moving these code to handler.init() caused some exceptions and it failed to create cores. So I added a flag variable here to avoid unnecessary zk calls.
Implemented basic functionalities.
Fixed major issues.