当前位置:网站首页>Solve the problem that the MapReduce program console does not have log information warn please initialize the log4j system properly
Solve the problem that the MapReduce program console does not have log information warn please initialize the log4j system properly
2022-06-24 18:37:00 【Prosperity is like love】
function mapreduce When , No log file found , A warning will be given :
log4j:WARN No appenders could be found for logger (org.apache.hadoop.metrics2.lib.MutableMetricsFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

It is found that the console has not been output again mapreduce Task information of . Later, it was found that the configuration is required log4j.
stay resource Create one in the directory log4j.properties file 
Add the following information :
log4j.rootLogger=info, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m%n
log4j.appender.File=org.apache.log4j.DailyRollingFileAppender
log4j.appender.File.File=D:/test/logs.txt
log4j.appender.File.DatePattern='_'yyyy-MM-dd'.txt'
log4j.appender.File.layout=org.apache.log4j.PatternLayout
log4j.appender.File.layout.ConversionPattern=%d %t %-5p [%c] %m%n

边栏推荐
- Is there a security risk in opening an account online? What to do if the business department opening an account nearby is far away from home. Is there any capital requirement for opening an account?
- 696. count binary substring
- Network security database penetration of secondary vocational group in 2022
- What if the database table structure changes? Smartbi products support one click synchronization
- Does the wave of layoffs in Chinese enterprises in 2021 need to be "judged" by morality?
- Specification for self test requirements of program developers
- [can you really use es] Introduction to es Basics (I)
- Vite+web3:报错出现ReferenceError: process is not defined
- next_ Permutation full permutation function
- How does the video platform import the old database into the new database?
猜你喜欢

解决执行MapReduce程序控制台没有日志信息WARN Please initialize the log4j system properly

JS event details
[North Asia data recovery]_ mdb_ catalog. Mongodb database data recovery case in case of WT file corruption

SDL: cannot play audio after upgrading openaudio to openaudiodevice

Four security issues of low code and no code development

Creating a new MySQL user in Amazon RDS environment - creating a new MySQL user in Amazon RDS environment

Wechat applet development - Implementation of rotation chart

On software requirement analysis

Top ten popular codeless testing tools

He "painted" what a smart city should look like with his oars
随机推荐
如何在 R 中执行稳健回归
Does the wave of layoffs in Chinese enterprises in 2021 need to be "judged" by morality?
Flutter dart regular regexp matches non printing characters \cl\cj\cm\ck
微服务系统设计——接口文档管理设计
congratulate! The first dragon lizard community annual outstanding contribution award is announced. Check it now
Application service access configuration parameters
中电投先融期货这家公司怎么样?期货开户办理安全吗?
Two micro service interviews where small companies suffer losses
Huitongda officially landed at the Hong Kong Stock Exchange: the gross profit margin continued to decline, and the book value of several shareholders still suffered losses
国家出手了!对知网启动网络安全审查
Selection (033) - what is the output of the following code?
Digital transformation informatization data planning and technology planning
Seven strategies for successfully integrating digital transformation
Regression testing strategy for comprehensive quality assurance system
Architecture decryption from distributed to microservice: several common microservice architecture schemes
SAP license: what is ERP supply chain
R中的指数回归
(Video + graphics) introduction to machine learning series - Chapter 11 support vector machines
Sword finger offer 10- ii Frog jumping on steps
130. surrounding area