Skip to content

HIVE-29026: Cleanup Log4j properties file to adhere to 2.x changes #5885

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions beeline/src/main/resources/beeline-log4j2.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.

status = INFO
name = BeelineLog4j2
packages = org.apache.hadoop.hive.ql.log

# list of properties
property.hive.log.level = WARN
property.hive.root.logger = console

# list of all appenders
appenders = console

# console appender
appender.console.type = Console
appender.console.name = console
appender.console.target = SYSTEM_ERR
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %d{yy/MM/dd HH:mm:ss} [%t]: %p %c{2}: %m%n

# list of all loggers
loggers = HiveConnection, HiveJDBC

# HiveConnection logs useful info for dynamic service discovery
logger.HiveConnection.name = org.apache.hive.jdbc.HiveConnection
logger.HiveConnection.level = INFO
Expand Down
12 changes: 2 additions & 10 deletions common/src/main/resources/hive-log4j2.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

status = INFO
name = HiveLog4j2
packages = org.apache.hadoop.hive.ql.log

# list of properties
property.hive.log.level = INFO
Expand All @@ -25,9 +23,6 @@ property.hive.log.dir = ${sys:java.io.tmpdir}/${sys:user.name}
property.hive.log.file = hive.log
property.hive.perflogger.log.level = INFO

# list of all appenders
appenders = console, DRFA

# console appender
appender.console.type = Console
appender.console.name = console
Expand All @@ -50,9 +45,6 @@ appender.DRFA.policies.time.modulate = true
appender.DRFA.strategy.type = DefaultRolloverStrategy
appender.DRFA.strategy.max = 30

# list of all loggers
loggers = NIOServerCnxn, ClientCnxnSocketNIO, DataNucleus, Datastore, JPOX, PerfLogger, AmazonAws, ApacheHttp

logger.NIOServerCnxn.name = org.apache.zookeeper.server.NIOServerCnxn
logger.NIOServerCnxn.level = WARN

Expand All @@ -68,10 +60,10 @@ logger.Datastore.level = ERROR
logger.JPOX.name = JPOX
logger.JPOX.level = ERROR

logger.AmazonAws.name=com.amazonaws
logger.AmazonAws.name = com.amazonaws
logger.AmazonAws.level = INFO

logger.ApacheHttp.name=org.apache.http
logger.ApacheHttp.name = org.apache.http
logger.ApacheHttp.level = INFO

logger.PerfLogger.name = org.apache.hadoop.hive.ql.log.PerfLogger
Expand Down
8 changes: 0 additions & 8 deletions common/src/test/resources/hive-exec-log4j2-test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

status = INFO
name = HiveExecLog4j2Test
packages = org.apache.hadoop.hive.ql.log

# list of properties
property.hive.log.level = INFO
property.hive.root.logger = FA
property.hive.log.dir = ${sys:test.tmp.dir}/${sys:user.name}-TestHiveLogging
property.hive.log.file = hiveExecLog4j2Test.log

# list of all appenders
appenders = console, FA

# console appender
appender.console.type = Console
appender.console.name = console
Expand All @@ -41,9 +36,6 @@ appender.FA.fileName = ${sys:hive.log.dir}/${sys:hive.log.file}
appender.FA.layout.type = PatternLayout
appender.FA.layout.pattern = %d{ISO8601} %5p [%t] %c{2}: %m%n

# list of all loggers
loggers = NIOServerCnxn, ClientCnxnSocketNIO, DataNucleus, Datastore, JPOX

logger.NIOServerCnxn.name = org.apache.zookeeper.server.NIOServerCnxn
logger.NIOServerCnxn.level = WARN

Expand Down
8 changes: 0 additions & 8 deletions common/src/test/resources/hive-log4j2-test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

status = INFO
name = HiveLog4j2Test
packages = org.apache.hadoop.hive.ql.log

# list of properties
property.hive.log.level = WARN
property.hive.root.logger = DRFA
property.hive.log.dir = ${sys:test.tmp.dir}/${sys:user.name}-TestHiveLogging
property.hive.log.file = hiveLog4j2Test.log

# list of all appenders
appenders = console, DRFA

# console appender
appender.console.type = Console
appender.console.name = console
Expand All @@ -48,9 +43,6 @@ appender.DRFA.policies.time.modulate = true
appender.DRFA.strategy.type = DefaultRolloverStrategy
appender.DRFA.strategy.max = 30

# list of all loggers
loggers = NIOServerCnxn, ClientCnxnSocketNIO, DataNucleus, Datastore, JPOX

logger.NIOServerCnxn.name = org.apache.zookeeper.server.NIOServerCnxn
logger.NIOServerCnxn.level = WARN

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

