I noticed that when there is an error in running a PIG script, a log is generated and kept. But when there is no error, the log file is removed. Is there a way to keep the log file even when the job is successful?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
By default errors (e.g: script parsing errors) are logged to
pig.logfilewhich can be set in$PIG_HOME/conf/pig.properties. If you want to log status messages too, then prepare a validlog4j.propertiesfile and set it in thelog4jconfproperty.E.g: rename log4j.properties.template to log4j.properties in $PIG_HOME/conf and set the followings:
When using Pig v0.10.0 (r1328203) I found that a successful pig task doesn’t write the job’s history logs to the output directory on hdfs.
(
hadoop.job.history.user.location=${mapred.output.dir}/_logs/history/)If you want to have these histories by all means then set mapred.output.dir in your pig script in this way: