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))
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)
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)
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)
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)