未验证 提交 f95cddcb 编写于 作者: wu-sheng's avatar wu-sheng 提交者: GitHub

Merge `TIME_BUCKET` of `Metrics` and `Record` into `StorageData` (#10208)

上级 9b3ef909
......@@ -63,6 +63,7 @@
* Fix the meter value are not correct when using `sumPerMinLabeld` or `sumHistogramPercentile` MAL function.
* Fix cannot display attached events when using Zipkin Lens UI query traces.
* Remove `time_bucket` for both Stream and Measure kinds in BanyanDB plugin.
* Merge `TIME_BUCKET` of `Metrics` and `Record` into `StorageData`.
#### UI
......
......@@ -41,8 +41,6 @@ import static org.apache.skywalking.oap.server.core.analysis.metrics.Metrics.ID;
})
@SQLDatabase.Sharding(shardingAlgorithm = ShardingAlgorithm.TIME_RELATIVE_ID_SHARDING_ALGORITHM, tableShardingColumn = ID, dataSourceShardingColumn = ENTITY_ID)
public abstract class Metrics extends StreamData implements StorageData {
public static final String TIME_BUCKET = "time_bucket";
public static final String ENTITY_ID = "entity_id";
public static final String ID = "id";
......@@ -55,7 +53,8 @@ public abstract class Metrics extends StreamData implements StorageData {
private long timeBucket;
/**
* Time in the cache, only work when MetricsPersistentWorker#enableDatabaseSession == true.
* The last update timestamp of the cache.
* The `update` means it is combined with the new metrics. This update doesn't mean the database level update ultimately.
*/
@Getter
private long lastUpdateTimestamp = 0L;
......
......@@ -29,9 +29,6 @@ import org.apache.skywalking.oap.server.core.storage.annotation.Column;
* original log data or task records. These data needs to persistent without further analysis.
*/
public abstract class Record implements StorageData {
public static final String TIME_BUCKET = "time_bucket";
/**
* Time attribute, all storage data is time sensitive, as same as {@link Metrics}
*/
......
......@@ -21,6 +21,10 @@ package org.apache.skywalking.oap.server.core.remote.data;
import org.apache.skywalking.oap.server.core.remote.Deserializable;
import org.apache.skywalking.oap.server.core.remote.Serializable;
/**
* StreamData indicates all implementations supporting {@link Serializable}, {@link Deserializable} and remote hashcode
* to do L1 and L2 aggregation cross OAP nodes.
*/
public abstract class StreamData implements Serializable, Deserializable {
public abstract int remoteHashCode();
}
......@@ -22,6 +22,8 @@ package org.apache.skywalking.oap.server.core.storage;
* Any persistent entity should be an implementation of this interface.
*/
public interface StorageData {
String TIME_BUCKET = "time_bucket";
/**
* @return the unique id used in any storage option.
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册