Warm tip: This article is reproduced from serverfault.com, please click

Analysing log files using Pig

发布于 2020-07-05 13:21:21

I am new to Pig Latin and I need to analyze a log file to check for error logs and warning logs.

How to do that ? What is the script for finding errors and warnings ?

Questioner
Tommy_SK
Viewed
0
OneCricketeer 2020-07-06 02:23:08

You would start off by LOAD-ing each line of a file as a string, then applying and extracting a regex pattern from each line, followed by a FILTER for errors and warnings.

Elasticsearch is more commonly used for log analysis instead of Hadoop tools, though.