You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by bu...@apache.org on 2015/11/20 16:40:55 UTC
svn commit: r1715378 -
/uima/sandbox/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/CliFixups.java
Author: burn
Date: Fri Nov 20 15:40:55 2015
New Revision: 1715378
URL: http://svn.apache.org/viewvc?rev=1715378&view=rev
Log:
UIMA-4696 Remove buggy unnecessary hack for pre-2.0 services
Modified:
uima/sandbox/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/CliFixups.java
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/CliFixups.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/CliFixups.java?rev=1715378&r1=1715377&r2=1715378&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/CliFixups.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/CliFixups.java Fri Nov 20 15:40:55 2015
@@ -21,8 +21,6 @@ package org.apache.uima.ducc.cli;
import java.util.Properties;
-import org.apache.uima.ducc.common.utils.Utils;
-
/*
* Sites that have old code built against a pre-release version of DUCC may replace this class
* by one that corrects any deprecated options, e.g. changing --process_environment to --environment
@@ -74,30 +72,15 @@ public class CliFixups {
}
static void cleanupProps(Properties props, String className) {
- // Augment CP if the SM issues a DuccServiceSubmit with the classpath_order option
- // (Always invoked with a service properties file)
- if (className.equals(DuccServiceSubmit.class.getName())) {
- String cpOrder = props.getProperty("classpath_order");
- String cp = props.getProperty("classpath");
- if (cpOrder != null && cp != null) {
- String duccHome = Utils.findDuccHome();
- String uimaCp = duccHome + "/apache-uima/lib/*:" + duccHome + "/apache-uima/apache-activemq/lib/*:"
- + duccHome + "/apache-uima/apache=activemq/lib/optional/*";
- if (cpOrder.equals("ducc-before-user")) {
- cp = uimaCp + ":" + cp;
- } else {
- cp = cp + ":" + uimaCp;
- }
- props.put("classpath", cp);
- System.out.println("CLI added UIMA jars to classpath of pre-2.0 service");
- }
- }
+
+ // >>> Removed the hack that added UIMA jars to the classpath of services registered with DUCC 1.x but
+ // >>> started with 2.0 --- had a bug and just delayed the need for the user to provide a complete classpath.
changeOption("process_DD", "process_descriptor_DD", props);
changeOption("instance_memory_size", "memory_size", props);
changeOption("classpath_order", null, props);
changeOption("process_thread_count", "process_pipeline_count", props);
- // Ignore option if number_of_instances = 1 ... reject any other value
+ // Remove number_of_instaces only if = 1 ... leave any other value to be rejected
String val = props.getProperty("number_of_instances");
if (val != null && val.trim().equals("1")) {
changeOption("number_of_instances", null, props);