From 1c545a3708d2e382519741c6d6df5666e4cb4775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E5=8B=87=E5=8D=87=20pengys?= Date: Wed, 12 Jun 2019 08:17:15 +0800 Subject: [PATCH] Fixed a time series bug about downsampling setting in processors are different from the setting in receivers. (#2856) #2851 --- .../server/core/analysis/worker/RecordStreamProcessor.java | 2 +- .../oap/server/core/analysis/worker/TopNStreamProcessor.java | 2 +- .../skywalking/oap/server/core/storage/model/ModelName.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/RecordStreamProcessor.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/RecordStreamProcessor.java index 04e772a5c..6483a118f 100644 --- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/RecordStreamProcessor.java +++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/RecordStreamProcessor.java @@ -65,7 +65,7 @@ public class RecordStreamProcessor implements StreamProcessor { } IModelSetter modelSetter = moduleDefineHolder.find(CoreModule.NAME).provider().getService(IModelSetter.class); - Model model = modelSetter.putIfAbsent(recordClass, stream.scopeId(), new Storage(stream.name(), true, true, Downsampling.Minute)); + Model model = modelSetter.putIfAbsent(recordClass, stream.scopeId(), new Storage(stream.name(), true, true, Downsampling.Second)); RecordPersistentWorker persistentWorker = new RecordPersistentWorker(moduleDefineHolder, model, 1000, recordDAO); persistentWorkers.add(persistentWorker); diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/TopNStreamProcessor.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/TopNStreamProcessor.java index 92a88a495..03ae693ef 100644 --- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/TopNStreamProcessor.java +++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/TopNStreamProcessor.java @@ -61,7 +61,7 @@ public class TopNStreamProcessor implements StreamProcessor { } IModelSetter modelSetter = moduleDefineHolder.find(CoreModule.NAME).provider().getService(IModelSetter.class); - Model model = modelSetter.putIfAbsent(topNClass, stream.scopeId(), new Storage(stream.name(), true, true, Downsampling.Minute)); + Model model = modelSetter.putIfAbsent(topNClass, stream.scopeId(), new Storage(stream.name(), true, true, Downsampling.Second)); TopNWorker persistentWorker = new TopNWorker(moduleDefineHolder, model, 50, recordDAO); persistentWorkers.add(persistentWorker); diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/model/ModelName.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/model/ModelName.java index 170e7f8ee..018ed8f26 100644 --- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/model/ModelName.java +++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/model/ModelName.java @@ -33,8 +33,8 @@ public class ModelName { return modelName + Const.ID_SPLIT + Downsampling.Day.getName(); case Hour: return modelName + Const.ID_SPLIT + Downsampling.Hour.getName(); - case Second: - return modelName + Const.ID_SPLIT + Downsampling.Second.getName(); +// case Second: +// return modelName + Const.ID_SPLIT + Downsampling.Second.getName(); default: return modelName; } -- GitLab