-
Notifications
You must be signed in to change notification settings - Fork 16
DM-9803:Multi-object search in PDAC #341
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
Conversation
Add mutli-object search processor that uses Java Concurrent to do a parallel search DM-9920: Fixed bug in CatalogSelectViewPanel. The IRSA's catalog search does not work due to this bug Fixed bug in LSSTCatalogSelectViewPanel Eable multi-object search in LSSTCatalogSelectViewPanel.jsx DM-9964: Changed the empty result behavior in LSSTCatalogSearch so that the multi-object search is not blocked. DM-9803: Modified UI part of the codes Rename the search processor DM-9803: Fixed bugs in CatalogSelectViewPanel.jsx and LSSTCatalogSelectViewPanel.jsx Implement multi-object search DM-9803: Modified LSSTQuery so that the empty table will not stop the mutl-pjbect search. DM-9803: Add code to prevent from forever thread
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.
The code looks good. I learn something about how to use Futures looking at your code.
I would like you to investigate breaking of the code into two classes.
The part of the code that does the following could be a general utility class to take set of request that is processed concurrently and return a data group.
The method that calls that work should take the number of threads.
DataGroup[] dataGroupArray = getSearchResult(request, inDg);
DataGroup dg = dataGroupArrayToDataGroup(dataGroupArray,inDg, catalog);
I would like to easily reuse that part of the code.
|
||
DataObject[] rows = inDg.values().toArray(new DataObject[0]); | ||
|
||
int nThread = request.containsParam("nThread")? Integer.parseInt(request.getParam("nThread")) :2; |
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 don't think the number of threads should come from the request. I think is should be property the the search processes keeps
e.printStackTrace(); | ||
} catch (ExecutionException e) { | ||
e.printStackTrace(); | ||
} |
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.
Using these Future objects is pretty cool!
Testing:
|
I split the LSSTMultiObjectSearch.java two two classes and of which is taking a request and the number of thread and then does the parallel search and returns a DataObject. Please take a look and let me know if it looks OK. Thanks! |
When I said break it up into reusable parts I did not mean just do more inheritance. I don't think it is really any different than before. Don't add more inheritance. I wanted you to make utility routines out of the parts that to the concurrent searching and reassembly. You did some nice work. We want to be able to reuse those parts. |
Add mutli-object search processor that uses Java Concurrent to do a parallel search
DM-9920:
Fixed bug in CatalogSelectViewPanel. The IRSA's catalog search does not work due to this bug
Fixed bug in LSSTCatalogSelectViewPanel
Eable multi-object search in LSSTCatalogSelectViewPanel.jsx
DM-9964:
Changed the empty result behavior in LSSTCatalogSearch so that the multi-object search is not blocked.
DM-9803:
Modified UI part of the codes
Rename the search processor
DM-9803:
Fixed bugs in CatalogSelectViewPanel.jsx and LSSTCatalogSelectViewPanel.jsx
Implement multi-object search
DM-9803:
Modified LSSTQuery so that the empty table will not stop the mutl-pjbect search.
DM-9803:
Add code to prevent from forever thread
Several tickets were implemented (shown as above )in this branch. The bugs were found while implementing this ticket. Without fixing the bugs, the implementation can not be worked. So the tickets were combined.
Please note:
I could add this implementation into the LSSTCatalogSearch. I prefer to have a class for Concurrent
implementation. Please evaluate it. If there an is objection, I can merge it to the existing LSSTCatalogSearch.
It took me a lot of time to test it due to the PDAC 's issues. After several days's frustrations, finally, I made fiver test input files work. Please download the attached file and test it.
testData.tar.gz
Thanks!