status = INFO
name = HCatE2ELog4j2
packages = org.apache.hadoop.hive.ql.log

# list of properties
property.hive.log.level = DEBUG
property.hive.root.logger = DRFA
property.hive.log.dir = ${sys:java.io.tmpdir}/${sys:user.name}
property.hive.log.file = hive.log

# list of all appenders
appenders = console, DRFA

# console appender
appender.console.type = Console
appender.console.name = console
Expand All @@ -48,9 +43,6 @@ appender.DRFA.policies.time.modulate = true
appender.DRFA.strategy.type = DefaultRolloverStrategy
appender.DRFA.strategy.max = 30

# list of all loggers
loggers = NIOServerCnxn, ClientCnxnSocketNIO, DataNucleus, Datastore, JPOX

logger.NIOServerCnxn.name = org.apache.zookeeper.server.NIOServerCnxn
logger.NIOServerCnxn.level = WARN

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

status = INFO
name = WebhcatLog4j2
packages = org.apache.hadoop.hive.ql.log

# list of properties
property.webhcat.log.level = INFO
property.webhcat.root.logger = standard
property.webhcat.log.dir = .
property.webhcat.log.file = webhcat.log

# list of all appenders
appenders = console, standard

# console appender
appender.console.type = Console
appender.console.name = console
Expand All @@ -48,9 +43,6 @@ appender.standard.policies.time.modulate = true
appender.standard.strategy.type = DefaultRolloverStrategy
appender.standard.strategy.max = 30

# list of all loggers
loggers = Jersey, WebComponent, Hadoop, HadoopConf, Zookeeper, Jetty

logger.Jersey.name = com.sun.jersey
logger.Jersey.level = DEBUG

Expand Down
24 changes: 0 additions & 24 deletions iceberg/iceberg-handler/src/test/resources/log4j.properties

This file was deleted.

7 changes: 0 additions & 7 deletions itests/hive-jmh/src/main/resources/log4j2.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

status = FATAL
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although I've not checked how Log4j 2 works, I am feeling that the original intention to see only FATAL will be gone

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review @okumin. Very valid question, when I was working on the PR, i also though about it.
Based on the comments apache/logging-log4j2#2794 (comment)

Status Logger is intended for troubleshooting Log4j itself and its components. I strongly advise you to avoid configuring it unless you are troubleshooting a Log4j issue.

Because of that I went ahead and removed. I don't have any strong opinion on this, If you think its better to keep, then I can update the PR.

name = HiveJMH

# list of properties
Expand All @@ -23,9 +22,6 @@ property.hive-jmh.root.logger = DRFA
property.hive-jmh.log.dir = target/tmp/log
property.hive-jmh.log.file = hive-jmh.log

# list of all appenders
appenders = console, DRFA

# console appender
appender.console.type = Console
appender.console.name = console
Expand All @@ -47,9 +43,6 @@ appender.DRFA.policies.time.modulate = true
appender.DRFA.strategy.type = DefaultRolloverStrategy
appender.DRFA.strategy.max = 30

# list of all loggers
loggers = Jetty, AbstractLifeCycle

logger.Jetty.name = org.eclipse.jetty
logger.Jetty.level = WARN

Expand Down
8 changes: 0 additions & 8 deletions llap-server/src/main/resources/llap-cli-log4j2.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

status = WARN
name = LlapCliLog4j2
packages = org.apache.hadoop.hive.ql.log

# list of properties
property.hive.log.level = WARN
Expand All @@ -25,9 +23,6 @@ property.hive.log.dir = ${sys:java.io.tmpdir}/${sys:user.name}
property.hive.log.file = llap-cli.log
property.hive.llapstatus.consolelogger.level = INFO

# list of all appenders
appenders = console, DRFA, llapstatusconsole

# console appender
appender.console.type = Console
appender.console.name = console
Expand Down Expand Up @@ -57,9 +52,6 @@ appender.DRFA.policies.time.modulate = true
appender.DRFA.strategy.type = DefaultRolloverStrategy
appender.DRFA.strategy.max = 30

# list of all loggers
loggers = ZooKeeper, DataNucleus, Datastore, JPOX, HadoopConf, LlapStatusServiceDriverConsole

logger.ZooKeeper.name = org.apache.zookeeper
logger.ZooKeeper.level = WARN

Expand Down
8 changes: 0 additions & 8 deletions llap-server/src/main/resources/llap-daemon-log4j2.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
# Note: Some names and logic is common to this file and llap LogHelpers. Make sure to change that
# as well, if changing this file.

status = INFO
name = LlapDaemonLog4j2
packages = org.apache.hadoop.hive.ql.log

