opened
rgoers
username_0
This patch relates to https://issues.apache.org/jira/browse/HADOOP-12956. It makes the logging implementation in hadoop common optional and provides support for event counters in Log4j 2 and Logback in addition to Log4j 1.
Support Log4j 2 and Logback
issue
created
rgoers
username_0
It has been almost 2 months with no response. Is there a reason no one has looked at this?
comment
created
elek
username_1
Can one of the admins verify this patch?
comment
created
aajisaka
username_2
Thanks @rogers for the PR.
After applying the patch, `mvn install -DskipTests` fails.

```
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project hadoop-hdfs-client: Compilation failure: Compilation failure: 
[ERROR] /Users/username_2/git/ghe.corp/hadoop-mirror/hadoop-hdfs-project/hadoop-hdfs-client/src/test/java/org/apache/hadoop/hdfs/util/TestByteArrayManager.java:[27,24] cannot find symbol
[ERROR]   symbol:   class Level
[ERROR]   location: package org.apache.log4j
[ERROR] /Users/username_2/git/ghe.corp/hadoop-mirror/hadoop-hdfs-project/hadoop-hdfs-client/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestConfiguredFailoverProxyProvider.java:[88,21] cannot access org.apache.log4j.Logger
[ERROR]   class file for org.apache.log4j.Logger not found
```

This is because many modules in Apache Hadoop call log4j1 API directly. We need to remove the caller at all the projects.
comment
created
rgoers
username_0
@username_2 Thank you for your timely response. I have long since moved on to things that are a better use of my time in helping Log4j usrs. If you want to continue this you can either manually convert the loggers or just include the log4j-1.2-api jar which includes the missing log4j 1.2 classes.

Also FYI - you misspelled my user id.
comment
created
hadoop-yetus
username_3
:broken_heart: **-1 overall**






| Vote | Subsystem | Runtime | Comment |
|:----:|----------:|--------:|:--------|
| 0 | reexec | 73 | Docker mode activated. |
||| _ Prechecks _ |
| +1 | dupname | 0 | No case conflicting files found. |
| +1 | @author | 0 | The patch does not contain any @author tags. |
| -1 | test4tests | 0 | The patch doesn't appear to include any new or modified tests.  Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. |
||| _ trunk Compile Tests _ |
| 0 | mvndep | 24 | Maven dependency ordering for branch |
| +1 | mvninstall | 1189 | trunk passed |
| +1 | compile | 1095 | trunk passed |
| +1 | checkstyle | 163 | trunk passed |
| +1 | mvnsite | 108 | trunk passed |
| +1 | shadedclient | 1077 | branch has no errors when building and testing our client artifacts. |
| +1 | javadoc | 89 | trunk passed |
| 0 | spotbugs | 135 | Used deprecated FindBugs config; considering switching to SpotBugs. |
| 0 | findbugs | 24 | branch/hadoop-project no findbugs output file (findbugsXml.xml) |
||| _ Patch Compile Tests _ |
| 0 | mvndep | 27 | Maven dependency ordering for patch |
| +1 | mvninstall | 75 | the patch passed |
| -1 | compile | 126 | root in the patch failed. |
| -1 | javac | 126 | root in the patch failed. |
| -0 | checkstyle | 141 | root: The patch generated 62 new + 26 unchanged - 1 fixed = 88 total (was 27) |
| +1 | mvnsite | 91 | the patch passed |
| +1 | whitespace | 0 | The patch has no whitespace issues. |
| +1 | xml | 3 | The patch has no ill-formed XML file. |
| -1 | shadedclient | 151 | patch has errors when building and testing our client artifacts. |
| +1 | javadoc | 68 | the patch passed |
| 0 | findbugs | 13 | hadoop-project has no data from findbugs |
| -1 | findbugs | 144 | hadoop-common-project/hadoop-common generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0) |
||| _ Other Tests _ |
| +1 | unit | 12 | hadoop-project in the patch passed. |
| -1 | unit | 577 | hadoop-common in the patch failed. |
| +1 | asflicense | 28 | The patch does not generate ASF License warnings. |
| | | 5381 | |


| Reason | Tests |
|-------:|:------|
| FindBugs | module:hadoop-common-project/hadoop-common |
|  |  Switch statement found in org.apache.hadoop.log.metrics.Log4j2EventCounter.append(LogEvent) where default case is missing  At Log4j2EventCounter.java:where default case is missing  At Log4j2EventCounter.java:[lines 40-51] |
| Failed junit tests | hadoop.net.TestNetUtils |


| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | Client=18.09.7 Server=18.09.7 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-299/1/artifact/out/Dockerfile |
| GITHUB PR | https://github.com/apache/hadoop/pull/299 |
| Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient xml findbugs checkstyle |
| uname | Linux 22162bef78fd 4.15.0-52-generic #56-Ubuntu SMP Tue Jun 4 22:49:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | personality/hadoop.sh |
| git revision | trunk / 7f1b76c |
| Default Java | 1.8.0_212 |
| compile | https://builds.apache.org/job/hadoop-multibranch/job/PR-299/1/artifact/out/patch-compile-root.txt |
| javac | https://builds.apache.org/job/hadoop-multibranch/job/PR-299/1/artifact/out/patch-compile-root.txt |
| checkstyle | https://builds.apache.org/job/hadoop-multibranch/job/PR-299/1/artifact/out/diff-checkstyle-root.txt |
| findbugs | https://builds.apache.org/job/hadoop-multibranch/job/PR-299/1/artifact/out/new-findbugs-hadoop-common-project_hadoop-common.html |
| unit | https://builds.apache.org/job/hadoop-multibranch/job/PR-299/1/artifact/out/patch-unit-hadoop-common-project_hadoop-common.txt |
|  Test Results | https://builds.apache.org/job/hadoop-multibranch/job/PR-299/1/testReport/ |
| Max. process+thread count | 1340 (vs. ulimit of 5500) |
| modules | C: hadoop-project hadoop-common-project/hadoop-common U: . |
| Console output | https://builds.apache.org/job/hadoop-multibranch/job/PR-299/1/console |
| versions | git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1 |
| Powered by | Apache Yetus 0.10.0 http://yetus.apache.org |


This message was automatically generated.
comment
created
rgoers
username_0
Closing this PR since it is apparent there is not interest in applying it.
comment