You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/10/11 22:57:35 UTC

[GitHub] [ozone] bharatviswa504 opened a new pull request #2731: HDDS-5842. Parse and dump SCM ratis segment file to printable text

bharatviswa504 opened a new pull request #2731:
URL: https://github.com/apache/ozone/pull/2731


   ## What changes were proposed in this pull request?
   
   Provide utility to dump ratis log files for SCM
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-5842
   
   ## How was this patch tested?
   
   Updated test and also tested it on the docker-compose cluster with command line.
   
   ```
   bash-4.2$ ozone debug ratislogparser scm -s=/data/metadata/scm-ha/c01a9d0e-eb4c-41d9-8b80-3177576064f5/current/log_inprogress_1 
   Dumping SCM Ratis Log
   Processing Raft Log file: /data/metadata/scm-ha/c01a9d0e-eb4c-41d9-8b80-3177576064f5/current/log_inprogress_1 size:16384
   (t:2, i:1), CONFIGURATIONENTRY
   (t:2, i:2), METADATAENTRY(c:1)
   (t:2, i:3), STATEMACHINELOGENTRY, type: PIPELINE method { name: "addPipeline" args { type: "org.apache.hadoop.hdds.protocol.proto.HddsProtos$Pipeline" value: "\n\376\001\n$4f7fb2c0-6ba7-4178-aa1c-59b9d2c484b1\022\v172.18.0.10\032$ozone-ha_datanode_1.ozone-ha_default\"\020\n\vREPLICATION\020\236M\"\n\n\005RATIS\020\202M\"\020\n\vRATIS_ADMIN\020\201M\"\021\n\fRATIS_SERVER\020\200M\"\017\n\nSTANDALONE\020\203M2$4f7fb2c0-6ba7-4178-aa1c-59b9d2c484b1:\r/default-rack@\001H\000\242\006\025\b\370\202\235\335\206\330\354\277O\020\261\211\222\226\235\267\226\216\252\001\020\001\030\001 \001*>\n$73234681-813a-4aab-a4b6-fc7d4dcc6ff3\242\006\025\b\253\225\351\211\230\320\321\221s\020\363\337\261\356\324\217\277\333\244\0012\000@\371\240\240\212\307/J\025\b\370\202\235\335\206\330\354\277O\020\261\211\222\226\235\267\226\216\252\001" } }
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] bharatviswa504 commented on pull request #2731: HDDS-5842. Parse and dump SCM ratis segment file to printable text

Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on pull request #2731:
URL: https://github.com/apache/ozone/pull/2731#issuecomment-940674376


   Thank You @mukul1987 for the review.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] bharatviswa504 merged pull request #2731: HDDS-5842. Parse and dump SCM ratis segment file to printable text

Posted by GitBox <gi...@apache.org>.
bharatviswa504 merged pull request #2731:
URL: https://github.com/apache/ozone/pull/2731


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] mukul1987 commented on a change in pull request #2731: HDDS-5842. Parse and dump SCM ratis segment file to printable text

Posted by GitBox <gi...@apache.org>.
mukul1987 commented on a change in pull request #2731:
URL: https://github.com/apache/ozone/pull/2731#discussion_r726685693



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMRatisRequest.java
##########
@@ -139,4 +145,22 @@ public static SCMRatisRequest decode(Message message)
         method.getName(), parameterTypes, args.toArray());
   }
 
+  /**
+   * Convert StateMachineLogEntryProto to String.
+   * @param proto - {@link StateMachineLogEntryProto}
+   * @return String
+   */
+  public static String smProtoToString(StateMachineLogEntryProto proto) {
+    StringBuilder builder = new StringBuilder();
+    try {
+      builder.append(TextFormat.shortDebugString(
+          SCMRatisRequestProto.parseFrom(proto.getLogData().toByteArray())));
+    } catch (Throwable ex) {
+      LOG.info("smProtoToString failed", ex);

Review comment:
       LOG.error here ?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org