# list of properties
property.llap.daemon.log.level = INFO
Expand All @@ -34,9 +32,6 @@ property.llap.daemon.historylog.file = llapdaemon_history.log
property.llap.daemon.log.maxfilesize = 256MB
property.llap.daemon.log.maxbackupindex = 240

# list of all appenders
appenders = console, RFA, HISTORYAPPENDER, query-routing

# console appender
appender.console.type = Console
appender.console.name = console
Expand Down Expand Up @@ -97,9 +92,6 @@ appender.query-routing.routes.route-mdc.file-mdc.fileName = ${sys:llap.daemon.lo
appender.query-routing.routes.route-mdc.file-mdc.layout.type = PatternLayout
appender.query-routing.routes.route-mdc.file-mdc.layout.pattern = %d{ISO8601} %5p [%t (%X{fragmentId})] %c{2}: %m%n

# list of all loggers
loggers = PerfLogger, EncodedReader, NIOServerCnxn, ClientCnxnSocketNIO, DataNucleus, Datastore, JPOX, HistoryLogger, LlapIoImpl, LlapIoOrc, LlapIoCache, LlapIoLocking, TezSM, TezSS, TezHC, LlapDaemon, TaskExecutorService

logger.LlapDaemon.name = org.apache.hadoop.hive.llap.daemon.impl.LlapDaemon
logger.LlapDaemon.level = INFO

Expand Down
8 changes: 0 additions & 8 deletions llap-server/src/test/resources/llap-daemon-log4j2.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

status = INFO
name = LlapDaemonLog4j2Test
packages = org.apache.hadoop.hive.ql.log

# list of properties
property.llap.daemon.log.level = INFO
Expand All @@ -27,9 +25,6 @@ property.llap.daemon.historylog.file = llapdaemon_history.log
property.llap.daemon.log.maxfilesize = 256MB
property.llap.daemon.log.maxbackupindex = 20

# list of all appenders
appenders = console, RFA, HISTORYAPPENDER

# console appender
appender.console.type = Console
appender.console.name = console
Expand Down Expand Up @@ -63,9 +58,6 @@ appender.HISTORYAPPENDER.policies.size.size = ${sys:llap.daemon.log.maxfilesize}
appender.HISTORYAPPENDER.strategy.type = DefaultRolloverStrategy
appender.HISTORYAPPENDER.strategy.max = ${sys:llap.daemon.log.maxbackupindex}

# list of all loggers
loggers = NIOServerCnxn, ClientCnxnSocketNIO, DataNucleus, Datastore, JPOX, HistoryLogger

logger.NIOServerCnxn.name = org.apache.zookeeper.server.NIOServerCnxn
logger.NIOServerCnxn.level = WARN

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
# - Default value for llap.daemon.log.dir is java.io.tmpdir to avoid polluting the current directory when running tests
# - purgePolicy.timeToLive is set to 5 sec so that tests finish faster (value should be much bigger in prod)

status = INFO
name = TestLlapDaemonRoutingLog4j2
packages = org.apache.hadoop.hive.ql.log

# list of properties
property.llap.daemon.log.level = INFO
Expand All @@ -34,9 +32,6 @@ property.llap.daemon.historylog.file = llapdaemon_history.log
property.llap.daemon.log.maxfilesize = 256MB
property.llap.daemon.log.maxbackupindex = 240

# list of all appenders
appenders = console, RFA, HISTORYAPPENDER, query-routing

# console appender
appender.console.type = Console
appender.console.name = console
Expand Down Expand Up @@ -97,9 +92,6 @@ appender.query-routing.routes.route-mdc.file-mdc.fileName = ${sys:llap.daemon.lo
appender.query-routing.routes.route-mdc.file-mdc.layout.type = PatternLayout
appender.query-routing.routes.route-mdc.file-mdc.layout.pattern = %d{ISO8601} %5p [%t (%X{fragmentId})] %c{2}: %m%n

# list of all loggers
loggers = PerfLogger, EncodedReader, NIOServerCnxn, ClientCnxnSocketNIO, DataNucleus, Datastore, JPOX, HistoryLogger, LlapIoImpl, LlapIoOrc, LlapIoCache, LlapIoLocking, TezSM, TezSS, TezHC, LlapDaemon, TaskExecutorService

logger.LlapDaemon.name = org.apache.hadoop.hive.llap.daemon.impl.LlapDaemon
logger.LlapDaemon.level = INFO

Expand Down
5 changes: 0 additions & 5 deletions llap-server/src/test/resources/log4j2.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

status = INFO
name = LlapLog4j2Test
packages = org.apache.hadoop.hive.ql.log

# list of properties
property.llap.daemon.log.level = INFO
property.llap.daemon.root.logger = console

# list of all appenders
appenders = console

# console appender
appender.console.type = Console
appender.console.name = console
Expand Down
Loading
Loading