NLPHub added logs and servlet parameters
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-analysis/nlphub@177263 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
3da3b475f8
commit
53585e74c0
2
pom.xml
2
pom.xml
|
@ -3,7 +3,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.gcube.data.analysis</groupId>
|
||||
<artifactId>nlphub</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<packaging>war</packaging>
|
||||
<properties>
|
||||
<tomcat.version>7.0.70</tomcat.version>
|
||||
|
|
|
@ -148,10 +148,16 @@ public class NLPHub extends HttpServlet {
|
|||
algs[i] = algs[i].trim();
|
||||
}
|
||||
|
||||
String maxWaitingTime= getServletConfig().getInitParameter("MaxWaitingTime");
|
||||
String sleepTime= getServletConfig().getInitParameter("SleepTime");
|
||||
logger.debug("NLPHub: [maxWaitingTime="+maxWaitingTime+", sleepTime="+sleepTime+"]");
|
||||
|
||||
long maxWaitingTimeL=Long.parseLong(maxWaitingTime);
|
||||
long sleepTimeL=Long.parseLong(sleepTime);
|
||||
RunnerCommander commander = new RunnerCommander(dataMiner, algs,plink ,
|
||||
annotations, token, response);
|
||||
commander.setSleepTime(100);
|
||||
commander.setMaxWaitingTime(90 * 1000);
|
||||
commander.setSleepTime(sleepTimeL);
|
||||
commander.setMaxWaitingTime(maxWaitingTimeL);
|
||||
commander.startProcess();
|
||||
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -41,7 +41,7 @@ public class NlpAsyncNerRunner extends AsyncHttpRequest {
|
|||
dataMiner = Constants.DEFAULT_DATAMINER_URL;
|
||||
// else
|
||||
// this.dataMiner = "http://" + dataMiner;
|
||||
|
||||
logger.debug("NlpAsyncNerRunner: Create Excution Request");
|
||||
logger.debug("NlpAsyncNerRunner: [identifier=" + identifier + ", httpMethod=" + httpMethod + ", annotations="
|
||||
+ annotations + ", publicLink=" + publicLink + ", dataminer=" + dataMiner + "]");
|
||||
|
||||
|
@ -102,7 +102,7 @@ public class NlpAsyncNerRunner extends AsyncHttpRequest {
|
|||
serviceUrl.append(WPS_DESCRIBE_PROCESS_URL);
|
||||
serviceUrl.append("&lang=en-US&Identifier=");
|
||||
serviceUrl.append(identifier);
|
||||
logger.debug("BuildParameterString request URL: " + serviceUrl);
|
||||
logger.debug("DescribeProcess Requested: " + serviceUrl);
|
||||
serviceUrl.append("&gcube-token=");
|
||||
serviceUrl.append(token);
|
||||
|
||||
|
|
|
@ -87,6 +87,7 @@ public class RunnerCommander extends Thread {
|
|||
private void runAlgorithms() {
|
||||
for (String id : identifiers) {
|
||||
NlpAsyncNerRunner n = new NlpAsyncNerRunner(dataMiner, id, token, link, annotationList, null, this);
|
||||
logger.debug("Run algorithm: "+id);
|
||||
n.start();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
||||
metadata-complete="true" version="3.0">
|
||||
<display-name>NLPHub</display-name>
|
||||
|
||||
<welcome-file-list>
|
||||
<welcome-file>index.html</welcome-file>
|
||||
<welcome-file>index.htm</welcome-file>
|
||||
|
@ -15,6 +16,14 @@
|
|||
<servlet>
|
||||
<servlet-name>NLPServlet</servlet-name>
|
||||
<servlet-class>org.gcube.data.analysis.nlphub.NLPHub</servlet-class>
|
||||
<init-param>
|
||||
<param-name>MaxWaitingTime</param-name>
|
||||
<param-value>180000</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>SleepTime</param-name>
|
||||
<param-value>1000</param-value>
|
||||
</init-param>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>NLPServlet</servlet-name>
|
||||
|
|
Loading…
Reference in New Issue