updated
This commit is contained in:
parent
056f0a3b0d
commit
ad0c2e2e67
19
pom.xml
19
pom.xml
|
@ -6,19 +6,16 @@
|
|||
<artifactId>legacy-is-publisher-connector</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<name>Legacy is publisher</name>
|
||||
|
||||
<scm>
|
||||
<connection>scm:git:https://code-repo.d4science.org/gCubeSystem/legacy-is-publisher-connector</connection>
|
||||
<developerConnection>scm:git:https://code-repo.d4science.org/gCubeSystem/legacy-is-publisher-connector</developerConnection>
|
||||
<url>https://code-repo.d4science.org/gCubeSystem/legacy-is-publisher-connector</url>
|
||||
</scm>
|
||||
|
||||
<parent>
|
||||
<artifactId>maven-parent</artifactId>
|
||||
<groupId>org.gcube.tools</groupId>
|
||||
<version>1.1.0</version>
|
||||
</parent>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
@ -30,7 +27,6 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
|
@ -52,11 +48,9 @@
|
|||
<groupId>org.gcube.resources.discovery</groupId>
|
||||
<artifactId>ic-client</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.gcube.resources</groupId>
|
||||
<artifactId>common-gcore-resources</artifactId>
|
||||
<version>[1.0.0,2.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
|
@ -64,7 +58,16 @@
|
|||
<version>4.0.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.sun.xml.ws</groupId>
|
||||
<artifactId>jaxws-rt</artifactId>
|
||||
<version>2.3.3</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.xml.ws</groupId>
|
||||
<artifactId>rt</artifactId>
|
||||
<version>2.3.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -39,9 +39,9 @@ public class ApplicationProfileBuilder {
|
|||
endpoint.profile()
|
||||
.description(configuration.description())
|
||||
.serviceName(configuration.name())
|
||||
.serviceClass(configuration.serviceClass())
|
||||
.serviceClass(configuration.group())
|
||||
.version(configuration.version())
|
||||
.serviceId(configuration.name() + configuration.serviceClass() + configuration.version())
|
||||
.serviceId(configuration.name() + configuration.group() + configuration.version())
|
||||
.ghnId(context.container().id());
|
||||
|
||||
endpoint.profile().newDeploymentData()
|
||||
|
@ -53,8 +53,8 @@ public class ApplicationProfileBuilder {
|
|||
endpoint.profile().endpoints().clear();
|
||||
|
||||
String baseAddress;
|
||||
if (configuration.proxyAddress()!=null){
|
||||
ProxyAddress proxy = configuration.proxyAddress();
|
||||
if (configuration.proxable() && container.proxy()!=null){
|
||||
ProxyAddress proxy = container.proxy();
|
||||
String protocol = proxy.getProtocol();
|
||||
String port = proxy.getPort()!=null?":"+proxy.getPort():"";
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@ import org.gcube.common.resources.gcore.HostingNode.Profile.NodeDescription.GHNT
|
|||
import org.gcube.common.resources.gcore.HostingNode.Profile.NodeDescription.Processor;
|
||||
import org.gcube.common.resources.gcore.HostingNode.Profile.NodeDescription.Variable;
|
||||
import org.gcube.common.resources.gcore.utils.Group;
|
||||
import org.gcube.smartgears.configuration.SmartgearsConfiguration;
|
||||
import org.gcube.smartgears.configuration.container.ContainerConfiguration;
|
||||
import org.gcube.smartgears.configuration.library.SmartGearsConfiguration;
|
||||
import org.gcube.smartgears.context.container.ContainerContext;
|
||||
import org.gcube.smartgears.provider.ProviderFactory;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -84,7 +84,7 @@ public class ContainerProfileBuilder {
|
|||
processors.add().bogomips(new BigDecimal(map.get("bogomips")))
|
||||
.clockSpeedMhz(new BigDecimal(map.get("cpu_MHz"))).family(map.get("cpu_family"))
|
||||
.modelName(map.get("model_name")).model(map.get("model")).vendor(map.get("vendor_id"))
|
||||
.cacheL1(new Integer(map.get("cache_size"))).cacheL1D(0).cacheL1I(0).cacheL2(0);
|
||||
.cacheL1(Integer.parseInt(map.get("cache_size"))).cacheL1D(0).cacheL1I(0).cacheL2(0);
|
||||
|
||||
addVariablesTo(node);
|
||||
|
||||
|
@ -194,7 +194,7 @@ public class ContainerProfileBuilder {
|
|||
private long getFreeSpace() {
|
||||
long free = 0;
|
||||
try {
|
||||
free = context.configuration().persistence().getFreeSpace()/1024;
|
||||
free = context.persistenceWriter().getFreeSpace()/1024;
|
||||
} catch (Exception ioe) {
|
||||
log.warn("unable to detect the free space on the disk", ioe);
|
||||
}
|
||||
|
@ -275,8 +275,8 @@ public class ContainerProfileBuilder {
|
|||
|
||||
variables.add().keyAndValue("Java", System.getProperty("java.version"));
|
||||
|
||||
SmartGearsConfiguration config = ProviderFactory.provider().smartgearsConfiguration();
|
||||
variables.add().keyAndValue("SmartGears",config.version());
|
||||
SmartgearsConfiguration config = ProviderFactory.provider().smartgearsConfiguration();
|
||||
variables.add().keyAndValue("SmartGears",config.getVersion());
|
||||
|
||||
variables.add().keyAndValue("ghn-update-interval-in-secs", String.valueOf(cfg.publicationFrequency()));
|
||||
|
||||
|
@ -315,9 +315,9 @@ public class ContainerProfileBuilder {
|
|||
Pattern p = Pattern.compile("^(.*?)\\s{1}(.*?)\\s{1}(.*?)\\s{1}(.*)$");
|
||||
Matcher matcher = p.matcher(content.toString());
|
||||
if ((matcher.matches()) && (matcher.groupCount() > 3)) {
|
||||
result.put("1min", new Double(matcher.group(1)));
|
||||
result.put("5mins", new Double(matcher.group(2)));
|
||||
result.put("15mins", new Double(matcher.group(3).split("\\s")[0]));
|
||||
result.put("1min", Double.valueOf(matcher.group(1)));
|
||||
result.put("5mins", Double.valueOf(matcher.group(2)));
|
||||
result.put("15mins", Double.valueOf(matcher.group(3).split("\\s")[0]));
|
||||
}
|
||||
}
|
||||
} catch (Exception ioe) {
|
||||
|
|
Loading…
Reference in New Issue