Hi,
I've been doing more work on my JobChain that will walk a folder structure. I have a couple of questions about the way things are supposed to work as well as some observations.
I've written my Split function and it does its job of chunking the data. The first odd thing I noticed was that the Map() function gets called in the first run of the agent request handler right after split for the first chunk from my split (i.e. the first item in the Set list). All the other chunks get called on the next run of the agent request handler (perhaps when I'm doing this with the service, these sub jobs will break themselves out differently). Am I correct in assuming that it's called a job chain because the first chunk in the chain becomes the master job to which all the others are now subordinate?
The next thing I noticed was that .fTaskData seems to have a different meaning depending on which function you're in (Chris Meyer commented on that in some DA code he wrote that I looked at). In Split(), .fTaskData is whatever you originally put in; in Map(), .fTaskData is either the same as the former, or is the chunk data you put in...ok no real problem here. However, in Reduce() or Finalize(), it's whatever you put into the retVal of your Map() function. This can make it tricky to write your Fingerprint so that it stays the same as what is in the taskRec from the calling request handler. Comment to OTDEV: It would be nice to be able to access the taskRec object that has the task ID in it. CUrrently there is no pointer back to this. There is .fWorker, but it doesn't give either a fingerprint or a task ID. I am thinking about the developer that at some point is going to need to track the process of the job chain so it can be monitored, and so that operators know when it's done. On that note, I was able to pass the original fingerprint all the way through to Finalize. Penultimate question: Can I assume in a job chain that Finalize() only gets called for the master job (in this case, the first chunk that had the other chunks as children)? Final question: Is there any way of consolidating results from the child Map() calls so that in Finalize, if I had a running tally in each job, I can add them up? Currently, even though Reduce() has access to the master count as well as any child count, I'm not seeing this consolidation anywhere that Finalize has access to. At this point, it's a nice to have.
If you've read this far, congratulations, you're as big a geek as I am 
-Hugh