svn commit: r1852180 - in /uima/uima-ducc/trunk: uima-ducc-examples/pom.xml uima-ducc-parent/pom.xml
Author: cwiklik Date: Fri Jan 25 21:16:48 2019 New Revision: 1852180 URL: http://svn.apache.org/viewvc?rev=1852180=rev Log: UIMA-5970 modified poms to fix compile errors. The examples are now dependent on pullservie Modified: uima/uima-ducc/trunk/uima-ducc-examples/pom.xml uima/uima-ducc/trunk/uima-ducc-parent/pom.xml Modified: uima/uima-ducc/trunk/uima-ducc-examples/pom.xml URL: http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-examples/pom.xml?rev=1852180=1852179=1852180=diff == --- uima/uima-ducc/trunk/uima-ducc-examples/pom.xml (original) +++ uima/uima-ducc/trunk/uima-ducc-examples/pom.xml Fri Jan 25 21:16:48 2019 @@ -61,6 +61,11 @@ uima-ducc-cli + + org.apache.uima + uima-ducc-pullservice + + org.apache.uima uima-ducc-sm Modified: uima/uima-ducc/trunk/uima-ducc-parent/pom.xml URL: http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-parent/pom.xml?rev=1852180=1852179=1852180=diff == --- uima/uima-ducc/trunk/uima-ducc-parent/pom.xml (original) +++ uima/uima-ducc/trunk/uima-ducc-parent/pom.xml Fri Jan 25 21:16:48 2019 @@ -269,6 +269,12 @@ ${uimaDUCCNoticeText} ${project.version} + + org.apache.uima + uima-ducc-pullservice + ${project.version} + + org.apache.uima uima-ducc-orchestrator
svn commit: r1852177 - /uima/uima-ducc/trunk/src/main/admin/stop_ducc
Author: degenaro Date: Fri Jan 25 20:36:19 2019 New Revision: 1852177 URL: http://svn.apache.org/viewvc?rev=1852177=rev Log: UIMA-5742 Reliable DUCC > default to --stop Modified: uima/uima-ducc/trunk/src/main/admin/stop_ducc Modified: uima/uima-ducc/trunk/src/main/admin/stop_ducc URL: http://svn.apache.org/viewvc/uima/uima-ducc/trunk/src/main/admin/stop_ducc?rev=1852177=1852176=1852177=diff == --- uima/uima-ducc/trunk/src/main/admin/stop_ducc (original) +++ uima/uima-ducc/trunk/src/main/admin/stop_ducc Fri Jan 25 20:36:19 2019 @@ -253,13 +253,18 @@ class StopDucc(DuccUtil): group1.add_argument(self.option_agents, action='store_true', help=self.help_agents) group1.add_argument(self.option_nodelist, '-n', action='append', help=self.help_nodelist) group1.add_argument(self.option_component, '-c', action='append', help=self.help_component) -group2 = self.parser.add_mutually_exclusive_group(required=True) +group2 = self.parser.add_mutually_exclusive_group() group2.add_argument(self.option_kill, '-k', action='store_true', help=self.help_kill) group2.add_argument(self.option_stop, '-s', action='store', type=int, nargs='?', const=self.default_stop, help=self.help_stop) group2.add_argument(self.option_quiesce, '-q', action='store_true', help=self.help_quiesce) self.parser.add_argument(self.option_maxthreads, '-m', action='store', type=int, default=None, help=self.help_maxthreads) self.parser.add_argument(self.option_debug, '-d', action='store_true', help=self.help_debug) self.args = self.parser.parse_args() +# mutual choice +if(not self.args.kill): +if(not self.args.quiesce_then_stop): +if(self.args.stop == None): +self.args.stop = self.default_stop # special cases if(self.args.kill): if(self.args.maxthreads == None):
svn commit: r1852172 - /uima/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/launcher/DuccCommandExecutor.java
Author: cwiklik Date: Fri Jan 25 19:49:06 2019 New Revision: 1852172 URL: http://svn.apache.org/viewvc?rev=1852172=rev Log: UIMA-5960 removed debug logging Modified: uima/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/launcher/DuccCommandExecutor.java Modified: uima/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/launcher/DuccCommandExecutor.java URL: http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/launcher/DuccCommandExecutor.java?rev=1852172=1852171=1852172=diff == --- uima/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/launcher/DuccCommandExecutor.java (original) +++ uima/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/launcher/DuccCommandExecutor.java Fri Jan 25 19:49:06 2019 @@ -801,13 +801,11 @@ public class DuccCommandExecutor extends String classpath=""; if ( jd ) { for( String option : ((JavaCommandLine) cmdLine).getOptions() ) { - logger.info("getDeployableCommandLine",null,"+ "+option); if ( option.startsWith("-Dducc.deploy.UserClasspath") ) { classpath = option.split("=")[1]; break; } } - logger.info("getDeployableCommandLine",null," User Classpath:"+classpath); } else { classpath = ((JavaCommandLine) cmdLine).getClasspath(); } @@ -834,11 +832,9 @@ public class DuccCommandExecutor extends } if ( jd ) { - logger.info("getDeployableCommandLine",null," JD UserClasspath:"+classpath); // JD uses classloader separation to run user specified jars. ((JavaCommandLine) cmdLine).replaceOption("-Dducc.deploy.UserClasspath", classpath); } else { - logger.info("getDeployableCommandLine",null," Not JD - Classpath:"+classpath); ((JavaCommandLine) cmdLine).setClasspath(classpath); }
svn commit: r1852165 - in /uima/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/example/service: ./ processor/ processor/CustomProcessor.java
Author: cwiklik Date: Fri Jan 25 19:03:20 2019 New Revision: 1852165 URL: http://svn.apache.org/viewvc?rev=1852165=rev Log: UIMA-5970 Added new example of CustomProcessor for the pullservice Added: uima/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/example/service/ uima/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/example/service/processor/ uima/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/example/service/processor/CustomProcessor.java Added: uima/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/example/service/processor/CustomProcessor.java URL: http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/example/service/processor/CustomProcessor.java?rev=1852165=auto == --- uima/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/example/service/processor/CustomProcessor.java (added) +++ uima/uima-ducc/trunk/uima-ducc-examples/src/main/java/org/apache/uima/ducc/example/service/processor/CustomProcessor.java Fri Jan 25 19:03:20 2019 @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +*/ + +package org.apache.uima.ducc.example.service.processor; + +import org.apache.uima.ducc.ps.service.errors.ServiceInitializationException; +import org.apache.uima.ducc.ps.service.processor.IProcessResult; +import org.apache.uima.ducc.ps.service.processor.IServiceProcessor; + +public class CustomProcessor implements IServiceProcessor { + + @Override + public void initialize() throws ServiceInitializationException { + + } + + @Override + public IProcessResult process(String serializedTask) { + return new SimpleResult(); + } + + @Override + public void stop() { + + } + + @Override + public void setScaleout(int scaleout) { + + } + + @Override + public int getScaleout() { + return 1; + } + + @Override + public void setErrorHandlerWindow(int maxErrors, int windowSize) { + + } + public class SimpleResult implements IProcessResult { + + @Override + public boolean terminateProcess() { + // TODO Auto-generated method stub + return false; + } + + @Override + public String getResult() { + // TODO Auto-generated method stub + return ""; + } + + @Override + public String getError() { + // TODO Auto-generated method stub + return ""; + } + + @Override + public Exception getExceptionObject() { + // TODO Auto-generated method stub + return null; + } + + } +}
svn commit: r1852147 - /uima/uima-ducc/trunk/src/main/admin/ducc_post_install
Author: degenaro Date: Fri Jan 25 15:55:30 2019 New Revision: 1852147 URL: http://svn.apache.org/viewvc?rev=1852147=rev Log: UIMA-5742 Reliable DUCC > facilitate specification of broker pw for ducc_post_install Modified: uima/uima-ducc/trunk/src/main/admin/ducc_post_install Modified: uima/uima-ducc/trunk/src/main/admin/ducc_post_install URL: http://svn.apache.org/viewvc/uima/uima-ducc/trunk/src/main/admin/ducc_post_install?rev=1852147=1852146=1852147=diff == --- uima/uima-ducc/trunk/src/main/admin/ducc_post_install (original) +++ uima/uima-ducc/trunk/src/main/admin/ducc_post_install Fri Jan 25 15:55:30 2019 @@ -78,6 +78,9 @@ class PostInstall(): print " [-d, --db-password] " print "This is the password DUCC uses to manage the database." print "" +print " [-b, --br-password] " +print "This is the password DUCC uses to manage the broker." +print "" print " [-h, -? --help]" print "Prints this message." print "" @@ -111,6 +114,8 @@ class PostInstall(): def configure_broker(self): cf = self.DUCC_HOME+"/resources.private/ducc-broker-credentials.properties" # create file if it does not exist +if(self.broker_pw == None): +self.broker_pw = self.generate_pw() if ( not os.path.exists(cf) ): # create file with username & password print "broker configuration create" @@ -118,7 +123,7 @@ class PostInstall(): line = 'ducc.broker.admin.username=admin'+'\n' print line f.write(line) -line = 'ducc.broker.admin.password='+self.generate_pw()+'\n' +line = 'ducc.broker.admin.password='+self.broker_pw+'\n' print line f.write(line) # update existing file @@ -134,7 +139,7 @@ class PostInstall(): line = 'ducc.broker.admin.username=admin'+'\n' print line if 'ducc.broker.admin.password=' in line: -line = 'ducc.broker.admin.password='+self.generate_pw()+'\n' +line = 'ducc.broker.admin.password='+self.broker_pw+'\n' print line f.write(line) return @@ -460,10 +465,11 @@ class PostInstall(): self.database_host_list = None self.database_user = None self.database_pw = None +self.broker_pw = None self.path_to_java = None try: -opts, args = getopt.getopt(argv, 'a:m:o:u:d:j:k:n:h?', ['db-automanage=', 'db-home=', 'db-host-list=', 'db-user=', 'db-password=', 'jvm=', 'keystore=', 'head-node=', 'help']) +opts, args = getopt.getopt(argv, 'a:m:o:u:d:b:j:k:n:h?', ['db-automanage=', 'db-home=', 'db-host-list=', 'db-user=', 'db-password=', 'br-password=', 'jvm=', 'keystore=', 'head-node=', 'help']) except: self.usage("Invalid arguments " + ' '.join(argv)) @@ -483,6 +489,8 @@ class PostInstall(): self.database_user = a if o in ('-d', '--db-password'): self.database_pw = a +if o in ('-b', '--br-password'): +self.broker_pw = a if o in ('-k', '--keystore'): self.keystore_pw = a if o in ('-j', '--jvm'):