KKcorps commented on a change in pull request #5729:
URL: https://github.com/apache/incubator-pinot/pull/5729#discussion_r459649882



##########
File path: 
pinot-spi/src/main/java/org/apache/pinot/spi/ingestion/batch/IngestionJobLauncher.java
##########
@@ -57,21 +61,33 @@ public static SegmentGenerationJobSpec 
getSegmentGenerationJobSpec(String jobSpe
     if (context != null) {
       propertiesMap.putAll(context);
     }
-    String yamlTemplate;
+    String jobSpecTemplate;
     try {
-      yamlTemplate = IOUtils.toString(new BufferedReader(new 
FileReader(jobSpecFilePath)));
+      jobSpecTemplate = IOUtils.toString(new BufferedReader(new 
FileReader(jobSpecFilePath)));
     } catch (IOException e) {
       throw new RuntimeException(String.format("Unable to read ingestion job 
spec file [%s].", jobSpecFilePath), e);
     }
-    String yamlStr;
+    String jobSpecStr;
     try {
-      yamlStr = GroovyTemplateUtils.renderTemplate(yamlTemplate, 
propertiesMap);
+      jobSpecStr = GroovyTemplateUtils.renderTemplate(jobSpecTemplate, 
propertiesMap);
     } catch (Exception e) {
       throw new RuntimeException(String
           .format("Unable to render templates on ingestion job spec template 
file - [%s] with propertiesMap - [%s].",
               jobSpecFilePath, 
Arrays.toString(propertiesMap.entrySet().toArray())), e);
     }
-    return new Yaml().loadAs(yamlStr, SegmentGenerationJobSpec.class);
+
+    String jobSpecFormat = properties.getProperty(JOB_SPEC_FORMAT, YAML);

Review comment:
       done




----------------------------------------------------------------
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to