Uploaded image for project: 'OODT'
  1. OODT
  2. OODT-487

MetadataBasedProductMover to handle when the source and destinations match

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.4
    • Fix Version/s: 0.5
    • Component/s: file manager
    • Labels:
      None
    • Environment:

      OS X 10.6.8, CentOS 5

      Description

      I was trying to move an entire ProductType using the MetadataBasedProductMover class. Everything as going swell until it reached a product that was missing from the archive.

      When I restarted the move MetadataBasedProductMover started complaining about the source and destination for the move are the same, and it would halt with the following errors:

      INFO: Moving product: [blah.txt] from: [/Users/cgoodale/files/moved/null] to: [/Users/cgoodale/files/moved/null]
      Exception in thread "main" org.apache.oodt.cas.filemgr.structs.exceptions.DataTransferException: java.lang.Exception: org.apache.oodt.cas.filemgr.structs.exceptions.DataTransferException: cannot move product: [blah.txt] to same location: file:/Users/cgoodale/files/moved/null
      at org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient.moveProduct(XmlRpcFileManagerClient.java:305)
      at org.apache.oodt.cas.filemgr.tools.MetadataBasedProductMover.moveProducts(MetadataBasedProductMover.java:113)
      at org.apache.oodt.cas.filemgr.tools.MetadataBasedProductMover.moveProducts(MetadataBasedProductMover.java:142)
      at org.apache.oodt.cas.filemgr.tools.MetadataBasedProductMover.main(MetadataBasedProductMover.java:172)

      I have written up a small patch to MetadataBasedProductMover that does a check before attempting to perform the move. Thanks to Michael Joyce for his help on this.

        Attachments

          Activity

            People

            • Assignee:
              cgoodale Cameron Goodale
              Reporter:
              cgoodale Cameron Goodale
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: