hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prasanth Jayachandran (JIRA)" <>
Subject [jira] [Commented] (HIVE-13032) Hive services need HADOOP_CLIENT_OPTS for proper log4j2 initialization
Date Wed, 10 Feb 2016 01:53:18 GMT


Prasanth Jayachandran commented on HIVE-13032:

Verified that it's not included in other services. Beeline uses different properties file
and sets log4j.configurationFile again. Also double initialization is not a problem as logger
factory is initialized in a static block which will be initialized automatically by the class
loader. Using Configurator to initialize again will return the same instance. Committing this
patch shortly.

> Hive services need HADOOP_CLIENT_OPTS for proper log4j2 initialization
> ----------------------------------------------------------------------
>                 Key: HIVE-13032
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 2.0.0, 2.1.0
>            Reporter: Prasanth Jayachandran
>            Assignee: Prasanth Jayachandran
>            Priority: Blocker
>         Attachments: HIVE-13032.1.patch, HIVE-13032.2.patch
> HIVE-12497 removed HADOOP_CLIENT_OPTS as it slowed down cli launch time. But it leads
to log4j2 not being initialized when using services other than CLI. Other services like metastore,
schematool etc. rely on log4j to initialize the logging based on the presence of
file in the classpath. If we use the standard name for log4j configuration file (
then automatic initialization will happen. If not, we have to tell log4j to look for specific
properties file. This is done via -Dlog4j.configurationFile system property. If we pass this
system property via HADOOP_CLIENT_OPTS then all hive services will have logging initialized
> In HIVE-12497, the problem was we had HADOOP_CLIENT_OPTS at the top of the script. As
a result, hadoop and hbase commands tries to initialize logging which took long time slowing
down the startup time.

This message was sent by Atlassian JIRA

View raw message