You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2018/11/11 14:37:34 UTC
[incubator-skywalking-oal-tool] branch master updated: Support
source in StorageEntity annotation.
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-skywalking-oal-tool.git
The following commit(s) were added to refs/heads/master by this push:
new 3efba0e Support source in StorageEntity annotation.
3efba0e is described below
commit 3efba0e8417146428bd781d31415448e8df86a3a
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Sun Nov 11 22:37:24 2018 +0800
Support source in StorageEntity annotation.
---
oal-parser/src/main/resources/code-templates/IndicatorImplementor.ftl | 2 +-
.../src/test/resources/expectedFiles/IndicatorImplementorExpected.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/oal-parser/src/main/resources/code-templates/IndicatorImplementor.ftl b/oal-parser/src/main/resources/code-templates/IndicatorImplementor.ftl
index c073503..2562b22 100644
--- a/oal-parser/src/main/resources/code-templates/IndicatorImplementor.ftl
+++ b/oal-parser/src/main/resources/code-templates/IndicatorImplementor.ftl
@@ -45,7 +45,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
*/
@IndicatorType
@StreamData
-@StorageEntity(name = "${tableName}", builder = ${metricName}Indicator.Builder.class)
+@StorageEntity(name = "${tableName}", builder = ${metricName}Indicator.Builder.class, source = Scope.${sourceName})
public class ${metricName}Indicator extends ${indicatorClassName} implements AlarmSupported {
<#list fieldsFromSource as sourceField>
diff --git a/oal-parser/src/test/resources/expectedFiles/IndicatorImplementorExpected.java b/oal-parser/src/test/resources/expectedFiles/IndicatorImplementorExpected.java
index febba5a..5395803 100644
--- a/oal-parser/src/test/resources/expectedFiles/IndicatorImplementorExpected.java
+++ b/oal-parser/src/test/resources/expectedFiles/IndicatorImplementorExpected.java
@@ -38,7 +38,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
*/
@IndicatorType
@StreamData
-@StorageEntity(name = "service_avg", builder = ServiceAvgIndicator.Builder.class)
+@StorageEntity(name = "service_avg", builder = ServiceAvgIndicator.Builder.class, source = Scope.Service)
public class ServiceAvgIndicator extends LongAvgIndicator implements AlarmSupported {
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;