Yurik has uploaded a new change for review.
https://gerrit.wikimedia.org/r/203986
Change subject: Fixed broken weblogs2.py
......................................................................
Fixed broken weblogs2.py
Change-Id: I5e34b4b8cee4bcd5b1df66431fdab8dfea33476e
---
M scripts/weblogs2.py
1 file changed, 9 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/analytics/zero-sms
refs/changes/86/203986/1
diff --git a/scripts/weblogs2.py b/scripts/weblogs2.py
index 43023e6..8fbd441 100644
--- a/scripts/weblogs2.py
+++ b/scripts/weblogs2.py
@@ -152,11 +152,13 @@
os.environ["HADOOP_HEAPSIZE"] = "2048"
if self.settings.hiveTable == 'wmf_raw.webrequest':
- pathFunc = lambda dt:
'/mnt/hdfs/wmf/data/raw/webrequest/webrequest_upload/hourly/%s/23' \
- % strftime("%Y/%m/%d", date.timetuple())
+ pathFunc = lambda dt:\
+
'/mnt/hdfs/wmf/data/raw/webrequest/webrequest_upload/hourly/%s/23' \
+ % strftime("%Y/%m/%d", date.timetuple())
elif self.settings.hiveTable == 'wmf.webrequest':
- pathFunc = lambda dt:
'/mnt/hdfs/wmf/data/wmf/webrequest/webrequest_source=mobile/year=%s/month=%s/day=%s/hour=23'
\
- % (date.year, date.month, date.day)
+ pathFunc = lambda dt: \
+
'/mnt/hdfs/wmf/data/wmf/webrequest/webrequest_source=mobile/year=%s/month=%s/day=%s/hour=23'
\
+ % (date.year, date.month, date.day)
else:
raise 'Unknown hiveTable = ' + str(self.settings.hiveTable)
@@ -178,7 +180,7 @@
'-f', self.settings.hqlScript,
'-S', # --silent
'-d', 'table=' + self.settings.hiveTable,
- '-d', 'dsttable=' + self.settings.,
+ '-d', 'dsttable=' + self.settings.dstTable,
'-d', 'year=' + strftime("%Y", date.timetuple()),
'-d', 'month=' + strftime("%m", date.timetuple()),
'-d', 'day=' + strftime("%d", date.timetuple()),
@@ -508,7 +510,9 @@
# self.generateGraphData()
pass
+
if __name__ == '__main__':
# WebLogProcessor2('settings/weblogs2.local.json').manualRun()
import sys
+
WebLogProcessor2('settings/weblogs2.json' if len(sys.argv) < 2 else
sys.argv[1]).safeRun()
--
To view, visit https://gerrit.wikimedia.org/r/203986
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5e34b4b8cee4bcd5b1df66431fdab8dfea33476e
Gerrit-PatchSet: 1
Gerrit-Project: analytics/zero-sms
Gerrit-Branch: master
Gerrit-Owner: Yurik <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits