131
edits
DEinspanjer (talk | contribs) |
|||
Line 7: | Line 7: | ||
A setup for handling the logs at different stages of processing was proposed as follows: | A setup for handling the logs at different stages of processing was proposed as follows: | ||
1 - a script saves new buildbot logs to a directory, say ' | 1 - a script saves new buildbot logs to a directory, say 'incoming_sendjson' | ||
2 - | 2 - A Flume pipeline uses one of the exec sources [http://archive.cloudera.com/cdh/3/flume/UserGuide.html#_flume_source_catalog] to execute a script that invokes the log parser script on batches of buildbot logs sitting in the 'incoming_sendjson' directory. For each one of those files, the script will emit single line JSON objects to stdout. When the Flume agent invokes this script, it will store each line of stdout into the Hive table for JSON results. The script should move each successfully processed buildbot log file from 'incoming_sendjson' to 'incoming_sendlog' | ||
3 - | 3 - Another Flume pipeline will exec a separate script that will process batches of buildlogs sitting in the 'incoming_sendlog'. This script should cat each log file, prepending tab separated metadata in the following format (' \t ' represents a tab in the output): | ||
repo \t platform \t debug-or-opt \t builddate \t testsuite \t line-num \t single-log-line | |||
'''Example buildbot log input''' | |||
mozilla-central-macosx64-debug/1288731175/mozilla-central_snowleopard-debug_test-crashtest-build94.txt.gz: line 1 | |||
mozilla-central-macosx64-debug/1288731175/mozilla-central_snowleopard-debug_test-crashtest-build94.txt.gz: line 2 | |||
mozilla-central-macosx64-debug/1288731175/mozilla-central_snowleopard-debug_test-crashtest-build94.txt.gz: line 3 | |||
mozilla-central-macosx64-release/1288731175/mozilla-central_snowleopard-debug_test-crashtest-build94.txt.gz: line 1 | |||
mozilla-central-macosx64-release/1288731175/mozilla-central_snowleopard-debug_test-crashtest-build94.txt.gz: line 2 | |||
mozilla-central-macosx64-release/1288731175/mozilla-central_snowleopard-debug_test-crashtest-build94.txt.gz: line 3 | |||
'''Example sendlog script stdout output''' | |||
mozilla-central \t macosx64 \t debug \t 1288731175 \t crashtest \t 1 \t line 1 | |||
mozilla-central \t macosx64 \t debug \t 1288731175 \t crashtest \t 2 \t line 2 | |||
mozilla-central \t macosx64 \t debug \t 1288731175 \t crashtest \t 3 \t line 3 | |||
mozilla-central \t macosx64 \t release \t 1288731175 \t crashtest \t 1 \t line 1 | |||
mozilla-central \t macosx64 \t release \t 1288731175 \t crashtest \t 2 \t line 2 | |||
mozilla-central \t macosx64 \t release \t 1288731175 \t crashtest \t 3 \t line 3 | |||
After catting, each log is moved to a 'processed' directory. | |||
Each of the these properties will wind up being columns in the logdata database, so we should be able associate these logs with the parsed log data. If the parsed log data includes indexes into these logs, then we'll be able to retrieve a portion of the log that represents the execution of any individual test. | Each of the these properties will wind up being columns in the logdata database, so we should be able associate these logs with the parsed log data. If the parsed log data includes indexes into these logs, then we'll be able to retrieve a portion of the log that represents the execution of any individual test. |
edits