[Swift-user] How can one force ordering into swift operations

Glen Hocky hockyg at gmail.com
Thu Jan 24 10:41:35 CST 2013


Yes, for example in your case, a mapper might look like (using the "ext"
mapper type)

...

split -l NLINES INPUTFILE # split makes a bunch of files like xaa, xab, xac
...
splitfiles=$(find -name 'x*')
count=0
for file in $splitfiles;do
    echo "[$count] $file"
    count=$(($count+1))
done

...


On Thu, Jan 24, 2013 at 11:13 AM, Lorenzo Pesce <lpesce at uchicago.edu> wrote:

> So that I return an array of files of unknown size (don't know how many
> files they will be) to the calling swift script?
>
>
> On Jan 24, 2013, at 10:08 AM, Glen Hocky wrote:
>
> Lorenzo,
> This may not work for your purposes, but a simple solution similar to what
> I do, is to actually do step 1 in the wrapper before the mapping is done.
> This guarantees that all files are in place.
>
> Best,
> Glen
>
>
> On Thu, Jan 24, 2013 at 10:43 AM, Lorenzo Pesce <lpesce at uchicago.edu>wrote:
>
>> I have a simple problem:
>> step 1: I run an app that splits a file in a group of files and we don't
>> know how many they are.
>> step2: I want to map those files using a mapper after the fact
>>
>> Problem is that the mapper doesn't know that it can't run till step 1 is
>> done because it has no input files. How can I tell the mapper (and what
>> follows it by consequence since those files will not be there) that it has
>> to wait for step 1 to b finished?
>>
>> Thanks,
>>
>>  Lorenzo
>> _______________________________________________
>> Swift-user mailing list
>> Swift-user at ci.uchicago.edu
>> https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-user/attachments/20130124/48b8d971/attachment.html>


More information about the Swift-user mailing list