Skip to content

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

Merged
merged 5 commits into from
Apr 12, 2017
Merged

Conversation

lznakano
Copy link
Contributor

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!

   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
@lznakano lznakano requested review from loitly and robyww March 28, 2017 21:59
  Fixed typo bugs which caused input columns data missing in the final result table.
Copy link
Contributor

@robyww robyww left a 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;
Copy link
Contributor

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();
}
Copy link
Contributor

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!

@robyww
Copy link
Contributor

robyww commented Apr 3, 2017

Testing:

upload.csv: success
upload1.tbl: success
upload.tbl: success

upload2.tbl: failed

\ EQUINOX = 'J2000.0'
|   ra     |   dec    |  major  |  ratio |
|   double |   double | double  |  double|
 9.500000   -1.2300000    50.0     0.5 
 9.500000   -1.2300000    60.0     0.8 

upload3.tbl: failed

\ EQUINOX = 'J2000.0'
|   ra     |   dec    |  major |  ratio | angle |
|   double |   double | double |  double| double|
 9.469000    -1.152000   100.0     0.25    0.5
 9.500000    -1.230000    50.0     0.5     0.15

  Split the LSSTMultiObjectSearch.java to two files, LSSTMultiObjectSearch.java and LSSTConcurrentSearch.java.  The LSSTConcurrentSearch.java can be re-used.
@lznakano
Copy link
Contributor Author

lznakano commented Apr 4, 2017

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!

@robyww
Copy link
Contributor

robyww commented Apr 7, 2017

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 a utility class for concurrent search
  Remove unused class and methods
@lznakano lznakano merged commit 1889e98 into dev Apr 12, 2017
@lznakano lznakano deleted the DM-9803-multiObjectSearch branch April 12, 2017 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants