You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/01/28 19:22:20 UTC

[GitHub] [incubator-pinot] Jackie-Jiang commented on a change in pull request #6501: Fixing groovy parser with back slash

Jackie-Jiang commented on a change in pull request #6501:
URL: https://github.com/apache/incubator-pinot/pull/6501#discussion_r566342076



##########
File path: pinot-spi/src/test/resources/ingestion_job_spec_template.yaml
##########
@@ -23,9 +23,14 @@ executionFrameworkSpec:
   segmentTarPushJobRunnerClassName: 'org.apache.pinot.plugin.ingestion.batch.standalone.SegmentTarPushJobRunner'
   segmentUriPushJobRunnerClassName: 'org.apache.pinot.plugin.ingestion.batch.standalone.SegmentUriPushJobRunner'
 jobType: SegmentCreationAndTarPush
+
 inputDirURI: 'file:///path/to/input/${ year }/${ month }/${ day }'
+# includeFileNamePattern: include file name pattern, supported glob pattern.
+# Sample usage:
+#   'glob:*.avro' will include all avro files just under the inputDirURI, not sub directories;
+#   'glob:**\/*.avro' will include all the avro files under inputDirURI recursively.

Review comment:
       Do we need the backslash here?

##########
File path: pinot-spi/src/main/java/org/apache/pinot/spi/utils/GroovyTemplateUtils.java
##########
@@ -77,5 +77,6 @@ public static String renderTemplate(String template)
 
   static {
     DATE_FORMAT.setTimeZone(TimeZone.getTimeZone("UTC"));
+    ((SimpleTemplateEngine) GROOVY_TEMPLATE_ENGINE).setEscapeBackslash(true);

Review comment:
       (nit) We can change the declaration of `GROOVY_TEMPLATE_ENGINE` to `SimpleTemplateEngine` to avoid this type cast for clarity

##########
File path: pinot-spi/src/test/resources/ingestion_job_spec_template.yaml
##########
@@ -23,9 +23,14 @@ executionFrameworkSpec:
   segmentTarPushJobRunnerClassName: 'org.apache.pinot.plugin.ingestion.batch.standalone.SegmentTarPushJobRunner'
   segmentUriPushJobRunnerClassName: 'org.apache.pinot.plugin.ingestion.batch.standalone.SegmentUriPushJobRunner'
 jobType: SegmentCreationAndTarPush
+
 inputDirURI: 'file:///path/to/input/${ year }/${ month }/${ day }'
+# includeFileNamePattern: include file name pattern, supported glob pattern.
+# Sample usage:
+#   'glob:*.avro' will include all avro files just under the inputDirURI, not sub directories;
+#   'glob:**\/*.avro' will include all the avro files under inputDirURI recursively.
 includeFileNamePattern: 'glob:**/*.parquet'
-excludeFileNamePattern: 'glob:**/*.avro'
+excludeFileNamePattern: 'glob:**/*.avro' # 'glob:**\/*.avro' will exclude all the avro files.

Review comment:
       Do we need the backslash 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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org