-
Notifications
You must be signed in to change notification settings - Fork 100
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
Inplace Import via SymlinkFileTransfer (See #11573) #1989
Commits on Jan 17, 2014
-
Configuration menu - View commit details
-
Copy full SHA for ce57b30 - Browse repository at this point
Copy the full SHA ce57b30View commit details -
Refactor uploadFile to FileTransfer
The uploadFile method has a number of responsibilities that were not easily modifiable. Rather than insert further `if (symlink) {} then {}` complications, its been extracted behind the new `FileTransfer` interface to permit others to inject their own logic.
Configuration menu - View commit details
-
Copy full SHA for fa5c29c - Browse repository at this point
Copy the full SHA fa5c29cView commit details -
Configuration menu - View commit details
-
Copy full SHA for b2265d1 - Browse repository at this point
Copy the full SHA b2265d1View commit details -
The number of parameters passed to the `transfer` method was daunting at best. Further, much of the uploadFile method was doing logging so that moving the execution into the state class, the FileTransfer implementors can be ignorant of most of the arguments.
Configuration menu - View commit details
-
Copy full SHA for 1ac90e1 - Browse repository at this point
Copy the full SHA 1ac90e1View commit details -
Refactor out AbstractFileTransfer for SymlinkFileTransfer
The rest of the reusable logic from uploadFile has now been moved to AbstractFileTransfar and re-used by the new SymlinkFileTransfer class. Several remote-access methods were needed in the ImportLibrary itself, though these could perhaps live in a more general gateway-style utility.
Configuration menu - View commit details
-
Copy full SHA for 01a3ad7 - Browse repository at this point
Copy the full SHA 01a3ad7View commit details -
Implement command-line passing
The following options are now all available for choosing which transfer method to use: ``` bin/omero import -t upload bin/omero import --transfer upload bin/omero import -t symlink bin/omero import -- -t symlink bin/omero import -t your.class.name.Here ```
Configuration menu - View commit details
-
Copy full SHA for 569208d - Browse repository at this point
Copy the full SHA 569208dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 618faea - Browse repository at this point
Copy the full SHA 618faeaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 52180d5 - Browse repository at this point
Copy the full SHA 52180d5View commit details
Commits on Jan 21, 2014
-
Configuration menu - View commit details
-
Copy full SHA for 9725a55 - Browse repository at this point
Copy the full SHA 9725a55View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7c0463f - Browse repository at this point
Copy the full SHA 7c0463fView commit details
Commits on Jan 22, 2014
-
Introduce afterSuccess in the FileTransfer interface
A simple `mv` command is not possible since 1) the file must be present for subsequent readds and 2) it's not safe to remove the file until the import has completed successfully. Now, users of the `FileTransfer` API have the responsibility of calling `afterSuccess` once the `ImportLibrary` has done its work. An exception may be thrown if cleanup is not possible.
Configuration menu - View commit details
-
Copy full SHA for 4e2d88a - Browse repository at this point
Copy the full SHA 4e2d88aView commit details -
Configuration menu - View commit details
-
Copy full SHA for f3812a9 - Browse repository at this point
Copy the full SHA f3812a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for eab929b - Browse repository at this point
Copy the full SHA eab929bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8fcee93 - Browse repository at this point
Copy the full SHA 8fcee93View commit details -
Hide Advanced arguments behind --transfer-help
``` $ bin/omero import -- --transfer-help ... Advanced arguments: --transfer=ARG File transfer method Examples: -t upload # Default -t ln # Use hard-link. Locally only! -t ln_rm # Caution! Hard-link followed by rm. Locally only! -t ln_s # Use symlnk. Locally only! -t some.class.Name # Use a class on the CLASSPATH ex. importer-cli --tranasfer=ln_s foo.tiff Report bugs to <ome-users@lists.openmicroscopy.org.uk> ```
Configuration menu - View commit details
-
Copy full SHA for 4aa9f8a - Browse repository at this point
Copy the full SHA 4aa9f8aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 257d38e - Browse repository at this point
Copy the full SHA 257d38eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a8c58c - Browse repository at this point
Copy the full SHA 2a8c58cView commit details
Commits on Jan 23, 2014
-
Add CommentAnnotation(ns=
.../fileTransfer
) with class of FTWith this change, an annotation is added to the `Fileset` object on import describing which `FileTransfer` implementation was used. Use of the default `UploadFileTransfer` is ignored; otherwise, the FQN is stored as the content of the annotation. If we decided to move to subclasses of `Fileset` these values should suffice. Representative output after an import includes: ``` ome2=> \x ome2=> select discriminator, id, ns, textValue from annotation order by id desc limit 2; -[ RECORD 1 ]-+--------------------------------------------------- discriminator | /type/OriginalFile/ id | 3102 ns | openmicroscopy.org/omero/import/logFile textvalue | -[ RECORD 2 ]-+--------------------------------------------------- discriminator | /basic/text/comment/ id | 3101 ns | openmicroscopy.org/omero/import/fileTransfer textvalue | ome.formats.importer.transfers.SymlinkFileTransfer ```
Configuration menu - View commit details
-
Copy full SHA for c1d285a - Browse repository at this point
Copy the full SHA c1d285aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f3706f - Browse repository at this point
Copy the full SHA 9f3706fView commit details