cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject git commit: use platform agnostic new lines in printf statements patch by dbrosius reviewed by jbellis for CASSANDRA-4260
Date Sat, 19 May 2012 03:46:40 GMT
Updated Branches:
  refs/heads/trunk 7007a8510 -> f211e507b


use platform agnostic new lines in printf statements
patch by dbrosius reviewed by jbellis for CASSANDRA-4260


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

Branch: refs/heads/trunk
Commit: f211e507bf6b7d3ca5bbefba984dd1472e1ac697
Parents: 7007a85
Author: Dave Brosius <dbrosius@mebigfatguy.com>
Authored: Fri May 18 23:38:43 2012 -0400
Committer: Dave Brosius <dbrosius@mebigfatguy.com>
Committed: Fri May 18 23:38:43 2012 -0400

----------------------------------------------------------------------
 src/java/org/apache/cassandra/cli/CliOptions.java  |    2 +-
 src/java/org/apache/cassandra/tools/NodeCmd.java   |    6 +++---
 .../cassandra/tools/SSTableMetadataViewer.java     |   10 +++++-----
 3 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f211e507/src/java/org/apache/cassandra/cli/CliOptions.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cli/CliOptions.java b/src/java/org/apache/cassandra/cli/CliOptions.java
index 178ba29..647aa2d 100644
--- a/src/java/org/apache/cassandra/cli/CliOptions.java
+++ b/src/java/org/apache/cassandra/cli/CliOptions.java
@@ -176,7 +176,7 @@ public class CliOptions
             // Abort if there are any unrecognized arguments left
             if (cmd.getArgs().length > 0)
             {
-                System.err.printf("Unknown argument: %s\n", cmd.getArgs()[0]);
+                System.err.printf("Unknown argument: %s%n", cmd.getArgs()[0]);
                 System.err.println();
                 printUsage();
                 System.exit(1);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f211e507/src/java/org/apache/cassandra/tools/NodeCmd.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/NodeCmd.java b/src/java/org/apache/cassandra/tools/NodeCmd.java
index 60ae199..85e2c45 100644
--- a/src/java/org/apache/cassandra/tools/NodeCmd.java
+++ b/src/java/org/apache/cassandra/tools/NodeCmd.java
@@ -233,7 +233,7 @@ public class NodeCmd
         catch (ConfigurationException ex)
         {
             ownerships = probe.getOwnership();
-            outs.printf("Note: Ownership information does not include topology, please specify
a keyspace. \n");
+            outs.printf("Note: Ownership information does not include topology, please specify
a keyspace. %n");
             outs.printf(format, "Address", "DC", "Rack", "Status", "State", "Load", "Owns",
"Token");
         }
 
@@ -701,12 +701,12 @@ public class NodeCmd
             Throwable inner = findInnermostThrowable(ioe);
             if (inner instanceof ConnectException)
             {
-                System.err.printf("Failed to connect to '%s:%d': %s\n", host, port, inner.getMessage());
+                System.err.printf("Failed to connect to '%s:%d': %s%n", host, port, inner.getMessage());
                 System.exit(1);
             }
             else if (inner instanceof UnknownHostException)
             {
-                System.err.printf("Cannot resolve '%s': unknown host\n", host);
+                System.err.printf("Cannot resolve '%s': unknown host%n", host);
                 System.exit(1);
             }
             else

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f211e507/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java b/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java
index 13b491c..626fb6e 100644
--- a/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java
+++ b/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java
@@ -46,11 +46,11 @@ public class SSTableMetadataViewer
             Descriptor descriptor = Descriptor.fromFilename(fname);
             SSTableMetadata metadata = SSTableMetadata.serializer.deserialize(descriptor);
 
-            out.printf("SSTable: %s\n", descriptor);
-            out.printf("Partitioner: %s\n", metadata.partitioner);
-            out.printf("Maximum timestamp: %s\n", metadata.maxTimestamp);
-            out.printf("Compression ratio: %s\n", metadata.compressionRatio);
-            out.printf("Estimated droppable tombstones: %s\n", metadata.getEstimatedDroppableTombstoneRatio((int)
(System.currentTimeMillis() / 1000)));
+            out.printf("SSTable: %s%n", descriptor);
+            out.printf("Partitioner: %s%n", metadata.partitioner);
+            out.printf("Maximum timestamp: %s%n", metadata.maxTimestamp);
+            out.printf("Compression ratio: %s%n", metadata.compressionRatio);
+            out.printf("Estimated droppable tombstones: %s%n", metadata.getEstimatedDroppableTombstoneRatio((int)
(System.currentTimeMillis() / 1000)));
             out.println(metadata.replayPosition);
             printHistograms(metadata, out);
         }


Mime
View raw message