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-4895; Fix findbugs "format string should use %n rather than \n" in tools
Date Fri, 17 Mar 2017 13:59:56 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 01768e332 -> ec8feb766


KAFKA-4895; Fix findbugs "format string should use %n rather than \n" in tools

Author: Colin P. Mccabe <cmccabe@confluent.io>

Reviewers: Apurva Mehta <apurva@confluent.io>, Ismael Juma <ismael@juma.me.uk>

Closes #2684 from cmccabe/KAFKA-4895


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

Branch: refs/heads/trunk
Commit: ec8feb766f0fc560200a326941632033600c141e
Parents: 01768e3
Author: Colin P. Mccabe <cmccabe@confluent.io>
Authored: Fri Mar 17 13:59:35 2017 +0000
Committer: Ismael Juma <ismael@juma.me.uk>
Committed: Fri Mar 17 13:59:40 2017 +0000

----------------------------------------------------------------------
 .../java/org/apache/kafka/tools/ClientCompatibilityTest.java     | 2 +-
 .../main/java/org/apache/kafka/tools/ProducerPerformance.java    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/ec8feb76/tools/src/main/java/org/apache/kafka/tools/ClientCompatibilityTest.java
----------------------------------------------------------------------
diff --git a/tools/src/main/java/org/apache/kafka/tools/ClientCompatibilityTest.java b/tools/src/main/java/org/apache/kafka/tools/ClientCompatibilityTest.java
index 9efb2dd..8274451 100644
--- a/tools/src/main/java/org/apache/kafka/tools/ClientCompatibilityTest.java
+++ b/tools/src/main/java/org/apache/kafka/tools/ClientCompatibilityTest.java
@@ -139,7 +139,7 @@ public class ClientCompatibilityTest {
         try {
             test.run();
         } catch (Throwable t) {
-            System.out.printf("FAILED: Caught exception %s\n\n", t.getMessage());
+            System.out.printf("FAILED: Caught exception %s%n%n", t.getMessage());
             t.printStackTrace();
             Exit.exit(1);
         }

http://git-wip-us.apache.org/repos/asf/kafka/blob/ec8feb76/tools/src/main/java/org/apache/kafka/tools/ProducerPerformance.java
----------------------------------------------------------------------
diff --git a/tools/src/main/java/org/apache/kafka/tools/ProducerPerformance.java b/tools/src/main/java/org/apache/kafka/tools/ProducerPerformance.java
index 0d0902b..e96814d 100644
--- a/tools/src/main/java/org/apache/kafka/tools/ProducerPerformance.java
+++ b/tools/src/main/java/org/apache/kafka/tools/ProducerPerformance.java
@@ -291,7 +291,7 @@ public class ProducerPerformance {
             long ellapsed = System.currentTimeMillis() - windowStart;
             double recsPerSec = 1000.0 * windowCount / (double) ellapsed;
             double mbPerSec = 1000.0 * this.windowBytes / (double) ellapsed / (1024.0 * 1024.0);
-            System.out.printf("%d records sent, %.1f records/sec (%.2f MB/sec), %.1f ms avg
latency, %.1f max latency.\n",
+            System.out.printf("%d records sent, %.1f records/sec (%.2f MB/sec), %.1f ms avg
latency, %.1f max latency.%n",
                               windowCount,
                               recsPerSec,
                               mbPerSec,
@@ -312,7 +312,7 @@ public class ProducerPerformance {
             double recsPerSec = 1000.0 * count / (double) elapsed;
             double mbPerSec = 1000.0 * this.bytes / (double) elapsed / (1024.0 * 1024.0);
             int[] percs = percentiles(this.latencies, index, 0.5, 0.95, 0.99, 0.999);
-            System.out.printf("%d records sent, %f records/sec (%.2f MB/sec), %.2f ms avg
latency, %.2f ms max latency, %d ms 50th, %d ms 95th, %d ms 99th, %d ms 99.9th.\n",
+            System.out.printf("%d records sent, %f records/sec (%.2f MB/sec), %.2f ms avg
latency, %.2f ms max latency, %d ms 50th, %d ms 95th, %d ms 99th, %d ms 99.9th.%n",
                               count,
                               recsPerSec,
                               mbPerSec,


Mime
View raw message