Parse logs for errors
In this recipe, we will look at how to parse logs and quickly find errors. There are job logs, which are aggregated on HDFS, logs which include daemon logs, system logs, and so on.
We will look at some keywords and commands to find the errors in logs.
Getting ready
To complete the recipe, the user must have a running Hadoop cluster, must have completed the Setting up multi-node HBase cluster recipe in Chapter 9, HBase Administration, and know Bash or Perl/Python scripting basics.
How to do it...
- Connect to the
edge1.cyrus.com
node in the cluster and switch to userhadoop
. However, we can connect to any node in the cluster from which we can access the logs. - The location of the YARN logs on the cluster is exported as NFS export and mounted at location
/logs/hadoop
on the Edge node. Refer to the HDFS as NFS export recipe. - All the other logs, such as system and daemon logs, from the cluster are exported to the location
/logs/system
. - If the user is not from a Linux system background...