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 配置的更多相关文章

  1. log4j.properties配置详解与实例

    log4j.properties配置详解与实例 第一步:加入log4j-1.x.x.jar到lib下. 第二步:在工程的src下下建立log4j.properties.内容如下: #OFF,syste ...

  2. Log4j:log4j.properties 配置解析

    Log4j 三个主要组件 Loggers(记录器):记录日志的工具,程序中就是用它来记录我们想要的日志信息. Appenders (输出源):日志输出到什么地方,可以是控制台.文件.流位置.数据库,等 ...

  3. Log4j介绍,log4j.properties配置详解

    http://www.cnblogs.com/simle/archive/2011/09/29/2195341.html本文主要解释log4j的配置文件各个配置项的含义,内容是从网上转载的 1.Log ...

  4. Hibernate4搭建Log4J日志管理(附Log4j.properties配置详解)

    1.首先加入slf4j的jar包,即slf4j-api-1.6.1.jar 在hibernate官网下载hibernate-release-4.2.2.Final.zip并解压,在hibernate- ...

  5. log4j.properties配置内容的理解

    一直知道log4j是用来记录日志的,但一直没去看log4j到底是怎么用的,这两天看了几个log4j.properties配置语句详解的帖子,在这里简陋地记录一下. 在完全不知道log4j怎么用的时候, ...

  6. Log4j.properties配置详细解读

    Log4j.properties配置 Log4j有三个主要的组件:Loggers(记录器),Appenders  (输出源)和Layouts(布局).这里可简单理解为日志类别,日志要输出的地方和日志以 ...

  7. Flume中的flume-env.sh和log4j.properties配置调整建议(图文详解)

    GC是内存的回收的意思. Flume中的flume-env.sh配置调整建议 [hadoop@master conf_HostInterceptor]$ pwd /home/hadoop/app/fl ...

  8. log4j日志文件 log4j.xml log4j.properties配置

    1,导入log4j  jar包; 2,配置log4j.xml或log4j.properties文件; ------------------------------------------------- ...

  9. commons-logging和Log4j 日志管理/log4j.properties配置详解

    commons-logging和Log4j 日志管理 (zz) 什么要用日志(Log)? 这个……就不必说了吧. 为什么不用System.out.println()? 功能太弱:不易于控制.如果暂时不 ...

随机推荐

  1. 洛谷 P1182 数列分段 Section II

    洛谷 P1182 数列分段 Section II 洛谷传送门 题目描述 对于给定的一个长度为N的正整数数列A-iA−i,现要将其分成M(M≤N)M(M≤N)段,并要求每段连续,且每段和的最大值最小. ...

  2. 团队冲刺---Four

    今天的计划: 研究css模板. 昨天做了什么: 寻找css模板,研究界面布局. 遇到的问题: css模板,代码看不太懂,好多标签都不会用.

  3. 关于git设置多个账号的问题,ideal中clone项目

    一.排坑 1.ping github.com超时.修改C:\Windows\System32\drivers\etc的hosts文件,添加 # GitHub地址 192.30.255.112 gith ...

  4. Codeforces.1029D.Isolation(DP 分块)

    题目链接 \(Description\) 给定长为\(n\)的序列\(A_i\)和一个整数\(K\).把它划分成若干段,满足每段中恰好出现过一次的数的个数\(\leq K\).求方案数. \(K\le ...

  5. icon发展史速览

    icon 发展史 img 多张图片占用多个请求,想办法减少请求,合并图片,image sprite background-position /* 使用background-position来定位图标 ...

  6. [LeetCode] 47. Permutations II 全排列之二

    Given a collection of numbers that might contain duplicates, return all possible unique permutations ...

  7. Java高级工程师常见问题

    MySQL数据库调优   定位慢查询得到生产环境那些sql语句响应慢,根据执行计划进行分析调优事物管理索引结构(B+树)平衡二叉树.B树.B+树分库分表后,如何解决查询    使用第三方数据库中间件( ...

  8. 不同种类的ICP算法

    摘自<三维点云数据拼接中ICP及其改进算法综述>

  9. Hanlp分词插件docker集群安装

    背景:我是用docker-compose的方式装的es集群,正常情况es镜像没有插件,如果在docker里面用命令安装了那么重启以后又没了,所以采用挂载离线安装的方式 版本: es7.2 1下载Han ...

  10. 问题追查:QA压测工具http长连接总是被服务端close情况

    1. 背景 最近QA对线上单模块进行压测(非全链路压测),http客户端 与 thrift服务端的tcp链接总在一段时间被close. 查看服务端日志显示 i/o timeout. 最后的结果是: q ...