What you describe is a 4 hour process from the shell script's perspective, but from MarkLogic's perspective, it's a series of independent requests. That means this is something you'll need to do outside of MarkLogic.
Looks like the Linux timeout command will do what you need<https://unix.stackexchange.com/questions/74851/how-to-constraint-time-a-program-runs-in-linux>. -- Dave Cassel Developer Community Manager MarkLogic Corporation<http://www.marklogic.com/> Cell: +1-484-798-8720 From: Rashmi Ranjan Acharya <[email protected]<mailto:[email protected]>> Reply-To: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Date: Tuesday, November 4, 2014 at 9:31 AM To: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Subject: Re: [MarkLogic Dev General] Executing CORB with a time limit Dave, Thank you for quick reply!!! In this case, CORB is dealing with huge number of document Uris, whereas module transaction time is very small. Requirement is to terminate the process if it takes more than a particular time and we are running this using a shell script. Suppose the job takes 4 hours to process all Uris but we are having a limit of 3 hours and also we don't want to rollback the operation for the processed Uris. Whatever Uris are not processed but present in the queue, we are fine to skip them. Please suggest a way to implement this scenario. Regards, Rashmi Ranjan Acharya TATA Consultancy Services, Kolkata, India, Cell: +91-9874844188 Sent from my iPhone On 04-Nov-2014, at 7:03 pm, Dave Cassel <[email protected]<mailto:[email protected]>> wrote: Rashmi, Does this mean that if the job does not finish within a specified period, it should be terminated? It's useful to remember that Corb is not doing one big transaction; it is serializing a bunch of small transactions to accomplish some goal. With that in mind, if the overall Corb process were terminated because it took too long, it would not roll back the transactions that it had completed. Corb runs a particular module on a series of URIs; if your goal is to make sure that the module doesn't spend too much time on one particular URI, you can limit the default time limit of the XDBC app server. Suppose you set that to 30 seconds; then any URI that required more than 30 seconds of processing would fail, thus achieving an upper limit on a per-document basis. Note that you'd be left with some documents successfully updated (those that took < 30 seconds) and some that failed (those that took > 30 seconds). Dave. -- Dave Cassel Developer Community Manager MarkLogic Corporation<http://www.marklogic.com/> Cell: +1-484-798-8720 From: Rashmi Ranjan Acharya <[email protected]<mailto:[email protected]>> Reply-To: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Date: Tuesday, November 4, 2014 at 6:13 AM To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: [MarkLogic Dev General] Executing CORB with a time limit Hi All, Is there any way to run a CORB with a particular time limit? I am executing CORB through shell script with Java class path. Thanks in advance!!! Rashmi Ranjan Acharya TATA Consultancy Services, Kolkata, India Cell:+91-9874844188 _______________________________________________ General mailing list [email protected]<mailto:[email protected]> http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected]<mailto:[email protected]> http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
