From 3143ac83cdb3cd70d5f0c2bfab974d0f5948e22b Mon Sep 17 00:00:00 2001 From: felmer <felmer> Date: Mon, 11 Mar 2013 15:15:35 +0000 Subject: [PATCH] SP-539, BIS-339: clean ups and improved logging. SVN: 28586 --- .../etlserver/path/PathInfoDatabaseFeedingTask.java | 10 ++++++++++ .../path/DatabaseBasedDataSetPathsInfoFeederTest.java | 2 -- .../path/PathInfoDatabaseFeedingTaskTest.java | 1 - 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/datastore_server/source/java/ch/systemsx/cisd/etlserver/path/PathInfoDatabaseFeedingTask.java b/datastore_server/source/java/ch/systemsx/cisd/etlserver/path/PathInfoDatabaseFeedingTask.java index 36c6c6127dc..1729ecddd25 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/etlserver/path/PathInfoDatabaseFeedingTask.java +++ b/datastore_server/source/java/ch/systemsx/cisd/etlserver/path/PathInfoDatabaseFeedingTask.java @@ -150,6 +150,16 @@ public class PathInfoDatabaseFeedingTask implements IMaintenanceTask, IPostRegis PropertyUtils.getInt(properties, MAX_NUMBER_OF_CHUNKS_KEY, DEFAULT_MAX_NUMBER_OF_DATA_SETS); timeLimit = DateTimeUtils.getDurationInMillis(properties, TIME_LIMIT_KEY, 0); + StringBuilder builder = new StringBuilder(pluginName); + builder.append(" intialized with chunk size = ").append(chunkSize).append("."); + if (timeLimit > 0) + { + builder.append(" Time limit: ").append(DateTimeUtils.renderDuration(timeLimit)); + } else if (maxNumerOfChunks > 0) + { + builder.append(" Maximum number of chunks: ").append(maxNumerOfChunks); + } + operationLog.info(builder.toString()); } private static boolean getComputeChecksumFlag(Properties properties) diff --git a/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/path/DatabaseBasedDataSetPathsInfoFeederTest.java b/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/path/DatabaseBasedDataSetPathsInfoFeederTest.java index 4fdd1562597..f285d7c5bef 100644 --- a/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/path/DatabaseBasedDataSetPathsInfoFeederTest.java +++ b/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/path/DatabaseBasedDataSetPathsInfoFeederTest.java @@ -38,8 +38,6 @@ import ch.systemsx.cisd.openbis.common.io.hierarchical_content.DefaultFileBasedH */ public class DatabaseBasedDataSetPathsInfoFeederTest extends AbstractFileSystemTestCase { - private static final Date TIME_STAMP = new Date(4711); - private static final String ROOT_PATH = DatabaseBasedDataSetPathsInfoFeederTest.class.getName(); private Mockery context; diff --git a/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/path/PathInfoDatabaseFeedingTaskTest.java b/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/path/PathInfoDatabaseFeedingTaskTest.java index 3a7beb19cdb..d50de359250 100644 --- a/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/path/PathInfoDatabaseFeedingTaskTest.java +++ b/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/path/PathInfoDatabaseFeedingTaskTest.java @@ -23,7 +23,6 @@ import java.lang.reflect.Method; import java.util.Arrays; import java.util.Collections; import java.util.Date; -import java.util.Properties; import org.jmock.Expectations; import org.jmock.Mockery; -- GitLab