I have reviewed the source code of MLCP and found that the problem with the missing exit codes is caused by its error handling strategy, which basically is "log the error and continue". Was it a conscious descision to have MLCP deal with errors like this? If not, would it maybe be a quick and clean way out to make MLCP exit with a non-zero error status whenever an error is encountered? This would be relatively easy to implement by changing the calls to LOG.error to a function that logs the error and exit, and the behavior could even be made optional so that if someone relies on MLCP to continue when an error is encountered, they can have that.
I find the overall error handling strategy rather puzzling, though. In my experience, continuing after errors without corrective action calls for trouble. -Hans On Sat, Jun 17, 2017 at 9:09 PM, Hans Hübner <[email protected]> wrote: > Hello Geert, > > thank you for getting back. I have tried invoking the jar directly, but I > still get no meaningful exit status: > > imogas 1245_% java -cp /opt/mlcp-9.0.1/bin/..//conf:/ > opt/mlcp-9.0.1/bin/..//lib/avro-1.7.4.jar[ELIDED] > -DCONTENTPUMP_HOME=/opt/mlcp-9.0.1/bin/..//lib/ -DBUNDLE_ARTIFACT=apache > -Dfile.encoding=UTF-8 -Djava.library.path=/opt/mlcp-9.0.1/bin/..//lib/native > com.marklogic.contentpump.ContentPump import -input_file_path foo -host > localhost -username foo -password foo > 17/06/17 15:04:53 INFO contentpump.LocalJobRunner: Content type is set to > MIXED. The format of the inserted documents will be determined by the > MIME type specification configured on MarkLogic Server. > 17/06/17 15:04:54 INFO contentpump.ContentPump: Job name: local_675746565_1 > 17/06/17 15:04:54 ERROR contentpump.LocalJobRunner: Error checking output > specification: > 17/06/17 15:04:54 ERROR contentpump.LocalJobRunner: No input files found > with the specified input path file:/home/hans/Development/bpm-processes/foo > and input file pattern .* > imogas 1246_% echo $? > 0 > > Is there anything I'm doing wrong? > > -Hans > -- 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 [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
