kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ij...@apache.org
Subject kafka git commit: KAFKA-5843; Mx4jLoader.maybeLoad should only be executed if kafka_mx4jenable is set to true
Date Tue, 03 Oct 2017 10:27:44 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk a1a5e93be -> 716330a5b


KAFKA-5843; Mx4jLoader.maybeLoad should only be executed if kafka_mx4jenable is set to true

Author: Dong Lin <lindong28@gmail.com>
Author: Ralph Weires

Reviewers: Ismael Juma <ismael@juma.me.uk>

Closes #3797 from lindong28/KAFKA-5843


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/716330a5
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/716330a5
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/716330a5

Branch: refs/heads/trunk
Commit: 716330a5b2f629e6bb0316b5f036837660916a0e
Parents: a1a5e93
Author: Dong Lin <lindong28@gmail.com>
Authored: Tue Oct 3 11:23:29 2017 +0100
Committer: Ismael Juma <ismael@juma.me.uk>
Committed: Tue Oct 3 11:27:22 2017 +0100

----------------------------------------------------------------------
 core/src/main/scala/kafka/utils/Mx4jLoader.scala | 4 ++--
 docs/upgrade.html                                | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/716330a5/core/src/main/scala/kafka/utils/Mx4jLoader.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/utils/Mx4jLoader.scala b/core/src/main/scala/kafka/utils/Mx4jLoader.scala
index a959c4a..d9d1cb4 100644
--- a/core/src/main/scala/kafka/utils/Mx4jLoader.scala
+++ b/core/src/main/scala/kafka/utils/Mx4jLoader.scala
@@ -5,7 +5,7 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
@@ -34,7 +34,7 @@ object Mx4jLoader extends Logging {
 
   def maybeLoad(): Boolean = {
     val props = new VerifiableProperties(System.getProperties())
-    if (props.getBoolean("kafka_mx4jenable", false))
+    if (!props.getBoolean("kafka_mx4jenable", false))
       return false
     val address = props.getString("mx4jaddress", "0.0.0.0")
     val port = props.getInt("mx4jport", 8082)

http://git-wip-us.apache.org/repos/asf/kafka/blob/716330a5/docs/upgrade.html
----------------------------------------------------------------------
diff --git a/docs/upgrade.html b/docs/upgrade.html
index 8c3fbab..a8447c0 100644
--- a/docs/upgrade.html
+++ b/docs/upgrade.html
@@ -74,6 +74,8 @@
         will return <code>0.0</code> in such cases to minimise the probability
of breaking users who read the value of every client
         metric (via a <code>MetricsReporter</code> implementation or by calling
the <code>metrics()</code> method).
         <code>org.apache.kafka.common.Metric#metricValue()</code> can be used
to retrieve numeric and non-numeric metric values.</li>
+    <li>Mx4j will only be enabled if the system property <code>kafka_mx4jenable</code>
is set to <code>true</code>. Due to a logic
+        inversion bug, it was previously enabled by default and disabled if <code>kafka_mx4jenable</code>
was set to <code>true</code>.</li>
 </ul>
 
 <h5><a id="upgrade_100_new_protocols" href="#upgrade_100_new_protocols">New Protocol
Versions</a></h5>


Mime
View raw message