[ https://issues.apache.org/jira/browse/HIVE-16075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15891828#comment-15891828 ]
Prasanth Jayachandran edited comment on HIVE-16075 at 3/2/17 8:50 AM: ---------------------------------------------------------------------- LogUtils.initHiveLog4j() should take case of initializing log4j2. This will only get skipped when log4j.configurationFile system property is not null. Your patch also suggests that log4j.configurationFile system property is not null and hence going to else part. Since log4j1.x is not compatible with log4j2, log4j.configurationFile should never be set in system properties (as hive switched to log4j2 now). was (Author: prasanth_j): LogUtils.initHiveLog4j() should take of initializing log4j2. This will only get skipped when log4j.configurationFile system property is not null. You patch also suggests that log4j.configurationFile system property is not null and hence going to else part. Since log4j1.x is not compatible with log4j2, log4j.configurationFile should never be set in system properties (as hive switched to log4j2 now). > MetaStore needs to reinitialize log4j to allow log specific settings via > hiveconf take effect > ---------------------------------------------------------------------------------------------- > > Key: HIVE-16075 > URL: https://issues.apache.org/jira/browse/HIVE-16075 > Project: Hive > Issue Type: Improvement > Components: Metastore > Affects Versions: 2.2.0 > Reporter: yunfei liu > Assignee: yunfei liu > Priority: Minor > Fix For: 2.2.0 > > Attachments: HIVE-16075.1.patch > > > when I start hive metastore with command: > {quote} > {{hive --service metastore -hiveconf hive.log.file=hivemetastore.log > -hiveconf hive.log.dir=/home/yun/hive/log}} > {quote} > The two log parameters won't take effect because after metastore copy hive > conf parameters into java system properties, it doesn't reinitialize log4j. -- This message was sent by Atlassian JIRA (v6.3.15#6346)