You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@griffin.apache.org by gu...@apache.org on 2018/10/25 15:19:19 UTC
incubator-griffin git commit: Support "cache" field on rules in
service module
Repository: incubator-griffin
Updated Branches:
refs/heads/master 253d44a3c -> 2637ca885
Support "cache" field on rules in service module
Measure module exposes "cache" flag on rules, but it's not possible to store and schedule such a job in service module.
Author: Nikolay Sokolov <ch...@gmail.com>
Closes #442 from chemikadze/service-cache.
Project: http://git-wip-us.apache.org/repos/asf/incubator-griffin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-griffin/commit/2637ca88
Tree: http://git-wip-us.apache.org/repos/asf/incubator-griffin/tree/2637ca88
Diff: http://git-wip-us.apache.org/repos/asf/incubator-griffin/diff/2637ca88
Branch: refs/heads/master
Commit: 2637ca88584dcec29591fb3b16f96689a5d49fef
Parents: 253d44a
Author: Nikolay Sokolov <ch...@gmail.com>
Authored: Thu Oct 25 23:19:12 2018 +0800
Committer: William Guo <gu...@apache.org>
Committed: Thu Oct 25 23:19:12 2018 +0800
----------------------------------------------------------------------
griffin-doc/measure/measure-configuration-guide.md | 1 +
.../org/apache/griffin/core/measure/entity/Rule.java | 11 +++++++++++
2 files changed, 12 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/2637ca88/griffin-doc/measure/measure-configuration-guide.md
----------------------------------------------------------------------
diff --git a/griffin-doc/measure/measure-configuration-guide.md b/griffin-doc/measure/measure-configuration-guide.md
index 9ea7730..feeaf1a 100644
--- a/griffin-doc/measure/measure-configuration-guide.md
+++ b/griffin-doc/measure/measure-configuration-guide.md
@@ -234,6 +234,7 @@ Above lists DQ job configure parameters.
* source: name of data source to measure timeliness.
* latency: the latency column name in metric, optional.
* threshold: optional, if set as a time string like "1h", the items with latency more than 1 hour will be record.
+- **cache**: Cache output dataframe. Optional, valid only for "spark-sql" and "df-ops" mode. Defaults to `false` if not specified.
- **out**: List of output sinks for the job.
+ Metric output.
* type: "metric"
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/2637ca88/service/src/main/java/org/apache/griffin/core/measure/entity/Rule.java
----------------------------------------------------------------------
diff --git a/service/src/main/java/org/apache/griffin/core/measure/entity/Rule.java b/service/src/main/java/org/apache/griffin/core/measure/entity/Rule.java
index 071243a..3792e4d 100644
--- a/service/src/main/java/org/apache/griffin/core/measure/entity/Rule.java
+++ b/service/src/main/java/org/apache/griffin/core/measure/entity/Rule.java
@@ -81,6 +81,9 @@ public class Rule extends AbstractAuditableEntity {
@Column(name = "\"out\"")
private String out;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ private Boolean cache;
+
@JsonProperty("dsl.type")
public String getDslType() {
return dslType;
@@ -159,6 +162,14 @@ public class Rule extends AbstractAuditableEntity {
this.out = out;
}
+ public Boolean getCache() {
+ return cache;
+ }
+
+ public void setCache(Boolean cache) {
+ this.cache = cache;
+ }
+
@PrePersist
@PreUpdate
public void save() throws JsonProcessingException {