spark 修改默认log4j.properties 配置
spark-submit \
--files ${CONF_DIR}/log4j-driver.properties,${CONF_DIR}/log4j-executor.properties \
--driver-java-options "-Dlog4j.configuration=log4j-driver.properties" \
--conf spark.executor.extraJavaOptions="-Dlog4j.configuration=log4j-executor.properties" \
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Set everything to be logged to the console
log4j.rootLogger=INFO, file
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.append=true
log4j.appender.file.file=${spark.yarn.app.container.log.dir}/spark.log
log4j.appender.file.MaxFileSize=50MB
log4j.appender.file.MaxBackupIndex=5
log4j.logger.org.apache.spark=INFO
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %p [%t] %c{1}:%L - %m%n
# Set the default spark-shell log level to WARN. When running the spark-shell, the
# log level for this class is used to overwrite the root logger's log level, so that
# the user can have different defaults for the shell and regular Spark apps.
log4j.logger.org.apache.spark.repl.Main=INFO
# Settings to quiet third party logs that are too verbose
log4j.logger.org.spark_project.jetty=WARN
log4j.logger.org.spark_project.jetty.util.component.AbstractLifeCycle=ERROR
log4j.logger.org.apache.spark.repl.SparkIMain$exprTyper=INFO
log4j.logger.org.apache.spark.repl.SparkILoop$SparkILoopInterpreter=INFO
log4j.logger.org.apache.parquet=ERROR
log4j.logger.parquet=ERROR
# SPARK-9183: Settings to avoid annoying messages when looking up nonexistent UDFs in SparkSQL with Hive support
log4j.logger.org.apache.hadoop.hive.metastore.RetryingHMSHandler=FATAL
log4j.logger.org.apache.hadoop.hive.ql.exec.FunctionRegistry=ERROR
说明:用户 xxx.jar 中的resources/log4j.properties 会覆盖集群配置,如果用户无resources/log4j.properties 那么加载 --files 中的classpath的 log4j.properties.
spark 修改默认log4j.properties 配置的更多相关文章
- log4j.properties配置详解与实例
log4j.properties配置详解与实例 第一步:加入log4j-1.x.x.jar到lib下. 第二步:在工程的src下下建立log4j.properties.内容如下: #OFF,syste ...
- Log4j:log4j.properties 配置解析
Log4j 三个主要组件 Loggers(记录器):记录日志的工具,程序中就是用它来记录我们想要的日志信息. Appenders (输出源):日志输出到什么地方,可以是控制台.文件.流位置.数据库,等 ...
- Log4j介绍,log4j.properties配置详解
http://www.cnblogs.com/simle/archive/2011/09/29/2195341.html本文主要解释log4j的配置文件各个配置项的含义,内容是从网上转载的 1.Log ...
- Hibernate4搭建Log4J日志管理(附Log4j.properties配置详解)
1.首先加入slf4j的jar包,即slf4j-api-1.6.1.jar 在hibernate官网下载hibernate-release-4.2.2.Final.zip并解压,在hibernate- ...
- log4j.properties配置内容的理解
一直知道log4j是用来记录日志的,但一直没去看log4j到底是怎么用的,这两天看了几个log4j.properties配置语句详解的帖子,在这里简陋地记录一下. 在完全不知道log4j怎么用的时候, ...
- Log4j.properties配置详细解读
Log4j.properties配置 Log4j有三个主要的组件:Loggers(记录器),Appenders (输出源)和Layouts(布局).这里可简单理解为日志类别,日志要输出的地方和日志以 ...
- Flume中的flume-env.sh和log4j.properties配置调整建议(图文详解)
GC是内存的回收的意思. Flume中的flume-env.sh配置调整建议 [hadoop@master conf_HostInterceptor]$ pwd /home/hadoop/app/fl ...
- log4j日志文件 log4j.xml log4j.properties配置
1,导入log4j jar包; 2,配置log4j.xml或log4j.properties文件; ------------------------------------------------- ...
- commons-logging和Log4j 日志管理/log4j.properties配置详解
commons-logging和Log4j 日志管理 (zz) 什么要用日志(Log)? 这个……就不必说了吧. 为什么不用System.out.println()? 功能太弱:不易于控制.如果暂时不 ...
随机推荐
- Tcp与Http
TCP协议对应传输层,而HTTP协议对应应用层.Http协议是建立在TCP协议基础之上的.当浏览器需要从服务器获取网页数据的时候,会发出一次Http请求.Http会通过TCP建立起一个到服务器的连接通 ...
- ESA2GJK1DH1K升级篇: 快速的移植升级程序到自己的项目(APP用户程序制作)
前言 用户程序比较简单,但是起着至关重要的作用 用户程序是和BootLoader程序相互配合的 拷贝文件到自己的项目 APP用户程序的 stmflash.c stmflash.h 和 上一节的Boot ...
- Via板载声卡底噪严重、播放卡顿及耳机与扬声器音源切换问题【解决方法】
HD VDeck[VIA威盛HD audio系列音频驱动] 关闭音效增强之后,一切正常............ 默默骂一句VIA沙雕 另外附上:开启耳机和扬声器独立音源的设置 注册表 Computer ...
- [转]Visual Studio 2017各版本安装包离线下载、安装全解析
Visual Studio 2017各版本安装包离线下载.安装全解析 2017-3-10 11:15:03来源:IT之家作者:寂靜·櫻花雨责编:晨风评论:165 感谢IT之家网友 寂靜·櫻花雨的投 ...
- 仅逗oier们一笑(不定期更新中)(update.2019年12月8日)
CCF的正确解释: //部分来自:朝阳的二愣子的CSDN博客.ydclyq 的博客 .拱垲的博客.Randolph's Blog. 编译下列程序,会有意想不到的惊喜哦(注意打开声音): #includ ...
- js中的require、define、export、import【转】
原文链接:https://www.cnblogs.com/libin-1/p/7127481.html 为什么有模块概念 理想情况下,开发者只需要实现核心的业务逻辑,其他都可以加载别人已经写好的模块. ...
- 关于DataTable内部索引已损坏的问题 System.Data.RBTree
1.错误提示: 最近,Winform程序在极其偶然的情况下会遇到如下错误提示 Framework 版本: v4.0.30319 说明: 由于未经处理的异常,进程终止. 异常信息: System.Inv ...
- SpringBoot第十四篇:统一异常处理
作者:追梦1819 原文:https://www.cnblogs.com/yanfei1819/p/10984081.html 版权声明:本文为博主原创文章,转载请附上博文链接! 引言 本文将谈论 ...
- python3 四舍五入(0.5可以进1)
今天做了一个题要求四舍五入,然后找了一个方法:round()可以四舍五入, 试了试1.5--->2 试了试0.5--->0 !!!! 找了几个方法说可以的: # 方法一: from _ ...
- main 函数返回值
[1]main函数 [2]main() 经典的C风格函数头,如下: main() 在C语言中,省略返回类型相当于说函数的类型为int. 但是,需要明确,C++逐步淘汰了这种用法. 另外,在C语言中,让 ...