diff --git a/distro/README b/distro/README
index 8ae8c28..6ad786c 100644
--- a/distro/README
+++ b/distro/README
@@ -1,24 +1,23 @@
-The gCube System - Smart Executor Plugin
-
+The gCube System - Smart Executor Service
------------------------------------------------------------
-
-This work has been partially supported by the following European projects: DILIGENT (FP6-2003-IST-2),
-D4Science (FP7-INFRA-2007-1.2.2), D4Science-II (FP7-INFRA-2008-1.2.2), iMarine (FP7-INFRASTRUCTURES-2011-2),
-and EUBrazilOpenBio (FP7-ICT-2011-EU-Brazil), Parthenos (H2020-INFRADEV-1-2014-1), BlueBridge (H2020-EINFRA-2015-1).
+This work has been partially supported by the following European projects:
+DILIGENT (FP6-2003-IST-2), D4Science (FP7-INFRA-2007-1.2.2),
+D4Science-II (FP7-INFRA-2008-1.2.2), iMarine (FP7-INFRASTRUCTURES-2011-2),
+EUBrazilOpenBio (FP7-ICT-2011-EU-Brazil), Parthenos (H2020-INFRADEV-1-2014-1),
+BlueBridge (H2020-EINFRA-2015-1).
Authors
-------
-
* Luca Frosini (luca.frosini@isti.cnr.it), CNR Pisa,
Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo".
Version and Release Date
------------------------
+See changelog.xml file in this directory.
-v. 1.0.0 * First release
-
+
Description
-----------
${description}
@@ -31,11 +30,9 @@ ${scm.url}
Documentation
-------------
-
-
+${wiki}
Licensing
---------
-
-This software is licensed under the terms you may find in the file named "LICENSE" in this directory.
-
+This software is licensed under the terms you may find in the file named
+"LICENSE" in this directory.
diff --git a/distro/changelog.xml b/distro/changelog.xml
index 99653cc..892ed23 100644
--- a/distro/changelog.xml
+++ b/distro/changelog.xml
@@ -1,5 +1,5 @@
-
+
First Release
\ No newline at end of file
diff --git a/distro/profile.xml b/distro/profile.xml
index ef3a69e..940b176 100644
--- a/distro/profile.xml
+++ b/distro/profile.xml
@@ -1,10 +1,10 @@
- Service
+ Plugin
{description}
- VREManagement
+ ${serviceClass}
${artifactId}
1.0.0
@@ -17,7 +17,7 @@
${artifactId}
${version}
- library
+ Plugin
${build.finalName}.jar
diff --git a/pom.xml b/pom.xml
index 5512540..2844557 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,6 +14,14 @@
IS Sweeper Smart Executor Plugin
Smart Executor Plugin to run Sweeper. Normally is launched as Scheduled Task
+
+ UTF-8
+ src/main/resources/META-INF/services
+ ${project.basedir}/distro
+ InformationSystem
+ https://wiki.gcube-system.org/gcube/SmartExecutor
+
+
scm:https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/${project.artifactId}
scm:https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/${project.artifactId}
@@ -32,12 +40,6 @@
-
- UTF-8
- src/main/resources/META-INF/services
- distro
-
-
org.gcube.vremanagement
diff --git a/src/main/java/org/gcube/informationsystem/sweeper/ISSweeperPlugin.java b/src/main/java/org/gcube/informationsystem/sweeper/ISSweeperPlugin.java
index 5f645f3..0491e4b 100644
--- a/src/main/java/org/gcube/informationsystem/sweeper/ISSweeperPlugin.java
+++ b/src/main/java/org/gcube/informationsystem/sweeper/ISSweeperPlugin.java
@@ -16,6 +16,18 @@ import org.slf4j.LoggerFactory;
*/
public class ISSweeperPlugin extends Plugin {
+ /**
+ * Indicate the default minutes timeout so that Hosting Node is
+ * considered expired and can be set to {@link Sweeper#UNREACHABLE}
+ */
+ public static final int EXPIRING_MINUTES_TIMEOUT = 30;
+
+ /**
+ * Indicate the default days timeout so that Hosting Node is considered
+ * dead and can be removed from IS
+ */
+ public static final int DEAD_DAYS_TIMEOUT = 15;
+
/**
* Logger
*/
@@ -26,13 +38,6 @@ public class ISSweeperPlugin extends Plugin {
logger.debug("contructor");
}
- /*
- public static String getTagValue(String xml, String tagName){
- return xml.split("<"+tagName+">")[1].split(""+tagName+">")[0];
- }
- */
-
-
/**{@inheritDoc}*/
@Override
public void launch(Map inputs) throws Exception {
@@ -47,14 +52,14 @@ public class ISSweeperPlugin extends Plugin {
Sweeper sweeper = new Sweeper();
try {
- sweeper.sweepDeadGHNs(Calendar.DAY_OF_YEAR, -15);
+ sweeper.sweepDeadGHNs(Calendar.DAY_OF_YEAR, -DEAD_DAYS_TIMEOUT);
} catch(Exception e){
logger.error("Error removing Dead HostingNodes", e);
}
logger.trace("---------------------------------\n\n");
try {
- sweeper.sweepExpiredGHNs(Calendar.MINUTE, -30);
+ sweeper.sweepExpiredGHNs(Calendar.MINUTE, -EXPIRING_MINUTES_TIMEOUT);
logger.trace("---------------------------------\n\n");
} catch(Exception e){
logger.error("Error sweeping Expired HostingNodes", e);
@@ -70,8 +75,6 @@ public class ISSweeperPlugin extends Plugin {
logger.error("Error sweeping Orphan RunningInstances", e);
}
-
-
logger.debug("{} execution finished", ISSweeperPluginDeclaration.NAME);
}
diff --git a/src/main/java/org/gcube/informationsystem/sweeper/ISSweeperPluginDeclaration.java b/src/main/java/org/gcube/informationsystem/sweeper/ISSweeperPluginDeclaration.java
index 6d38933..fdf62b6 100644
--- a/src/main/java/org/gcube/informationsystem/sweeper/ISSweeperPluginDeclaration.java
+++ b/src/main/java/org/gcube/informationsystem/sweeper/ISSweeperPluginDeclaration.java
@@ -27,12 +27,14 @@ public class ISSweeperPluginDeclaration implements PluginDeclaration {
/**
* Plugin name used by the Executor to retrieve this class
*/
- public static final String NAME = "ScheduledTaskSweeper";
+ public static final String NAME = "ISSweeper";
public static final String DESCRIPTION =
- "Scheduled Task Sweeper find orphaned scheduled task on SmartExecutor "
- + "persistence and make them available. This requires interaction with "
- + "SmartExecutor Persistence and with IS to find orphaned Running "
- + "Instances";
+ "IS Sweeper find expired (not updated for "
+ + ISSweeperPlugin.EXPIRING_MINUTES_TIMEOUT + " minutes) Hosting Nodes "
+ + "and set their status to " + Sweeper.UNREACHABLE + ", dead (not "
+ + "updated for " + ISSweeperPlugin.DEAD_DAYS_TIMEOUT + " days) Hosting "
+ + "Nodes and remove them from IS. Moreover it find orphan Running "
+ + "Instances and remove them from IS.";
public static final String VERSION = "1.0.0";
/**{@inheritDoc}*/