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 9117889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:00:22+00:00 2026-06-17T05:00:22+00:00

How to control logging functionality in hadoop? Hadoop uses default log4j.properties file for controlling

  • 0

How to control logging functionality in hadoop? Hadoop uses default log4j.properties file for controlling logs. My use case is to control logs generated by my classes.

Hadoop daemons like JobTracker, TaskTracker, NameNode and DataNode daemon processes use log4j.properties file from their respective host node’s hadoop-conf-directory. The rootLogger is set to “INFO,console” which logs all message at level INFO to the console.

I trigger hadoop jobs using Oozie Workflow. I tried passing my custom log4j.properties file to the job by setting -Dlog4j.configuration=path/to/log4j.properties system property, but it is not working. Still, it takes log4j properties from the default one.

I am not supposed to touch default log4j.properties file.

I am using Oozie-v3.1.3-incubating, hadoop-v0.20 and cloudera CDH-v4.0.1.

How can I override the default log4j.properties file ?? or
How can I control logs for my classes ??

  • 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-17T05:00:23+00:00Added an answer on June 17, 2026 at 5:00 am

    What specifically are you trying to achieve with your own Log4J file? I ask because the logs are distributed across your cluster, but by logging them to the rootLogger, you should be able to see them via the job tracker (by drilling down on the Job task attempts).

    If you want to utilize rolling files then you have a difficult time retrieving those files later (again because they are distributed across your task nodes).

    If you want to dynamically set log levels, this should be simple enough:

    public static Logger log = Logger.getLogger(MyMapper.class);
    
    @Override
    protected void setup(Context context) throws IOException,
            InterruptedException {
        log.setLevel(Level.WARN);
    }
    

    If you want to add you own appenders, then you should be able to do this programmatically (see this SO Question), in the setup method as above.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

is it possible to use java.util.Logging and log to a file in a java
in web page ,image control and file upload are there.if click file upload and
Currently I have a static class that I use as my logging module. I’ve
I'm using a WinForms TextBox control for logging. It's been set as multiline with
I want to have more control over macros such as assertions (and some logging
We'd like clients to be able to control logging levels in our client JAR.
The default behavior of concurrency control is to expire the original session. However, I
I want to be able to dynamically control the level of logging my Azure
Scenario: I have a web application (SnapshotServer) which uses a WebBrowser control to take
I'm a little unsure about how to set up functionality for a login/logout control

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.