Skip to content

Commit

Permalink
more changes/refinements per review feedback (#10623)
Browse files Browse the repository at this point in the history
  • Loading branch information
landreev committed Aug 23, 2024
1 parent 69cfe29 commit d223a8f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package edu.harvard.iq.dataverse.globus;

import edu.harvard.iq.dataverse.settings.JvmSettings;
import edu.harvard.iq.dataverse.settings.SettingsServiceBean;
import edu.harvard.iq.dataverse.util.SystemConfig;
import jakarta.annotation.PostConstruct;
Expand Down Expand Up @@ -48,7 +49,7 @@ public class TaskMonitoringServiceBean {

@PostConstruct
public void init() {
if (systemConfig.isGlobusTaskMonitoringServer()) {
if (JvmSettings.GLOBUS_TASK_MONITORING_SERVER.lookupOptional(Boolean.class).orElse(false)) {
logger.info("Starting Globus task monitoring service");
int pollingInterval = SystemConfig.getIntLimitFromStringOrDefault(
settingsSvc.getValueForKey(SettingsServiceBean.Key.GlobusPollingInterval), 600);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ public List<DataFile> saveAndAddFilesToDataset(DatasetVersion version,
StorageIO<DvObject> dataAccess = DataAccess.getStorageIO(dataFile);
//Populate metadata
dataAccess.open(DataAccessOption.READ_ACCESS);
// (this will make a remote call to check if the file exists
// and obtain its size)
// (the .open() above makes a remote call to check if
// the file exists and obtains its size)
confirmedFileSize = dataAccess.getSize();

// For directly-uploaded files, we will perform the file size
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public enum JvmSettings {
DOCROOT_DIRECTORY(SCOPE_FILES, "docroot"),
GUESTBOOK_AT_REQUEST(SCOPE_FILES, "guestbook-at-request"),
GLOBUS_CACHE_MAXAGE(SCOPE_FILES, "globus-cache-maxage"),
GLOBUS_TASK_MONITORING_SERVER(SCOPE_FILES, "globus-monitoring-server"),

//STORAGE DRIVER SETTINGS
SCOPE_DRIVER(SCOPE_FILES),
Expand Down
9 changes: 0 additions & 9 deletions src/main/java/edu/harvard/iq/dataverse/util/SystemConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ public class SystemConfig {
private String buildNumber = null;

private static final String JVM_TIMER_SERVER_OPTION = "dataverse.timerServer";
private static final String JVM_GLOBUS_TASK_MONITORING_OPTION = "dataverse.globus.taskMonitoringServer";

private static final long DEFAULT_GUESTBOOK_RESPONSES_DISPLAY_LIMIT = 5000L;
private static final long DEFAULT_THUMBNAIL_SIZE_LIMIT_IMAGE = 3000000L; // 3 MB
Expand Down Expand Up @@ -547,14 +546,6 @@ public boolean isTimerServer() {
return false;
}

public boolean isGlobusTaskMonitoringServer() {
String optionValue = System.getProperty(JVM_GLOBUS_TASK_MONITORING_OPTION);
if ("true".equalsIgnoreCase(optionValue)) {
return true;
}
return false;
}

public String getFooterCopyrightAndYear() {
return BundleUtil.getStringFromBundle("footer.copyright", Arrays.asList(Year.now().getValue() + ""));
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/propertyFiles/Bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ notification.mail.import.filesystem=Dataset {2} ({0}/dataset.xhtml?persistentId=
notification.mail.globus.upload.completed=Globus transfer to Dataset <a href="{0}/dataset.xhtml?persistentId={1}" title="{2}">{2}</a> was successful. File(s) have been uploaded and verified. <br><br> {3}<br>
notification.mail.globus.download.completed=Globus transfer of file(s) from the dataset <a href="{0}/dataset.xhtml?persistentId={1}" title="{2}">{2}</a> was successful. <br><br> {3}<br>
notification.mail.globus.upload.completedWithErrors=Globus transfer to Dataset <a href="{0}/dataset.xhtml?persistentId={1}" title="{2}">{2}</a> is complete with errors. <br><br> {3}<br>
notification.mail.globus.upload.failedRemotely=Remote data transfer between Globus collections for Dataset <a href="{0}/dataset.xhtml?persistentId={1}" title="{2}">{2}</a> failed, reported via Globus API. <br><br> {3}<br>
notification.mail.globus.upload.failedRemotely=Remote data transfer between Globus endpoints for Dataset <a href="{0}/dataset.xhtml?persistentId={1}" title="{2}">{2}</a> failed, as reported via Globus API. <br><br> {3}<br>
notification.mail.globus.upload.failedLocally=Dataverse received a confirmation of a successful Globus data transfer for Dataset <a href="{0}/dataset.xhtml?persistentId={1}" title="{2}">{2}</a>, but failed to add the files to the dataset locally. <br><br> {3}<br>
notification.mail.globus.download.completedWithErrors=Globus transfer from the dataset <a href="{0}/dataset.xhtml?persistentId={1}" title="{2}">{2}</a> is complete with errors. <br><br> {3}<br>
notification.import.filesystem=Dataset <a href="/dataset.xhtml?persistentId={0}" title="{1}">{1}</a> has been successfully uploaded and verified.
Expand Down

0 comments on commit d223a8f

Please sign in to comment.