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 2019/03/21 01:02:20 UTC

[incubator-skywalking] branch master updated: Supplement unexpected exception message. (#2389)

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.git


The following commit(s) were added to refs/heads/master by this push:
     new 7419a59  Supplement unexpected exception message. (#2389)
7419a59 is described below

commit 7419a59125b5e98acc5fc07e1d9f1ae40bac4de8
Author: 彭勇升 pengys <80...@qq.com>
AuthorDate: Thu Mar 21 09:02:16 2019 +0800

    Supplement unexpected exception message. (#2389)
---
 .../oap/server/core/analysis/worker/IndicatorProcess.java         | 2 +-
 .../skywalking/oap/server/core/analysis/worker/RecordProcess.java | 3 ++-
 .../skywalking/oap/server/core/analysis/worker/TopNProcess.java   | 2 +-
 .../oap/server/core/register/worker/InventoryProcess.java         | 2 +-
 .../core/storage/annotation/StorageEntityAnnotationUtils.java     | 8 ++++----
 .../storage/plugin/elasticsearch/query/TopologyQueryEsDAO.java    | 4 ++--
 6 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/IndicatorProcess.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/IndicatorProcess.java
index ecbdc5b..69fbfff 100644
--- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/IndicatorProcess.java
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/IndicatorProcess.java
@@ -49,7 +49,7 @@ public enum IndicatorProcess {
         try {
             indicatorDAO = storageDAO.newIndicatorDao(builderClass.newInstance());
         } catch (InstantiationException | IllegalAccessException e) {
-            throw new UnexpectedException("");
+            throw new UnexpectedException("Create " + builderClass.getSimpleName() + " indicator DAO failure.", e);
         }
 
         IndicatorPersistentWorker minutePersistentWorker = minutePersistentWorker(moduleManager, indicatorDAO, modelName);
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/RecordProcess.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/RecordProcess.java
index 0ed70f2..b384ccd 100644
--- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/RecordProcess.java
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/RecordProcess.java
@@ -50,7 +50,8 @@ public enum RecordProcess {
         try {
             recordDAO = storageDAO.newRecordDao(builderClass.newInstance());
         } catch (InstantiationException | IllegalAccessException e) {
-            throw new UnexpectedException("");
+            throw new UnexpectedException("Create " + builderClass.getSimpleName() + " record DAO failure.", e);
+
         }
 
         RecordPersistentWorker persistentWorker = new RecordPersistentWorker(WorkerIdGenerator.INSTANCES.generate(), modelName,
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/TopNProcess.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/TopNProcess.java
index 059c46e..b83851a 100644
--- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/TopNProcess.java
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/TopNProcess.java
@@ -50,7 +50,7 @@ public enum TopNProcess {
         try {
             recordDAO = storageDAO.newRecordDao(builderClass.newInstance());
         } catch (InstantiationException | IllegalAccessException e) {
-            throw new UnexpectedException("");
+            throw new UnexpectedException("Create " + builderClass.getSimpleName() + " top n record DAO failure.", e);
         }
 
         TopNWorker persistentWorker = new TopNWorker(WorkerIdGenerator.INSTANCES.generate(), modelName, moduleManager,
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/register/worker/InventoryProcess.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/register/worker/InventoryProcess.java
index ab7e83b..ce0e97a 100644
--- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/register/worker/InventoryProcess.java
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/register/worker/InventoryProcess.java
@@ -49,7 +49,7 @@ public enum InventoryProcess {
         try {
             registerDAO = storageDAO.newRegisterDao(builderClass.newInstance());
         } catch (InstantiationException | IllegalAccessException e) {
-            throw new UnexpectedException("");
+            throw new UnexpectedException("Create " + builderClass.getSimpleName() + " register DAO failure.", e);
         }
 
         RegisterPersistentWorker persistentWorker = new RegisterPersistentWorker(WorkerIdGenerator.INSTANCES.generate(), modelName, moduleManager, registerDAO, scopeId);
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/annotation/StorageEntityAnnotationUtils.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/annotation/StorageEntityAnnotationUtils.java
index ecfebe4..8beea71 100644
--- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/annotation/StorageEntityAnnotationUtils.java
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/annotation/StorageEntityAnnotationUtils.java
@@ -31,7 +31,7 @@ public class StorageEntityAnnotationUtils {
             StorageEntity annotation = (StorageEntity)aClass.getAnnotation(StorageEntity.class);
             return annotation.name();
         } else {
-            throw new UnexpectedException("");
+            throw new UnexpectedException("Fail to get model name from class " + aClass.getSimpleName());
         }
     }
 
@@ -40,7 +40,7 @@ public class StorageEntityAnnotationUtils {
             StorageEntity annotation = (StorageEntity)aClass.getAnnotation(StorageEntity.class);
             return annotation.deleteHistory();
         } else {
-            throw new UnexpectedException("");
+            throw new UnexpectedException("Fail to get delete history tag from class " + aClass.getSimpleName());
         }
     }
 
@@ -49,7 +49,7 @@ public class StorageEntityAnnotationUtils {
             StorageEntity annotation = (StorageEntity)aClass.getAnnotation(StorageEntity.class);
             return annotation.builder();
         } else {
-            throw new UnexpectedException("");
+            throw new UnexpectedException("Fail to get entity builder from class " + aClass.getSimpleName());
         }
     }
 
@@ -58,7 +58,7 @@ public class StorageEntityAnnotationUtils {
             StorageEntity annotation = (StorageEntity)aClass.getAnnotation(StorageEntity.class);
             return annotation.sourceScopeId();
         } else {
-            throw new UnexpectedException("");
+            throw new UnexpectedException("Fail to get source scope from class " + aClass.getSimpleName());
         }
     }
 }
diff --git a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/TopologyQueryEsDAO.java b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/TopologyQueryEsDAO.java
index d067b1e..5a90d67 100644
--- a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/TopologyQueryEsDAO.java
+++ b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/TopologyQueryEsDAO.java
@@ -55,7 +55,7 @@ public class TopologyQueryEsDAO extends EsDAO implements ITopologyQueryDAO {
     public List<Call> loadSpecifiedServerSideServiceRelations(Step step, long startTB, long endTB,
         List<Integer> serviceIds) throws IOException {
         if (CollectionUtils.isEmpty(serviceIds)) {
-            throw new UnexpectedException("Service id is null");
+            throw new UnexpectedException("Service id is empty");
         }
 
         SearchSourceBuilder sourceBuilder = SearchSourceBuilder.searchSource();
@@ -70,7 +70,7 @@ public class TopologyQueryEsDAO extends EsDAO implements ITopologyQueryDAO {
     public List<Call> loadSpecifiedClientSideServiceRelations(Step step, long startTB, long endTB,
         List<Integer> serviceIds) throws IOException {
         if (CollectionUtils.isEmpty(serviceIds)) {
-            throw new UnexpectedException("Service id is null");
+            throw new UnexpectedException("Service id is empty");
         }
 
         SearchSourceBuilder sourceBuilder = SearchSourceBuilder.searchSource();