LIBDRUM-991. Modify EtdLoader to check sizes of files in ETD Zip file #265
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
EtdLoader.java
Modified the “EtdLoader” class (dspace/modules/additions/src/main/java/edu/umd/lib/dspace/app/EtdLoader.java) to:
Check the uncompressed size of each “ZipEntry” in the Zip file being processed, and to stop processing and print out an error message if the ZipEntry is larger than the size specified in the “drum.etdloader.maxFileSize” configuration property
Return a status code of “1” when an error occurs (i.e., either the ZipEntry is too large, or an uncaught exception occurs)
load-etd
Modified the “dspace/bin/load-etd” script to return the Java exit code as the return code for the command (0 = success, 1 = error)
load-etd-nightly
Modified the “dspace/bin/load-etd-nightly” script to “continue” (without copying the file from the “processed” directory to “incoming”) if an error occurs. This leaves the unprocessed file in the “incoming” directory for processing at a later date.
Note: The assumption here is that when an error occurs, the item has not been added to DRUM, and therefore should be left in “incoming” for future processing. It is assumed that once the error is noticed it can be reconciled (such as by increasing the ephemeral volume and file size limit if the error was because the ZipEntry file size was too large).
script-mail-wrapper
Modified the script to use a subject line with “- ERROR(S) OCCURRED” suffix if the associated script return with a non-zero return code.
dspace/docs/DrumEtdLoader.md
Additional documentation about the ETD Loaded functionality,
https://umd-dit.atlassian.net/browse/LIBDRUM-991