Author: challngr
Date: Thu Jan 21 18:55:04 2016
New Revision: 1726063
URL: http://svn.apache.org/viewvc?rev=1726063&view=rev
Log:
UIMA-4577 Watch out for nulls in the OR history objects.
Modified:
uima/sandbox/uima-ducc/trunk/uima-ducc-database/src/main/java/org/apache/uima/ducc/database/DbHandle.java
uima/sandbox/uima-ducc/trunk/uima-ducc-database/src/main/java/org/apache/uima/ducc/database/DbManager.java
uima/sandbox/uima-ducc/trunk/uima-ducc-database/src/main/java/org/apache/uima/ducc/database/HistoryManagerDb.java
Modified:
uima/sandbox/uima-ducc/trunk/uima-ducc-database/src/main/java/org/apache/uima/ducc/database/DbHandle.java
URL:
http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-database/src/main/java/org/apache/uima/ducc/database/DbHandle.java?rev=1726063&r1=1726062&r2=1726063&view=diff
==
---
uima/sandbox/uima-ducc/trunk/uima-ducc-database/src/main/java/org/apache/uima/ducc/database/DbHandle.java
(original)
+++
uima/sandbox/uima-ducc/trunk/uima-ducc-database/src/main/java/org/apache/uima/ducc/database/DbHandle.java
Thu Jan 21 18:55:04 2016
@@ -76,7 +76,15 @@ public class DbHandle
BoundStatement bound = boundStatement.bind(fields);
return execute(bound);
} finally {
- if ( manager.noisy ) logger.info(methodName, null,
"Time to execute prepared statement:", ps.getQueryString(),
System.currentTimeMillis() - now);
+ if ( manager.noisy ) {
+logger.info(methodName, null, "Time to execute prepared
statement:", ps.getQueryString(), System.currentTimeMillis() - now);
+StringBuffer buf = new StringBuffer("Fields for statement: ");
+for ( Object o: fields ) {
+buf.append(o.toString());
+buf.append(" ");
+}
+logger.info(methodName, null, buf.toString());
+}
}
}
Modified:
uima/sandbox/uima-ducc/trunk/uima-ducc-database/src/main/java/org/apache/uima/ducc/database/DbManager.java
URL:
http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-database/src/main/java/org/apache/uima/ducc/database/DbManager.java?rev=1726063&r1=1726062&r2=1726063&view=diff
==
---
uima/sandbox/uima-ducc/trunk/uima-ducc-database/src/main/java/org/apache/uima/ducc/database/DbManager.java
(original)
+++
uima/sandbox/uima-ducc/trunk/uima-ducc-database/src/main/java/org/apache/uima/ducc/database/DbManager.java
Thu Jan 21 18:55:04 2016
@@ -43,12 +43,12 @@ import com.datastax.driver.core.policies
*/
public class DbManager
{
-static final String URL_PROPERTY = "ducc.database.url";
+static final String URL_PROPERTY = "ducc.database.host";
static final String NOISE_PROPERTY = "ducc.database.noisy";
private static String db_id = null;
private static String db_pw = null;
-boolean noisy = false;
+boolean noisy = true;
String dburl;
DuccLogger logger;
Modified:
uima/sandbox/uima-ducc/trunk/uima-ducc-database/src/main/java/org/apache/uima/ducc/database/HistoryManagerDb.java
URL:
http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-database/src/main/java/org/apache/uima/ducc/database/HistoryManagerDb.java?rev=1726063&r1=1726062&r2=1726063&view=diff
==
---
uima/sandbox/uima-ducc/trunk/uima-ducc-database/src/main/java/org/apache/uima/ducc/database/HistoryManagerDb.java
(original)
+++
uima/sandbox/uima-ducc/trunk/uima-ducc-database/src/main/java/org/apache/uima/ducc/database/HistoryManagerDb.java
Thu Jan 21 18:55:04 2016
@@ -300,7 +300,7 @@ public class HistoryManagerDb
IDuccSchedulingInfo dsx = j.getSchedulingInfo();
String user = dsi.getUser();
-String jclass = dsx.getSchedulingClass();
+String jclass = getString(dsx.getSchedulingClass());
int memory = toInt(dsx.getMemorySizeRequested());
long submission = dsi.getDateOfSubmissionMillis();
@@ -354,9 +354,9 @@ public class HistoryManagerDb
long ducc_pid = idp.getDuccId().getFriendly();
long pid = toInt(idp.getPID());
-String node = idp.getNodeIdentity().getName();
-String reason_agent =
idp.getReasonForStoppingProcess(); // called "reason" in duccprocess but not in
ws
-String reason_scheduler =
idp.getProcessDeallocationType().toString(); // called
"processDeallocationType" in duccprocess but not in ws
+String node =
getString(idp.getNodeIdentity().getName());
+String reason_agent =
getString(idp.getReasonForStoppingProcess()); // called "reason" in ducc