Renamed class

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/vre-management/smart-executor@119602 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2015-10-12 09:53:46 +00:00
parent a9db3b4c91
commit fec9ef60e1
6 changed files with 11 additions and 11 deletions

View File

@ -36,7 +36,7 @@ public class SmartContextServletListener implements ServletContextListener {
ApplicationContext ctx = ContextProvider.get(); ApplicationContext ctx = ContextProvider.get();
logger.debug(String.format("ApplicationContext %s", ctx)); logger.debug(String.format("ApplicationContext %s", ctx));
if(ctx!=null){ if(ctx!=null){
List<String> scopes = SmartExecutorInitalizator.getScopes(ctx); List<String> scopes = SmartExecutorInitializator.getScopes(ctx);
logger.debug(String.format("Scopes %s", scopes)); logger.debug(String.format("Scopes %s", scopes));
} }
} }

View File

@ -46,12 +46,12 @@ import org.slf4j.LoggerFactory;
* *
*/ */
@XmlRootElement(name = "plugin-registration-handler") @XmlRootElement(name = "plugin-registration-handler")
public class SmartExecutorInitalizator extends ApplicationLifecycleHandler { public class SmartExecutorInitializator extends ApplicationLifecycleHandler {
/** /**
* Logger * Logger
*/ */
private static Logger logger = LoggerFactory.getLogger(SmartExecutorInitalizator.class); private static Logger logger = LoggerFactory.getLogger(SmartExecutorInitializator.class);
public static final long JOIN_TIMEOUT = 1000; public static final long JOIN_TIMEOUT = 1000;

View File

@ -13,7 +13,7 @@ import java.util.List;
import java.util.UUID; import java.util.UUID;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.gcube.vremanagement.executor.SmartExecutorInitalizator; import org.gcube.vremanagement.executor.SmartExecutorInitializator;
import org.gcube.vremanagement.executor.api.types.LaunchParameter; import org.gcube.vremanagement.executor.api.types.LaunchParameter;
import org.gcube.vremanagement.executor.api.types.Scheduling; import org.gcube.vremanagement.executor.api.types.Scheduling;
import org.gcube.vremanagement.executor.configuration.ScheduledTaskConfiguration; import org.gcube.vremanagement.executor.configuration.ScheduledTaskConfiguration;
@ -44,7 +44,7 @@ public class FileScheduledTaskConfiguration implements ScheduledTaskConfiguratio
public static final String CONFIG_TASK_FILENAME = "definedTasks.json"; public static final String CONFIG_TASK_FILENAME = "definedTasks.json";
public FileScheduledTaskConfiguration() throws Exception { public FileScheduledTaskConfiguration() throws Exception {
this(SmartExecutorInitalizator.getCtx().persistence().location()); this(SmartExecutorInitializator.getCtx().persistence().location());
} }
public FileScheduledTaskConfiguration(String location) throws IOException, JSONException { public FileScheduledTaskConfiguration(String location) throws IOException, JSONException {

View File

@ -10,7 +10,7 @@ import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.node.ObjectNode; import org.codehaus.jackson.node.ObjectNode;
import org.gcube.common.resources.gcore.GCoreEndpoint; import org.gcube.common.resources.gcore.GCoreEndpoint;
import org.gcube.common.scope.api.ScopeProvider; import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.vremanagement.executor.SmartExecutorInitalizator; import org.gcube.vremanagement.executor.SmartExecutorInitializator;
import org.gcube.vremanagement.executor.plugin.PluginDeclaration; import org.gcube.vremanagement.executor.plugin.PluginDeclaration;
import org.gcube.vremanagement.executor.plugin.PluginStateEvolution; import org.gcube.vremanagement.executor.plugin.PluginStateEvolution;
@ -46,9 +46,9 @@ public class PluginStateEvolutionObjectNode {
ObjectMapper objectMapper = new ObjectMapper(); ObjectMapper objectMapper = new ObjectMapper();
ObjectNode objectNode = objectMapper.createObjectNode(); ObjectNode objectNode = objectMapper.createObjectNode();
try { try {
GCoreEndpoint gCoreEndpoint = SmartExecutorInitalizator.getCtx().profile(GCoreEndpoint.class); GCoreEndpoint gCoreEndpoint = SmartExecutorInitializator.getCtx().profile(GCoreEndpoint.class);
objectNode.put(GHN_ID_FIELD, gCoreEndpoint.profile().ghnId()); objectNode.put(GHN_ID_FIELD, gCoreEndpoint.profile().ghnId());
objectNode.put(GHN_HOSTNAME_FIELD, SmartExecutorInitalizator.getCtx().container().configuration().hostname()); objectNode.put(GHN_HOSTNAME_FIELD, SmartExecutorInitializator.getCtx().container().configuration().hostname());
}catch(Exception e){ }catch(Exception e){
objectNode.put(GHN_ID_FIELD, LOCALHOST + "_" + UUID.randomUUID()); objectNode.put(GHN_ID_FIELD, LOCALHOST + "_" + UUID.randomUUID());
objectNode.put(GHN_HOSTNAME_FIELD, LOCALHOST); objectNode.put(GHN_HOSTNAME_FIELD, LOCALHOST);

View File

@ -12,7 +12,7 @@ import java.util.Map;
import java.util.UUID; import java.util.UUID;
import org.gcube.common.resources.gcore.GCoreEndpoint; import org.gcube.common.resources.gcore.GCoreEndpoint;
import org.gcube.vremanagement.executor.SmartExecutorInitalizator; import org.gcube.vremanagement.executor.SmartExecutorInitializator;
import org.gcube.vremanagement.executor.api.types.LaunchParameter; import org.gcube.vremanagement.executor.api.types.LaunchParameter;
import org.gcube.vremanagement.executor.api.types.Scheduling; import org.gcube.vremanagement.executor.api.types.Scheduling;
import org.gcube.vremanagement.executor.configuration.ScheduledTaskConfiguration; import org.gcube.vremanagement.executor.configuration.ScheduledTaskConfiguration;
@ -139,7 +139,7 @@ public class SmartExecutorScheduler {
try { try {
ScheduledTaskConfiguration stc = ScheduledTaskConfigurationFactory.getLaunchConfiguration(); ScheduledTaskConfiguration stc = ScheduledTaskConfigurationFactory.getLaunchConfiguration();
String runningInstanceID = SmartExecutorInitalizator.getCtx().profile(GCoreEndpoint.class).id(); String runningInstanceID = SmartExecutorInitializator.getCtx().profile(GCoreEndpoint.class).id();
stc.addScheduledTask(uuid, runningInstanceID, parameter); stc.addScheduledTask(uuid, runningInstanceID, parameter);
} catch (Exception e) { } catch (Exception e) {
logger.error("Unable to persist the scheduling", e.getCause()); logger.error("Unable to persist the scheduling", e.getCause());

View File

@ -1 +1 @@
org.gcube.vremanagement.executor.SmartExecutorInitalizator org.gcube.vremanagement.executor.SmartExecutorInitializator