示例#1
0
def main(input, output):
    with open(output, 'wb') as outfile:
        for fname in reader.smart_find_logs(input):
            print "Processing", fname
            with open(fname, 'rb') as f:
                results = pipeline.inline(f, filt)
                outfile.writelines(util.stringify(results))
示例#2
0
def main(input, output):
    for fname in reader.smart_find_logs(input):
        print "Processing", fname
        with open(fname, 'rb') as f:
            results = pipeline.inline(f, increment)
            util.exhaust(results)
    dump_counts(output)
示例#3
0
def main(input, output):
    for fname in reader.smart_find_logs(input):
        print "Processing", fname
        with open(fname, 'rb') as f:        
            results = pipeline.inline(f, increment)
            util.exhaust(results)
    dump_counts(output)
示例#4
0
def main(input, output, num_workers):
    fnames = reader.smart_find_logs(input)

    pipeline.fakepool(fnames, mapper, local_reducer, global_reducer,
                      num_workers)
    dump_counts(global_counts, output)
示例#5
0
def main(input, output, num_workers):
    fnames = reader.smart_find_logs(input)
    
    pipeline.pool(fnames, util.identity, local_reducer, global_reducer, num_workers)
        
    dump_counts(global_counts, output)
示例#6
0
def main(input, output, num_workers):
    fnames = reader.smart_find_logs(input)
    
    pipeline.fakepool(fnames, mapper, local_reducer, global_reducer, num_workers)
    dump_counts(global_counts, output)
示例#7
0
def main(input, output, num_workers):
    fnames = reader.smart_find_logs(input)        
    roller = util.rollover(output)
    pipeline.pool(fnames, mapper, util.identity, roller.writelines, num_workers)