You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pirk.apache.org by "Suneel Marthi (JIRA)" <ji...@apache.org> on 2016/07/30 22:23:20 UTC

[jira] [Comment Edited] (PIRK-28) Logger Statements Not Working in/from Drivers

    [ https://issues.apache.org/jira/browse/PIRK-28?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15400855#comment-15400855 ] 

Suneel Marthi edited comment on PIRK-28 at 7/30/16 10:22 PM:
-------------------------------------------------------------

Ok, here's the issue and I see why its not been not working. Pirk is pulling down all of the hadoop and spark dependencies which bring in the obsolete log4j-1.2 jar into Pirk classpath. This overrides log4j2 jar that's being packaged as part of maven build. 

Since the old log4j-1.x jar is looking for log4j.properties in the classpath it fails. The new log4j-2x expects log4j2.properties in the classpath (and which is what we have defined). 

Three ways to fix this:

1. include -Dlog4j.configuragtion=log4j2.properties in the classpath explicitly, like
{Code}
 java -cp target/pirk-0.0.1-SNAPSHOT-exe.jar -Dlog4j.configuration=log4j2.properties org.apache.pirk.querier.wideskies.QuerierDriver
{Code}

2. rename log4j2.properties to log4j.properties and it should all work but we r still using log4j 1.2x jars then.

3. shade out log4j jar from hadoop and spark that way pirk executable reads only log4j2 jar, but not sure how this may impact hadoop and spark jobs that still expect old log4j 1.x jar.

I would suggest Option 1 above in the interim, until we can come up with a better solution.



was (Author: smarthi):
Ok, here's the issue and I see why its not been not working. Pirk is pulling down all of the hadoop and spark dependencies which bring in the obsolete log4j-1.2 jar into Pirk classpath. This overrides log4j2 jar that's being packaged as part of maven build. 

Since the old log4j-1.x jar is looking for log4j.properties in the classpath it fails. The new log4j-2x expects log4j2.properties in the classpath (and which is what we have defined). 

Three ways to fix this:

1. include -Dlog4j.configuragtion=log4j2.properties in the classpath explicitly, so 
{Code}
 java -cp target/pirk-0.0.1-SNAPSHOT-exe.jar -Dlog4j.configuration=log4j2.properties org.apache.pirk.querier.wideskies.QuerierDriver
{Code}

2. rename log4j2.properties to log4j.properties and it should all work 

3. shade out log4j jar from hadoop and spark that way pirk executable reads only log4j2 jar, but not sure how this may impact hadoop and spark jobs that still expect old log4j 1.x jar.

I would suggest Option 1 above in the interim, until we can come up with a better solution.


> Logger Statements Not Working in/from Drivers
> ---------------------------------------------
>
>                 Key: PIRK-28
>                 URL: https://issues.apache.org/jira/browse/PIRK-28
>             Project: PIRK
>          Issue Type: Bug
>            Reporter: Ellison Anne Williams
>            Assignee: Suneel Marthi
>
> Noticed today that logging is not functioning within the QuerierDriver and ResponderDriver (and the corresponding CLI classes). It does, however, appear to be working correctly when running through the unit tests (i.e. not calling a main() first). 
> More investigation to get to the root cause is needed...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)