File tree 7 files changed +126
-16
lines changed
src/main/java/org/apache/griffin/metric/model
7 files changed +126
-16
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ under the License.
28
28
<version >2.0.0-SNAPSHOT</version >
29
29
</parent >
30
30
31
-
32
31
<artifactId >griffin-metric</artifactId >
33
32
<name >${project.artifactId} </name >
34
33
<packaging >jar</packaging >
Original file line number Diff line number Diff line change @@ -18,12 +18,13 @@ Licensed to the Apache Software Foundation (ASF) under one
18
18
*/
19
19
package org .apache .griffin .metric .model ;
20
20
21
- import java .util .Date ;
22
-
23
21
import lombok .Data ;
24
22
23
+ import java .util .Date ;
25
24
26
-
25
+ /**
26
+ * A base class in metric function in griffin, which contains timestamp properties of entity creation/update.
27
+ */
27
28
@ Data
28
29
public abstract class BaseEntity implements java .io .Serializable {
29
30
Original file line number Diff line number Diff line change @@ -18,24 +18,39 @@ Licensed to the Apache Software Foundation (ASF) under one
18
18
*/
19
19
package org .apache .griffin .metric .model ;
20
20
21
- import lombok .*;
22
-
23
- import java .util .Map ;
24
-
21
+ import lombok .AllArgsConstructor ;
22
+ import lombok .Builder ;
23
+ import lombok .Data ;
24
+ import lombok .EqualsAndHashCode ;
25
+ import lombok .NoArgsConstructor ;
26
+
27
+ /**
28
+ * A metric definition entity represents fundamental metadata.
29
+ */
25
30
@ Builder
26
31
@ Data
27
32
@ NoArgsConstructor
28
33
@ AllArgsConstructor
29
34
@ EqualsAndHashCode (callSuper = false )
30
35
public class MetricD extends BaseEntity {
31
36
37
+ /**
38
+ * An unique identity for a metric.
39
+ */
32
40
private long metricId ;
33
41
42
+ /**
43
+ * The name of a metric entity.
44
+ */
34
45
private String metricName ;
35
46
47
+ /**
48
+ * The owner of a metric entity.
49
+ */
36
50
private String owner ;
37
51
52
+ /**
53
+ * The details of a metric entity.
54
+ */
38
55
private String description ;
39
-
40
- private Map <String , String > tags ;
41
56
}
Original file line number Diff line number Diff line change
1
+ /*
2
+ Licensed to the Apache Software Foundation (ASF) under one
3
+ or more contributor license agreements. See the NOTICE file
4
+ distributed with this work for additional information
5
+ regarding copyright ownership. The ASF licenses this file
6
+ to you under the Apache License, Version 2.0 (the
7
+ "License"); you may not use this file except in compliance
8
+ with the License. You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing,
13
+ software distributed under the License is distributed on an
14
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ KIND, either express or implied. See the License for the
16
+ specific language governing permissions and limitations
17
+ under the License.
18
+ */
19
+ package org .apache .griffin .metric .model ;
20
+
21
+ import lombok .AllArgsConstructor ;
22
+ import lombok .Builder ;
23
+ import lombok .Data ;
24
+ import lombok .EqualsAndHashCode ;
25
+ import lombok .NoArgsConstructor ;
26
+
27
+ /**
28
+ * A metric tag entity represents fundamental information.
29
+ */
30
+ @ Builder
31
+ @ Data
32
+ @ NoArgsConstructor
33
+ @ AllArgsConstructor
34
+ @ EqualsAndHashCode (callSuper = false )
35
+ public class MetricTag extends BaseEntity {
36
+
37
+ /**
38
+ * An unique identity for a metric tag.
39
+ */
40
+ private long id ;
41
+
42
+ /**
43
+ * Key name
44
+ */
45
+ private String tagKey ;
46
+
47
+ /**
48
+ * The value corresponding to a key
49
+ */
50
+ private String tagValue ;
51
+ }
Original file line number Diff line number Diff line change @@ -18,10 +18,16 @@ Licensed to the Apache Software Foundation (ASF) under one
18
18
*/
19
19
package org .apache .griffin .metric .model ;
20
20
21
- import lombok .*;
22
-
23
- import java .util .Map ;
24
-
21
+ import lombok .AllArgsConstructor ;
22
+ import lombok .Builder ;
23
+ import lombok .Data ;
24
+ import lombok .EqualsAndHashCode ;
25
+ import lombok .NoArgsConstructor ;
26
+ import lombok .ToString ;
27
+
28
+ /**
29
+ * A metric value entity represents fundamental information.
30
+ */
25
31
@ Data
26
32
@ ToString
27
33
@ Builder
@@ -30,10 +36,18 @@ Licensed to the Apache Software Foundation (ASF) under one
30
36
@ EqualsAndHashCode (callSuper = false )
31
37
public class MetricV extends BaseEntity {
32
38
39
+ /**
40
+ * An unique identity for a metric.
41
+ */
33
42
private long metricId ;
34
43
44
+ /**
45
+ * A double number to store metric value.
46
+ */
35
47
private double value ;
36
48
37
- private Map <String , String > tags ;
38
-
49
+ /**
50
+ * The tag property assigned.
51
+ */
52
+ private Tags tags ;
39
53
}
Original file line number Diff line number Diff line change
1
+ package org .apache .griffin .metric .model ;
2
+
3
+ import lombok .AllArgsConstructor ;
4
+ import lombok .Builder ;
5
+ import lombok .Data ;
6
+ import lombok .EqualsAndHashCode ;
7
+ import lombok .NoArgsConstructor ;
8
+
9
+ import java .util .List ;
10
+
11
+ /**
12
+ * A common tag entity represents the relationships among metric entities and metric tag entities.
13
+ */
14
+ @ Data
15
+ @ Builder
16
+ @ NoArgsConstructor
17
+ @ AllArgsConstructor
18
+ @ EqualsAndHashCode (callSuper = false )
19
+ public class Tags extends BaseEntity {
20
+
21
+ /**
22
+ * Metric entity's identity.
23
+ */
24
+ private long metricId ;
25
+
26
+ /**
27
+ * All tag properties assigning to a metric entity.
28
+ */
29
+ private List <MetricTag > metricTags ;
30
+ }
You can’t perform that action at this time.
0 commit comments