Skip to content

Commit

Permalink
Merge pull request #1 from landreev/IQSS/6666-metadata-export-failure…
Browse files Browse the repository at this point in the history
…-extra

a few extra lines for the 6666 (multistore exports) fix
  • Loading branch information
qqmyers authored Feb 26, 2020
2 parents 19c17e5 + 55ad201 commit 0cff3c0
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/edu/harvard/iq/dataverse/Dataset.java
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,8 @@ private Collection<String> getCategoryNames() {
}
}

/*Only used with packageFiles after the implementation of multi-store in #6488
/* Only used with packageFiles after the implementation of multi-store in #6488
* DO NOT USE THIS METHOD FOR ANY OTHER PURPOSES - it's @Deprecated for a reason.
*
*/
@Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,16 @@ private void loadChecksumManifest() {
+ SEP + dataset.getIdentifier()
+ SEP + uploadFolder
+ SEP + manifest;
// TODO:
// The above goes directly to the filesystem directory configured by the
// old "dataverse.files.directory" JVM option (otherwise used for temp
// files only, after the Multistore implementation (#6488).
// We probably want package files to be able to use specific stores instead.
// More importantly perhaps, the approach above does not take into account
// if the dataset may have an AlternativePersistentIdentifier, that may be
// designated isStorageLocationDesignator() - i.e., if a different identifer
// needs to be used to name the storage directory, instead of the main/current
// persistent identifier above.
getJobLogger().log(Level.INFO, "Reading checksum manifest: " + manifestAbsolutePath);
Scanner scanner = null;
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@ public void open(Serializable checkpoint) throws Exception {

directory = new File(System.getProperty("dataverse.files.directory")
+ SEP + dataset.getAuthority() + SEP + dataset.getIdentifier() + SEP + uploadFolder);
// TODO:
// The above goes directly to the filesystem directory configured by the
// old "dataverse.files.directory" JVM option (otherwise used for temp
// files only, after the Multistore implementation (#6488).
// We probably want package files to be able to use specific stores instead.
// More importantly perhaps, the approach above does not take into account
// if the dataset may have an AlternativePersistentIdentifier, that may be
// designated isStorageLocationDesignator() - i.e., if a different identifer
// needs to be used to name the storage directory, instead of the main/current
// persistent identifier above.
getJobLogger().log(Level.INFO, "Reading dataset directory: " + directory.getAbsolutePath()
+ " (excluding: " + excludes + ")");
if (isValidDirectory(directory)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ public JsonObject execute(CommandContext ctxt) throws CommandException {
}
File directory = new File(System.getProperty("dataverse.files.directory")
+ File.separator + dataset.getAuthority() + File.separator + dataset.getIdentifier());
// TODO:
// The above goes directly to the filesystem directory configured by the
// old "dataverse.files.directory" JVM option (otherwise used for temp
// files only, after the Multistore implementation (#6488).
// We probably want package files to be able to use specific stores instead.
// More importantly perhaps, the approach above does not take into account
// if the dataset may have an AlternativePersistentIdentifier, that may be
// designated isStorageLocationDesignator() - i.e., if a different identifer
// needs to be used to name the storage directory, instead of the main/current
// persistent identifier above.
if (!isValidDirectory(directory)) {
String error = "Dataset directory is invalid. " + directory;
logger.info(error);
Expand All @@ -86,6 +96,8 @@ public JsonObject execute(CommandContext ctxt) throws CommandException {
File uploadDirectory = new File(System.getProperty("dataverse.files.directory")
+ File.separator + dataset.getAuthority() + File.separator + dataset.getIdentifier()
+ File.separator + uploadFolder);
// TODO:
// see the comment above.
if (!isValidDirectory(uploadDirectory)) {
String error = "Upload folder is not a valid directory.";
logger.info(error);
Expand Down

0 comments on commit 0cff3c0

Please sign in to comment.