class FilterMapper(object):def __init__(self):with open(self.params['includes'], 'r') as includes:self.include = set(int(line.strip()) for line in includes)def __call__(self, key, value):parts = value.strip().split('\t')try:cid = int(parts[4])if cid in self.include:yield (cid, value)except:passclass WriteReducer(object):def __call__(self, key, values):for val in values:yield (value, None)
'9900025-001-XL\t1354074\tweb\tcustomer\t72220\t01MAY2012:00:00:00\t999\t1\tXL\t001\t3\t29.99'
'9900025-001-L\t1411713\tE4X\tE4X\t83722\t17JUL2012:00:00:00\t999\t2\tL\t001\t1\t41.99'
'9900025-001-S\t1581147\tweb\tcustomer\t11347\t31MAR2012:00:00:00\t999\t6\tS\t001\t1\t29.99'
'9900025-001-XL\t1826870\tE4X\tE4X\t83712\t13AUG2012:00:00:00\t999\t1\tXL\t001\t1\t29.99'
--
You received this message because you are subscribed to the Google Groups "dumbo-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dumbo-user+...@googlegroups.com.
To post to this group, send email to dumbo...@googlegroups.com.
Visit this group at http://groups.google.com/group/dumbo-user.
For more options, visit https://groups.google.com/groups/opt_out.
9900025-001-XL '1354074\tweb\tcustomer\t72220\t01MAY2012:00:00:00\t999\t1\tXL\t001\t3\t29.99'
9900025-001-L '1411713\tE4X\tE4X\t83722\t17JUL2012:00:00:00\t999\t2\tL\t001\t1\t41.99'
9900025-001-S '1581147\tweb\tcustomer\t11347\t31MAR2012:00:00:00\t999\t6\tS\t001\t1\t29.99'
9900025-001-XL '1826870\tE4X\tE4X\t83712\t13AUG2012:00:00:00\t999\t1\tXL\t001\t1\t29.99'
--
You received this message because you are subscribed to a topic in the Google Groups "dumbo-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dumbo-user/g_kysvzD68c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dumbo-user+...@googlegroups.com.
To post to this group, send email to dumbo...@googlegroups.com.
Visit this group at http://groups.google.com/group/dumbo-user.
For more options, visit https://groups.google.com/groups/opt_out.