Sha256: 269b3bf232acd4425d548f945a5ca0bc5130a4ffa62a6871deb11fad5f7aa4ac
Contents?: true
Size: 1.57 KB
Versions: 15
Compression:
Stored size: 1.57 KB
Contents
document.write('<link rel="stylesheet" href="http://gist.github.com/stylesheets/gist/embed.css"/>') document.write('<div id=\"gist-348301\" class=\"gist\">\n \n \n \n \n\n <div class=\"gist-file\">\n <div class=\"gist-data gist-syntax\">\n \n \n \n <div class=\"gist-highlight\"><pre><div class=\'line\' id=\'LC1\'>REGISTER com.darkhax.blog.pig.jar;<\/div><div class=\'line\' id=\'LC2\'>DEFINE Parser com.darkhax.blog.pig.LogParser();<\/div><div class=\'line\' id=\'LC3\'><br/><\/div><div class=\'line\' id=\'LC4\'>logs = LOAD \'apache.log.bz2\' USING TextLoader AS (line: chararray);<\/div><div class=\'line\' id=\'LC5\'>log_events = FOREACH logs GENERATE FLATTEN(Parser(line));<\/div><div class=\'line\' id=\'LC6\'><br/><\/div><div class=\'line\' id=\'LC7\'>by_action = GROUP log_events BY action;<\/div><div class=\'line\' id=\'LC8\'>counts = FOREACH by_action GENERATE group, COUNT(log_events);<\/div><div class=\'line\' id=\'LC9\'>STORE counts INTO \'count_summary\';<\/div><\/pre><\/div>\n \n <\/div>\n\n <div class=\"gist-meta\">\n <a href=\"http://gist.github.com/raw/348301/07d20a92ce5e56bde493066a0154f200da37c953/example.pig\" style=\"float:right;\">view raw<\/a>\n <a href=\"http://gist.github.com/348301#file_example.pig\" style=\"float:right;margin-right:10px;color:#666\">example.pig<\/a>\n <a href=\"http://gist.github.com/348301\">This Gist<\/a> brought to you by <a href=\"http://github.com\">GitHub<\/a>.\n <\/div>\n <\/div>\n \n \n \n<\/div>\n')
Version data entries
15 entries across 15 versions & 1 rubygems