Support Questions

Find answers, ask questions, and share your expertise

Best Way to Persist NameNode Log Level?

New Contributor
On CDP Private Cloud 7.1.7, and running without rack awareness (an intentional choice due to some of the older servers running with smaller data disks), I am (as would be expected) seeing this spammed to the namenode logs:
 
2022-08-24 09:41:50,253 INFO org.apache.hadoop.hdfs.server.blockmanagement.BlockPlacementPolicy: Not enough replicas was chosen. Reason:{NO_REQUIRED_STORAGE_TYPE=1}
 
Because I'm not logging INFO messages, I can eliminate those entries with something like:
 
hadoop daemonlog -setlevel nnserverhost:9870 org.apache.hadoop.hdfs.server.blockmanagement.BlockPlacementPolicy WARN
 
What's the best way to persist that across a restart?
1 ACCEPTED SOLUTION

Expert Contributor

Hi @KCJeffro ,

 

The best possible way would be to change the log level for the thread 'org.apache.hadoop.hdfs.server.blockmanagement.BlockPlacementPolicy' to 'ERROR'. Do the following:

  1. Navigate to Cloudera Manager > HDFS > Config > search for 'NameNode Logging Advanced Configuration Snippet (Safety Valve) log4j_safety_valve'
  2. Add the following property:
    log4j.logger.org.apache.hadoop.hdfs.server.blockmanagement.BlockPlacementPolicy=ERROR

View solution in original post

1 REPLY 1

Expert Contributor

Hi @KCJeffro ,

 

The best possible way would be to change the log level for the thread 'org.apache.hadoop.hdfs.server.blockmanagement.BlockPlacementPolicy' to 'ERROR'. Do the following:

  1. Navigate to Cloudera Manager > HDFS > Config > search for 'NameNode Logging Advanced Configuration Snippet (Safety Valve) log4j_safety_valve'
  2. Add the following property:
    log4j.logger.org.apache.hadoop.hdfs.server.blockmanagement.BlockPlacementPolicy=ERROR
Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.