JdbcT2 client log4j events incorrectly written to trafodion.hdfs.log
Bug #1419112 reported by
Matt Brown
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Trafodion |
Fix Released
|
High
|
Matt Brown |
Bug Description
See attached file for description of the bug
Changed in trafodion: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
DCS has 2 scenarios for startup that have a direct affect on which log4j appender is used when logging events.
First, When DCS is started using bin/dcs-start.sh script the following properties are set: dir=/opt/ home/matbrown/ git/dcs- 1.1.0/bin/ ../logs file=dcs. log dir=/opt/ home/matbrown/ git/dcs- 1.1.0/bin/ .. logger= INFO,console program. home=/opt/ home/matbrown/ git/core/ sqf dir=myconf .home=/ opt/home/ matbrown/ git/core/ sqf
-Ddcs.log.
-Ddcs.log.
-Ddcs.home.
-Ddcs.id.str=
-Ddcs.root.
-Ddcs.user.
-Ddcs.conf.
-Ddcs.trafodion
And, using bin/dcs it's possible to run any DCS class just by specifying the fully qualified class name. When this happens the following properties are set: dir=/opt/ home/matbrown/ git/core/ sqf/sql/ local_hadoop/ dcs-1.0. 0/bin/. ./logs file=dcs- matbrown- 1-server- g4t3016. houston. hp.com. log dir=/opt/ home/matbrown/ git/core/ sqf/sql/ local_hadoop/ dcs-1.0. 0/bin/. . str=matbrown- 1 logger= INFO,DRFA program. home=/opt/ home/matbrown/ git/core/ sqf dir=/opt/ home/matbrown/ git/core/ sqf/sql/ local_hadoop/ dcs-1.0. 0/bin/. ./conf .home=/ opt/home/ matbrown/ git/core/ sqf
-Ddcs.log.
-Ddcs.log.
-Ddcs.home.
-Ddcs.id.
-Ddcs.root.
-Ddcs.user.
-Ddcs.conf.
-Ddcs.trafodion
From a log4j.properties perspective the important properties are:
dcs.log.dir
dcs.log.file
dcs.root.logger
In the first scenario above the "console" appender is used and this typically sends events to System.err.
In the second scenario the "DRFA" appender is used and events are sent to a daily rolling file.
The problem comes in when JdbcT2 driver is used. The HBaseClient.java class overwrites the "DRFA" appender directing all output to conf/ trafodion.hdfs.log file. Since no regard is given to existing appenders in this class all DCS events are "lost" to the trafodion log file.