Hi Hans, Tim, To my knowledge the Java code does return with exit statuses depending on outcome. It looks though they are not properly propagated through mlcp.sh/bat. I’ll see if I can file a bug report for this. In the meantime you could invoking the jar directly according to the rules in the mlcp scripts.
Kind regards, Geert From: <general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>> on behalf of Hans Hübner <hans.hueb...@lambdawerk.com<mailto:hans.hueb...@lambdawerk.com>> Reply-To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Date: Saturday, June 17, 2017 at 8:44 AM To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Subject: Re: [MarkLogic Dev General] MLCP Error Return Hi, I would like to express our interest in seeing this be fixed as well. Having to parse mlcp's output to determine whether it failed is rather brittle. What is MarkLogic's approach to robust automation of processes that involve mlcp? Thanks, Hans On Fri, May 12, 2017 at 2:33 PM, Timothy Pearce <timothy.pea...@sae.org<mailto:timothy.pea...@sae.org>> wrote: Hello, I’m currently working on improving the continuous integration system I currently have which uses Jenkins. It’s deploying our modules into the database via MLCP and the XDBC server. I am seeing one issue with the mlcp script and it is not returning any errors via exit code when it fails to updated a document because it is locked. It is returning exit 0 with “exit $?” tacked on to the end of the run after the mlcp.sh script is called. Is there any way to get this to throw a non 0 exit code on error? I’m not seeing any reference to checking if it the script ran with success or parameters to add that in the mlcp documentation. For a snippet of the mlcp’s logging which shows the error: 17/05/11 15:10:41 INFO contentpump.FileAndDirectoryInputFormat: Total input paths to process : 14 17/05/11 15:10:43 INFO contentpump.LocalJobRunner: completed 100% 17/05/11 15:10:43 ERROR mapreduce.ContentWriter: XDMP-LOCKED: Document or Directory is locked 17/05/11 15:10:43 WARN mapreduce.ContentWriter: Failed document /utils/a.xqy in file:/modules/utils/a.xqy 17/05/11 15:10:46 ERROR mapreduce.ContentWriter: XDMP-LOCKED: Document or Directory is locked 17/05/11 15:10:46 WARN mapreduce.ContentWriter: Failed document /utils/b.xqy in file:/modules/utils/b.xqy 17/05/11 15:10:46 INFO contentpump.LocalJobRunner: com.marklogic.mapreduce.MarkLogicCounter: 17/05/11 15:10:46 INFO contentpump.LocalJobRunner: INPUT_RECORDS: 143 17/05/11 15:10:46 INFO contentpump.LocalJobRunner: OUTPUT_RECORDS: 143 17/05/11 15:10:46 INFO contentpump.LocalJobRunner: OUTPUT_RECORDS_COMMITTED: 143 17/05/11 15:10:46 INFO contentpump.LocalJobRunner: OUTPUT_RECORDS_FAILED: 0 17/05/11 15:10:46 INFO contentpump.LocalJobRunner: Total execution time: 4 sec + exit 0 I’ve verified that the file was not overwritten via adding data to a file stored in marklogic and using mlcp to replace the file, then querying with fn:doc to verify the data was removed. It did not replace the file. Any guidance to helping verify the files were actually written into marklogic would be appreciated. Thanks, Tim Nothing in this message is intended to constitute an electronic signature unless a specific statement to the contrary is included in this message. Confidentiality Note: This message is intended only for the person or entity to which it is addressed. It may contain confidential and/or proprietary material. Any review, transmission, dissemination or other use, or taking of any action in reliance upon this message by persons or entities other than the intended recipient is prohibited. If you received this message in error, please contact the sender and delete it from your computer. _______________________________________________ General mailing list General@developer.marklogic.com<mailto:General@developer.marklogic.com> Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general -- LambdaWerk GmbH Oranienburger Straße 87/89 10178 Berlin Phone: +49 30 555 7335 0 Fax: +49 30 555 7335 99 HRB 169991 B Amtsgericht Charlottenburg USt-ID: DE301399951 Geschäftsführer: Hans Hübner http://lambdawerk.com/
_______________________________________________ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general