From 630e956c05604aaf8bf5b7154a01ad956b13e440 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 3 Apr 2018 02:25:03 +0000 Subject: fix silly bugs in backfiller (need more tests) --- backfill/backfill_hbase_from_cdx.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'backfill') diff --git a/backfill/backfill_hbase_from_cdx.py b/backfill/backfill_hbase_from_cdx.py index 04ae7d9..e6596d5 100755 --- a/backfill/backfill_hbase_from_cdx.py +++ b/backfill/backfill_hbase_from_cdx.py @@ -167,17 +167,18 @@ class MRCDXBackfillHBase(MRJob): raw_cdx.startswith('#')): # Skip line + # XXX: tests don't cover this path; need coverage! self.increment_counter('lines', 'invalid') - return _, status + return _, dict(status="invalid") info = transform_line(raw_cdx) if info is None: self.increment_counter('lines', 'invalid') - return + return _, dict(status="invalid") if info['file:mime'] not in self.mime_filter: self.increment_counter('lines', 'skip') - return + return _, dict(status="skip") key = info.pop('key') info['f:c'] = json.dumps(info['f:c'], sort_keys=True, indent=None) -- cgit v1.2.3