ratis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [incubator-ratis] branch master updated: RATIS-472. Clean up output for `read` logservice shell command
Date Mon, 28 Jan 2019 19:32:40 GMT
This is an automated email from the ASF dual-hosted git repository.

elserj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ratis.git


The following commit(s) were added to refs/heads/master by this push:
     new d1ace25  RATIS-472. Clean up output for `read` logservice shell command
d1ace25 is described below

commit d1ace258929b6771502c1f9f8a37903c63171b5c
Author: Josh Elser <elserj@apache.org>
AuthorDate: Wed Jan 9 14:57:41 2019 -0500

    RATIS-472. Clean up output for `read` logservice shell command
---
 .../org/apache/ratis/logservice/shell/commands/ReadLogCommand.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ratis-logservice/src/main/java/org/apache/ratis/logservice/shell/commands/ReadLogCommand.java
b/ratis-logservice/src/main/java/org/apache/ratis/logservice/shell/commands/ReadLogCommand.java
index a1d4c74..ce5c954 100644
--- a/ratis-logservice/src/main/java/org/apache/ratis/logservice/shell/commands/ReadLogCommand.java
+++ b/ratis-logservice/src/main/java/org/apache/ratis/logservice/shell/commands/ReadLogCommand.java
@@ -47,17 +47,17 @@ public class ReadLogCommand implements Command {
       long firstId = stream.getStartRecordId();
       long lastId = stream.getLastRecordId();
       StringBuilder sb = new StringBuilder();
-      int i = 0;
       List<ByteBuffer> records = reader.readBulk((int) (lastId - firstId));
       for (ByteBuffer record : records) {
         if (sb.length() > 0) {
           sb.append(", ");
         }
-        sb.append(i).append(":");
+        sb.append("\"");
         if (record != null) {
           String strData = new String(record.array(), record.arrayOffset(), record.remaining(),
StandardCharsets.UTF_8);
           sb.append(strData);
         }
+        sb.append("\"");
       }
       sb.insert(0, "[");
       sb.append("]");


Mime
View raw message