From 4db36f402aebe76bb20401bc361c369c1bc30f20 Mon Sep 17 00:00:00 2001 From: felmer <felmer> Date: Wed, 10 Dec 2014 11:59:30 +0000 Subject: [PATCH] SSDM-1324: Rename property 'data-set-command-executor-mapping' to 'data-set-command-queue-mapping'. Explain new property by comments in service.properties of the distribution. SVN: 33010 --- .../dss/generic/server/DataStoreService.java | 17 ++++++++++------- .../source/java/dssApplicationContext.xml | 2 +- .../dist/etc/service.properties | 14 +++++++++++++- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/DataStoreService.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/DataStoreService.java index b87c63fcd27..fb157be4712 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/DataStoreService.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/DataStoreService.java @@ -82,6 +82,12 @@ import ch.systemsx.cisd.openbis.generic.shared.util.UuidUtil; public class DataStoreService extends AbstractServiceWithLogger<IDataStoreService> implements IDataStoreServiceInternal, InitializingBean { + private static final String COPYING_TO_ARCHIVE_PROCESSING_PLUGIN_KEY = "Copying data sets to archive"; + + private static final String ARCHIVING_PROCESSING_PLUGIN_KEY = "Archiving"; + + private static final String UNARCHIVING_PROCESSING_PLUGIN_KEY = "Unarchiving"; + private final SessionTokenManager sessionTokenManager; private final OpenbisSessionTokenCache sessionTokenCache; @@ -320,10 +326,9 @@ public class DataStoreService extends AbstractServiceWithLogger<IDataStoreServic public void unarchiveDatasets(String sessionToken, String userSessionToken, List<DatasetDescription> datasets, String userId, String userEmailOrNull) { - String description = "Unarchiving"; IProcessingPluginTask task = new UnarchiveProcessingPluginTask(getArchiverPlugin()); - scheduleTask(sessionToken, userSessionToken, description, task, datasets, userId, + scheduleTask(sessionToken, userSessionToken, UNARCHIVING_PROCESSING_PLUGIN_KEY, task, datasets, userId, userEmailOrNull); } @@ -339,12 +344,10 @@ public class DataStoreService extends AbstractServiceWithLogger<IDataStoreServic List<DatasetDescription> datasets, String userId, String userEmailOrNull, boolean removeFromDataStore) { - String description = removeFromDataStore ? "Archiving" : "Copying data sets to archive"; - IProcessingPluginTask task = - new ArchiveProcessingPluginTask(getArchiverPlugin(), removeFromDataStore); + String description = removeFromDataStore ? ARCHIVING_PROCESSING_PLUGIN_KEY : COPYING_TO_ARCHIVE_PROCESSING_PLUGIN_KEY; + IProcessingPluginTask task = new ArchiveProcessingPluginTask(getArchiverPlugin(), removeFromDataStore); - scheduleTask(sessionToken, userSessionToken, description, task, datasets, userId, - userEmailOrNull); + scheduleTask(sessionToken, userSessionToken, description, task, datasets, userId, userEmailOrNull); } @Override diff --git a/datastore_server/source/java/dssApplicationContext.xml b/datastore_server/source/java/dssApplicationContext.xml index 414bda5aa82..c96950ed90e 100644 --- a/datastore_server/source/java/dssApplicationContext.xml +++ b/datastore_server/source/java/dssApplicationContext.xml @@ -105,7 +105,7 @@ </bean> <bean id="data-set-command-executor-provider" class="ch.systemsx.cisd.openbis.dss.generic.server.KeyBasedDataSetCommandExecutorProvider"> - <constructor-arg value="${data-set-command-executor-mapping}"/> + <constructor-arg value="${data-set-command-queue-mapping}"/> <constructor-arg value="${commandqueue-dir}"/> </bean> diff --git a/openbis_standard_technologies/dist/etc/service.properties b/openbis_standard_technologies/dist/etc/service.properties index 0bd327251e9..40d7ad10ca8 100644 --- a/openbis_standard_technologies/dist/etc/service.properties +++ b/openbis_standard_technologies/dist/etc/service.properties @@ -15,9 +15,21 @@ incoming-root-dir = ${root-dir} # Cache for data set files from other Data Store Servers cache-workspace-folder = ../../data/dss-cache -# The directory where the command queue file is located; defaults to storeroot-dir +# The directory where the command queue files are located; defaults to storeroot-dir commandqueue-dir = +# Comma-separated list of definitions of additional queues for processing processing plugins. +# Each entry is of the form <queue name>:<regular expression> +# A corresponding persistent queue is created. All processing plugins with a key matching the corresponding +# regular expression are associated with the corresponding queue. +# +# The key of a processing plugin is its core-plugin name which is the name of the folder containing +# 'plugin.properties'. +# +# In case of archiving is enabled the following three processing plugins are defined: +# 'Archiving', 'Copying data sets to archive', and 'Unarchiving' +#data-set-command-queue-mapping = archiving:Archiving|Copying data sets to archive + # Port port = 8444 use-ssl = true -- GitLab