Task #7691 (closed)
Have the managed repository return a unique path
Reported by: | cblackburn | Owned by: | cblackburn |
---|---|---|---|
Priority: | major | Milestone: | OMERO-4.4 |
Component: | Bin-Services | Version: | n.a. |
Keywords: | n.a. | Cc: | jamoore, cxallan, jburel |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | 0.0d |
Sprint: | 2012-01-03 (5) |
Description (last modified by cxallan)
To support templates that do not need to contain the fileId the path returned by the repository needs to be unique. See #6223 for initial work on path templates.
Using a set of example paths from #909:
/Users/chris/images/screens/BigScreen/PlateQQ001/Well001/Image_A1_field001_channel001.tif /Users/chris/images/screens/BigScreen/PlateQQ001/Well001/Image_A1_field001_channel002.tif /Users/chris/images/screens/BigScreen/PlateQQ001/Well001/Image_A1_field001_channel003.tif ... /Users/chris/images/screens/BigScreen/PlateQQ001/Well001/Image_A1_field002_channel001.tif /Users/chris/images/screens/BigScreen/PlateQQ001/Well001/Image_A1_field002_channel002.tif /Users/chris/images/screens/BigScreen/PlateQQ001/Well001/Image_A1_field002_channel003.tif ... /Users/chris/images/screens/BigScreen/PlateQQ001/Well001/Image_A2_field001_channel001.tif /Users/chris/images/screens/BigScreen/PlateQQ001/Well001/Image_A2_field001_channel002.tif /Users/chris/images/screens/BigScreen/PlateQQ001/Well001/Image_A2_field001_channel003.tif ... /Users/chris/images/screens/BigScreen/PlateQQ001/Well002/Image_A1_field001_channel001.tif /Users/chris/images/screens/BigScreen/PlateQQ001/Well002/Image_A1_field001_channel002.tif /Users/chris/images/screens/BigScreen/PlateQQ001/Well002/Image_A1_field001_channel003.tif ... /Users/chris/images/screens/BigScreen/PlateQQ002/Well001/Image_A1_field001_channel001.tif /Users/chris/images/screens/BigScreen/PlateQQ002/Well001/Image_A1_field001_channel002.tif /Users/chris/images/screens/BigScreen/PlateQQ002/Well001/Image_A1_field001_channel003.tif
- Based on getUsedFiles() resolve the longest unique path on the client:
PlateQQ001/Well001/Image_A1_field001_channel001.tif
- Grab the parent directory for the longest unique path
BigScreen/PlateQQ001/Well001/Image_A1_field001_channel001.tif
- Ask the server for a unique path for this sub path
/OMERO/Files/2011/12/19/BigScreen/ # If there IS NOT colliding path /OMERO/Files/2011/12/19/BigScreen-1/ # If there IS a colliding path
Change History (12)
comment:1 Changed 12 years ago by cxallan
- Description modified (diff)
comment:2 Changed 12 years ago by cblackburn
- Remaining Time set to 0.5
- Status changed from new to accepted
comment:3 Changed 12 years ago by cblackburn
- Owner cblackburn deleted
- Status changed from accepted to new
comment:4 Changed 12 years ago by cblackburn
- Owner set to cblackburn
comment:5 Changed 12 years ago by cblackburn
comment:6 Changed 12 years ago by cblackburn
- Remaining Time changed from 0.5 to 1
- Status changed from new to accepted
Refactor both ImportLibrary and PublicRepository to change getCurrentRepoDir() to take a path rather than a file id.
comment:7 Changed 12 years ago by cblackburn
- Remaining Time changed from 1 to 0
- Status changed from accepted to closed
comment:8 Changed 12 years ago by cxallan
- Status changed from closed to reopened
With the current HEAD of the fslite-stage2 branch (44edb2d07d948a8ce12bf3195775ce16361b827f) and an omero.data.dir of /OMERO-fs importing via the command line:
dist/bin/omero -s localhost -u root import /Users/callan/testimages/dv/very_small.d3d.dv
Gives a directory structure like this (for the full import, the original metadata artifact can be largely ignored of course):
callan@faceoff ~/code/ome.git $ find /OMERO-fs/ManagedRepository/ /OMERO-fs/ManagedRepository/ /OMERO-fs/ManagedRepository//root /OMERO-fs/ManagedRepository//root/2012 /OMERO-fs/ManagedRepository//root/2012/1 /OMERO-fs/ManagedRepository//root/2012/1/2 /OMERO-fs/ManagedRepository//root/2012/1/2/dv /OMERO-fs/ManagedRepository//root/2012/1/2/dv/Users /OMERO-fs/ManagedRepository//root/2012/1/2/dv/Users/callan /OMERO-fs/ManagedRepository//root/2012/1/2/dv/Users/callan/omero /OMERO-fs/ManagedRepository//root/2012/1/2/dv/Users/callan/omero/tmp /OMERO-fs/ManagedRepository//root/2012/1/2/dv/Users/callan/omero/tmp/omero_callan /OMERO-fs/ManagedRepository//root/2012/1/2/dv/Users/callan/omero/tmp/omero_callan/18439@faceoff.local /OMERO-fs/ManagedRepository//root/2012/1/2/dv/Users/callan/omero/tmp/omero_callan/18439@faceoff.local/ORIGINAL_METADATA_TXT2599394569064218134fba041f8-81d7-4bd1-b79d-2e2526b450de /OMERO-fs/ManagedRepository//root/2012/1/2/dv/Users/callan/testimages /OMERO-fs/ManagedRepository//root/2012/1/2/dv/Users/callan/testimages/dv /OMERO-fs/ManagedRepository//root/2012/1/2/dv/Users/callan/testimages/dv/very_small.d3d.dv
Not really right. very_small.d3d.dv should be in /OMERO-fs/ManagedRepository//root/2012/1/2/dv.
comment:9 Changed 12 years ago by cxallan
Are you okay to pick that issue up and fix Colin?
comment:10 Changed 12 years ago by cblackburn
Chris, I closed this because the paths: ../ManagedRepository//root/2012/1/2/dv/, ../ManagedRepository//root/2012/1/2/dv-1/, etc. are returned okay. The importer code then copies from the root, ie /Users/callan/testimages/dv/very_small.d3d.dv. I think this should be addressed under a separate ticket as it involves a fair number of changes in the OMEROMetadataStoreClient. I'm happy to create that new ticket and pick up.
comment:11 Changed 12 years ago by cxallan
- Resolution set to fixed
- Status changed from reopened to closed
Sounds perfect. Go for it.
comment:12 Changed 12 years ago by Chris Allan <callan@…>
(In [21dfcb23858ba6727ae60aaded6c8f43aafabc36/ome.git] on branch develop) Initial work on returning unique path name. See #7691
See: Github
I'm not sure this fully addresses the ticket as it uses the last part of the path from the OriginalFile but that's all the repository has available. If the path needs to come from information derived from getUsedFiles() then that information may need to be passed in as an argument to getCurrentRepoDir(). Comments?