You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by de...@apache.org on 2015/02/23 21:30:49 UTC

svn commit: r1661766 - in /uima/sandbox/uima-ducc/trunk/uima-ducc-container/src: main/java/org/apache/uima/ducc/container/jd/classload/ test/java/org/apache/uima/ducc/user/jd/test/helper/

Author: degenaro
Date: Mon Feb 23 20:30:49 2015
New Revision: 1661766

URL: http://svn.apache.org/r1661766
Log:
UIMA-4069 DUCC Job Driver (JD) system classpath

package org.apache.uima.ducc to comprise FlowController and ErrorHandler+Directive

Modified:
    uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/classload/ProxyJobDriverErrorHandler.java
    uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/user/jd/test/helper/TestJdContainerErrorHandler.java
    uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/user/jd/test/helper/TestJdContainerErrorHandlerRandomRetry.java

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/classload/ProxyJobDriverErrorHandler.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/classload/ProxyJobDriverErrorHandler.java?rev=1661766&r1=1661765&r2=1661766&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/classload/ProxyJobDriverErrorHandler.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/classload/ProxyJobDriverErrorHandler.java Mon Feb 23 20:30:49 2015
@@ -43,9 +43,9 @@ public class ProxyJobDriverErrorHandler
 	private Method methodInstanceIsKillProcess = null;
 	private Method methodInstanceIsKillWorkItem = null;
 	
-	private static String packageName = "org.apache.uima.ducc.user.jd.iface.";
-	private static String defaultClassName = packageName+"JdUserErrorHandler";
-	private static String directiveInterfaceName = packageName+"IJdUserDirective";
+	private static String packageName = "org.apache.uima.ducc.";
+	private static String defaultClassName = packageName+"ErrorHandler";
+	private static String directiveInterfaceName = packageName+"IErrorHandlerDirective";
 	
 	public ProxyJobDriverErrorHandler() throws JobDriverException {
 		try {

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/user/jd/test/helper/TestJdContainerErrorHandler.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/user/jd/test/helper/TestJdContainerErrorHandler.java?rev=1661766&r1=1661765&r2=1661766&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/user/jd/test/helper/TestJdContainerErrorHandler.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/user/jd/test/helper/TestJdContainerErrorHandler.java Mon Feb 23 20:30:49 2015
@@ -18,19 +18,19 @@
 */
 package org.apache.uima.ducc.user.jd.test.helper;
 
-import org.apache.uima.ducc.user.jd.iface.IJdUserDirective;
-import org.apache.uima.ducc.user.jd.iface.JdUserDirective;
-import org.apache.uima.ducc.user.jd.iface.JdUserErrorHandler;
+import org.apache.uima.ducc.ErrorHandler;
+import org.apache.uima.ducc.ErrorHandlerDirective;
+import org.apache.uima.ducc.IErrorHandlerDirective;
 
-public class TestJdContainerErrorHandler extends JdUserErrorHandler {
+public class TestJdContainerErrorHandler extends ErrorHandler {
 
 	@Override
-	public IJdUserDirective handle(String serializedCAS, Object userException) {
-		JdUserDirective jdUserDirective = new JdUserDirective();
-		jdUserDirective.setKillJob();
-		jdUserDirective.setKillProcess();
-		jdUserDirective.resetKillWorkItem();
-		return jdUserDirective;
+	public IErrorHandlerDirective handle(String serializedCAS, Object userException) {
+		ErrorHandlerDirective errorHandlerDirective = new ErrorHandlerDirective();
+		errorHandlerDirective.setKillJob();
+		errorHandlerDirective.setKillProcess();
+		errorHandlerDirective.resetKillWorkItem();
+		return errorHandlerDirective;
 	}
 
 }

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/user/jd/test/helper/TestJdContainerErrorHandlerRandomRetry.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/user/jd/test/helper/TestJdContainerErrorHandlerRandomRetry.java?rev=1661766&r1=1661765&r2=1661766&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/user/jd/test/helper/TestJdContainerErrorHandlerRandomRetry.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/test/java/org/apache/uima/ducc/user/jd/test/helper/TestJdContainerErrorHandlerRandomRetry.java Mon Feb 23 20:30:49 2015
@@ -20,25 +20,25 @@ package org.apache.uima.ducc.user.jd.tes
 
 import java.util.Random;
 
-import org.apache.uima.ducc.user.jd.iface.IJdUserDirective;
-import org.apache.uima.ducc.user.jd.iface.JdUserDirective;
-import org.apache.uima.ducc.user.jd.iface.JdUserErrorHandler;
+import org.apache.uima.ducc.ErrorHandler;
+import org.apache.uima.ducc.ErrorHandlerDirective;
+import org.apache.uima.ducc.IErrorHandlerDirective;
 
-public class TestJdContainerErrorHandlerRandomRetry extends JdUserErrorHandler {
+public class TestJdContainerErrorHandlerRandomRetry extends ErrorHandler {
 
 	private Random random = new Random();
 	
 	@Override
-	public IJdUserDirective handle(String serializedCAS, Object userException) {
-		JdUserDirective jdUserDirective = new JdUserDirective();
-		jdUserDirective.resetKillJob();
-		jdUserDirective.resetKillProcess();
-		jdUserDirective.resetKillWorkItem();
+	public IErrorHandlerDirective handle(String serializedCAS, Object userException) {
+		ErrorHandlerDirective errorHandlerDirective = new ErrorHandlerDirective();
+		errorHandlerDirective.resetKillJob();
+		errorHandlerDirective.resetKillProcess();
+		errorHandlerDirective.resetKillWorkItem();
 		if(random.nextBoolean()) {
-			jdUserDirective.setKillWorkItem();
+			errorHandlerDirective.setKillWorkItem();
 		}
-		System.out.println("killWorkItem="+jdUserDirective.isKillWorkItem());
-		return jdUserDirective;
+		System.out.println("killWorkItem="+errorHandlerDirective.isKillWorkItem());
+		return errorHandlerDirective;
 	}
 
 }