[ 
https://issues.apache.org/jira/browse/OODT-433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13241453#comment-13241453
 ] 

[email protected] commented on OODT-433:
----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4553/#review6523
-----------------------------------------------------------

Ship it!


LGTM

- brian


On 2012-03-29 12:26:06, Thomas Bennett wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/4553/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-03-29 12:26:06)
bq.  
bq.  
bq.  Review request for oodt, Chris Mattmann, brian Foster, Paul Ramirez, and 
Sheryl John.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Get product references before calling retrieveProduct().
bq.  1) call setProductReferences method
bq.  2) remove d.retrieveProduct() outside the if else statement.
bq.  
bq.  Fix unit tests testRetrieveFilesById() and testRetrieveFilesByName()
bq.  1) last method call is now getProductReferences not 
getProductByName/getProductById
bq.  2) The last method call has the product passed in as the argument. The 
call has been modified to retrieve the productName/productId correctly from the 
method call.
bq.  
bq.  
bq.  This addresses bug OODT-433.
bq.      https://issues.apache.org/jira/browse/OODT-433
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    
trunk/filemgr/src/test/org/apache/oodt/cas/filemgr/cli/TestFileManagerCli.java 
1306745 
bq.    
trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/RetrieveFilesCliAction.java
 1306745 
bq.  
bq.  Diff: https://reviews.apache.org/r/4553/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  * All unit tests now pass
bq.  * filemgr deployed and tested with the filemgr client using both local and 
remote data transfer factories.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Thomas
bq.  
bq.


                
> filemgr.getProductByName returns empty product references which results in a 
> bug in --retrieveFilesByName and --retrieveFilesById
> ---------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OODT-433
>                 URL: https://issues.apache.org/jira/browse/OODT-433
>             Project: OODT
>          Issue Type: Bug
>          Components: file manager
>    Affects Versions: 0.4
>            Reporter: Thomas Bennett
>            Assignee: Thomas Bennett
>            Priority: Minor
>              Labels: patch
>             Fix For: 0.4
>
>
> --retrieveFilesByName and --retrieveFilesById have a bug.
> Sequence of events:
> Here's the command that I ran:
> filemgr-client --url http://localhost:9101 --operation --retrieveFilesByName 
> --productName 1332838758.h5 --destination /home/kat/ --transferer 
> org.apache.oodt.cas.filemgr.datatransfer.LocalDataTransferFactory
> So, the  --retrieveFilesByName calls an XML-RPC "filemgr.getProductByName" to 
> get the product details. However on the File Manager side in 
> org.apache.oodt.cas.filemgr.catalog.LuceneCatalog.java line 412 and 415:
> return getProductByName(productName, false)  /*where the call signature is 
> (defined on line 415 of the same file)*/
> getProductByName(String productName, boolean getRefs)
> getRefs is now passed (as false) as a parameter to the toCompleteProduct(..) 
> method, which seems to indicate that the product references should not be 
> returned.
> This is then received by the filemgr client in the methodResponse with the 
> references set as [] i.e. an empty list :)
> On the client side in 
> org.apache.oodt.cas.filemgr.datatransfer.LocalDataTransferer.java line 358 
> and 359 of the copyFilesToDir() method:
>       List<Reference> refs = product.getProductReferences();
>       for (Iterator<Reference> i = refs.iterator(); i.hasNext();)
> Since refs is empty the for loop loops zero times.
> Then a bit further up the call chain in 
> org.apache.oodt.cas.filemgr.cli.action.RetrieveFilesCliAction.java line 55 to 
> 60:
>          if (product != null) {
>             dt.retrieveProduct(product, destination);
>          } else {
>             throw new Exception("Product was not found");
>          }
>          dt.retrieveProduct(product, destination);
> It appears that dt.retrieveProduct is called a second time outside the if / 
> else statement.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to