Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8413591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:56:52+00:00 2026-06-10T00:56:52+00:00

I noticed that when there is an error in running a PIG script, a

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T00:56:53+00:00Added an answer on June 10, 2026 at 12:56 am

    By default errors (e.g: script parsing errors) are logged to pig.logfile which can be set in $PIG_HOME/conf/pig.properties. If you want to log status messages too, then prepare a valid log4j.properties file and set it in the log4jconf property.

    E.g: rename log4j.properties.template to log4j.properties in $PIG_HOME/conf and set the followings:

    log4j.logger.org.apache.pig=info, B
    
    # ***** A is set to be a ConsoleAppender.
    #log4j.appender.A=org.apache.log4j.ConsoleAppender
    # ***** A uses PatternLayout.
    #log4j.appender.A.layout=org.apache.log4j.PatternLayout
    #log4j.appender.A.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
    
    # ***** B is set to be a FileAppender.
    log4j.appender.B=org.apache.log4j.FileAppender
    #log4j.appender.B.File=/home/user/pig-distrib/logs/pig_success.log
    log4j.appender.B.File=/home/user/pig-distrib/logs/pig.log
    log4j.appender.B.layout=org.apache.log4j.PatternLayout
    log4j.appender.B.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
    log4j.appender.B.Append=true
    

    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:

    set mapred.output.dir '/user/hadoop/test/output';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I started using Zend_Paginator, it works everything fine but I noticed that there is
I'm currently running on the Developer Preview of Xcode. And I noticed that there
I noticed that there are two sets of Hadoop configuration parameters: one with mapred.*
I noticed that there's a whole bunch of different content types, some of them
I have noticed that there are strange requests to my website trying to find
I was following a tutorial and i noticed that there was a linearlayout that
In Firebug (with the FirePHP plugin) I noticed that there is no communication with
I am implementing the superfish menu and have noticed that there is a funny
I've just started to play with CodeIgniter 1.7.2 and imendialtly noticed that there is
After tracing the DB activity from a DNN 5.2.3 site I noticed that there

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.