You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by xi...@apache.org on 2021/01/28 10:30:00 UTC

[incubator-pinot] 01/01: Fixing groovy parser with back slash

This is an automated email from the ASF dual-hosted git repository.

xiangfu pushed a commit to branch fixing_groovy_parser
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git

commit 1362194cdca9f005e9cae6ad1cfcdcec7ede24fa
Author: Xiang Fu <fx...@gmail.com>
AuthorDate: Thu Jan 28 02:29:24 2021 -0800

    Fixing groovy parser with back slash
---
 .../main/java/org/apache/pinot/spi/utils/GroovyTemplateUtils.java  | 1 +
 pinot-spi/src/test/resources/ingestion_job_spec_template.yaml      | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/pinot-spi/src/main/java/org/apache/pinot/spi/utils/GroovyTemplateUtils.java b/pinot-spi/src/main/java/org/apache/pinot/spi/utils/GroovyTemplateUtils.java
index f7d0375..377c526 100644
--- a/pinot-spi/src/main/java/org/apache/pinot/spi/utils/GroovyTemplateUtils.java
+++ b/pinot-spi/src/main/java/org/apache/pinot/spi/utils/GroovyTemplateUtils.java
@@ -77,5 +77,6 @@ public class GroovyTemplateUtils {
 
   static {
     DATE_FORMAT.setTimeZone(TimeZone.getTimeZone("UTC"));
+    ((SimpleTemplateEngine) GROOVY_TEMPLATE_ENGINE).setEscapeBackslash(true);
   }
 }
diff --git a/pinot-spi/src/test/resources/ingestion_job_spec_template.yaml b/pinot-spi/src/test/resources/ingestion_job_spec_template.yaml
index a786506..23a1e53 100644
--- a/pinot-spi/src/test/resources/ingestion_job_spec_template.yaml
+++ b/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.
 outputDirURI: 'file:///path/to/output/${year}/${month}/${day}'
 overwriteOutput: true
 segmentCreationJobParallelism: 100


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