prateekm commented on a change in pull request #1079: SAMZA-2250: Support large 
job models in standalone.
URL: https://github.com/apache/samza/pull/1079#discussion_r296830809
 
 

 ##########
 File path: 
samza-core/src/main/java/org/apache/samza/job/model/JobModelUtil.java
 ##########
 @@ -57,6 +67,42 @@
     return taskToSSPs;
   }
 
+
+  /**
+   * Converts the JobModel into a byte array into {@link MetadataStore}.
+   * @param jobModel the job model to store into {@link MetadataStore}.
+   * @param jobModelVersion the job model version.
+   * @param metadataStore the metadata store.
+   */
+  public static void writeJobModel(JobModel jobModel, String jobModelVersion, 
MetadataStore metadataStore) {
+    try {
+      String jobModelSerializedAsString = 
MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(jobModel);
 
 Review comment:
   It will add a lot of whitespace to the message. It's relatively simple to 
take the JSON from the logs and put it in a formatter. Multiline logs are hard 
to read and parse. Would prefer to not pretty print directly in logs for now. 
If you feel it will help debuggability, let's do it consistently in the code 
base in a separate PR.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to