Forráskód Böngészése

remove system.exit and update log4j rolling policy

shjung 10 hónapja
szülő
commit
81f968b7a2

+ 3 - 2
conf/ggits-etlp-server.yml

@@ -1,12 +1,13 @@
 spring:
   profiles:
     active: dev
+server:
+  port: 9874
 
 application:
-  process-id: 81010
+  process-id: 81013
   logging-hist: true
   page-count: 0
   scheduling:
-    pool-size: 0
     process-ggits-etlp: 10 3 3 * * *
 

+ 31 - 0
qodana.yaml

@@ -0,0 +1,31 @@
+#-------------------------------------------------------------------------------#
+#               Qodana analysis is configured by qodana.yaml file               #
+#             https://www.jetbrains.com/help/qodana/qodana-yaml.html            #
+#-------------------------------------------------------------------------------#
+version: "1.0"
+
+#Specify inspection profile for code analysis
+profile:
+  name: qodana.starter
+
+#Enable inspections
+#include:
+#  - name: <SomeEnabledInspectionId>
+
+#Disable inspections
+#exclude:
+#  - name: <SomeDisabledInspectionId>
+#    paths:
+#      - <path/where/not/run/inspection>
+
+projectJDK: 8 #(Applied in CI/CD pipeline)
+
+#Execute shell command before Qodana execution (Applied in CI/CD pipeline)
+#bootstrap: sh ./prepare-qodana.sh
+
+#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
+#plugins:
+#  - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com)
+
+#Specify Qodana linter for analysis (Applied in CI/CD pipeline)
+linter: jetbrains/qodana-jvm:latest

+ 4 - 4
src/main/java/com/ggits/etlp/server/common/Elapsed.java

@@ -58,15 +58,15 @@ public class Elapsed {
 
 	public static String elapsedTimeStr(long elapsed) {
 		long seconds = TimeUnit.SECONDS.convert(elapsed, TimeUnit.NANOSECONDS);
-		long miliSeconds = TimeUnit.MILLISECONDS.convert(elapsed, TimeUnit.NANOSECONDS) % 1000;
+		long milliSeconds = TimeUnit.MILLISECONDS.convert(elapsed, TimeUnit.NANOSECONDS) % 1000;
 		long microSeconds = TimeUnit.MICROSECONDS.convert(elapsed, TimeUnit.NANOSECONDS) % 1000;
 		long nanoSeconds = TimeUnit.NANOSECONDS.convert(elapsed, TimeUnit.NANOSECONDS) % 1000;
 
 		if (seconds > 0) {
-			return String.format("Elapsed: %,d sec. %3d ms. %3d us. %3d ns.", seconds, miliSeconds, microSeconds, nanoSeconds);
+			return String.format("Elapsed: %,d sec. %3d ms. %3d us. %3d ns.", seconds, milliSeconds, microSeconds, nanoSeconds);
 		}
-		if (miliSeconds > 0) {
-			return String.format("Elapsed: %3d ms. %3d us. %3d ns.", miliSeconds, microSeconds, nanoSeconds);
+		if (milliSeconds > 0) {
+			return String.format("Elapsed: %3d ms. %3d us. %3d ns.", milliSeconds, microSeconds, nanoSeconds);
 		}
 		if (microSeconds > 0) {
 			return String.format("Elapsed: --- ms. %3d us. %3d ns.", microSeconds, nanoSeconds);

+ 11 - 11
src/main/java/com/ggits/etlp/server/service/GgitsEtlpService.java

@@ -153,7 +153,7 @@ public class GgitsEtlpService {
         Elapsed totElapsed = new Elapsed();
         log.info("TB_INT, SCS_T_CON_INTLC START.");
         List<HashMap<String, Object>> etlpLists = new ArrayList<>();
-        List<HashMap<String, Object>> lists = new ArrayList<>();
+        List<HashMap<String, Object>> lists;
 
         for (String key : this.centerList) {
             RegionCenter center = this.repo.getCenterMap().get(key);
@@ -244,7 +244,7 @@ public class GgitsEtlpService {
         Elapsed totElapsed = new Elapsed();
         log.info("TB_INT_FLOW, SCS_T_CON_INTFLOW START.");
         List<HashMap<String, Object>> etlpLists = new ArrayList<>();
-        List<HashMap<String, Object>> lists = new ArrayList<>();
+        List<HashMap<String, Object>> lists;
 
         for (String key : this.centerList) {
             RegionCenter center = this.repo.getCenterMap().get(key);
@@ -255,7 +255,7 @@ public class GgitsEtlpService {
             elapsed.reset();
 
             int writeCount = 0;
-            int currWriteCount = 0;
+            int currWriteCount;
             Elapsed job = new Elapsed();
             EtlpInfo etlp = center.getEtlpFlow();
             etlp.startEtlp();
@@ -329,7 +329,7 @@ public class GgitsEtlpService {
         Elapsed totElapsed = new Elapsed();
         log.info("TB_INT_OPER_PLAN, SCS_T_CON_INTDPLAN START.");
         List<HashMap<String, Object>> etlpLists = new ArrayList<>();
-        List<HashMap<String, Object>> lists = new ArrayList<>();
+        List<HashMap<String, Object>> lists;
 
         for (String key : this.centerList) {
             RegionCenter center = this.repo.getCenterMap().get(key);
@@ -340,7 +340,7 @@ public class GgitsEtlpService {
             elapsed.reset();
 
             int writeCount = 0;
-            int currWriteCount = 0;
+            int currWriteCount;
             Elapsed job = new Elapsed();
             EtlpInfo etlp = center.getEtlpOperPlan();
             etlp.startEtlp();
@@ -414,7 +414,7 @@ public class GgitsEtlpService {
         Elapsed totElapsed = new Elapsed();
         log.info("TB_INT_DY_PLAN, SCS_T_CON_INTWEEK START.");
         List<HashMap<String, Object>> etlpLists = new ArrayList<>();
-        List<HashMap<String, Object>> lists = new ArrayList<>();
+        List<HashMap<String, Object>> lists;
 
         for (String key : this.centerList) {
             RegionCenter center = this.repo.getCenterMap().get(key);
@@ -425,7 +425,7 @@ public class GgitsEtlpService {
             elapsed.reset();
 
             int writeCount = 0;
-            int currWriteCount = 0;
+            int currWriteCount;
             Elapsed job = new Elapsed();
             EtlpInfo etlp = center.getEtlpDyPlan();
             etlp.startEtlp();
@@ -499,7 +499,7 @@ public class GgitsEtlpService {
         Elapsed totElapsed = new Elapsed();
         log.info("TB_INT_RESRV_PLAN, SCS_T_CON_INTFPLAN START.");
         List<HashMap<String, Object>> etlpLists = new ArrayList<>();
-        List<HashMap<String, Object>> lists = new ArrayList<>();
+        List<HashMap<String, Object>> lists;
 
         for (String key : this.centerList) {
             RegionCenter center = this.repo.getCenterMap().get(key);
@@ -510,7 +510,7 @@ public class GgitsEtlpService {
             elapsed.reset();
 
             int writeCount = 0;
-            int currWriteCount = 0;
+            int currWriteCount;
             Elapsed job = new Elapsed();
             EtlpInfo etlp = center.getEtlpResrvPlan();
             etlp.startEtlp();
@@ -584,7 +584,7 @@ public class GgitsEtlpService {
         Elapsed totElapsed = new Elapsed();
         log.info("TB_INT_SIGNALMAP, SCS_T_CON_INTSIGMAP START.");
         List<HashMap<String, Object>> etlpLists = new ArrayList<>();
-        List<HashMap<String, Object>> lists = new ArrayList<>();
+        List<HashMap<String, Object>> lists;
 
         for (String key : this.centerList) {
             RegionCenter center = this.repo.getCenterMap().get(key);
@@ -595,7 +595,7 @@ public class GgitsEtlpService {
             elapsed.reset();
 
             int writeCount = 0;
-            int currWriteCount = 0;
+            int currWriteCount;
             Elapsed job = new Elapsed();
             EtlpInfo etlp = center.getEtlpSigmap();
             etlp.startEtlp();

+ 2 - 2
src/main/resources/application.yml

@@ -27,7 +27,7 @@ spring:
         idleTimeout: 30000
 
 server:
-  port: 9873
+  port: 9874
 management:
   endpoints:
     web:
@@ -35,7 +35,7 @@ management:
         include: health, metrics
 
 application:
-  process-id: 81010
+  process-id: 81013
   logging-hist: true
   page-count: 0
   scheduling:

+ 2 - 2
src/main/resources/mybatis/mapper/sig/SigMapper.xml

@@ -11,7 +11,7 @@
                A.REGION_NO AS regionNo,
                (A.REGION_NO * 10000) AS minNodeId,
                (A.REGION_NO * 10000) + 9999 AS maxNodeId
-        FROM TB_REGION_GGITS A, TB_REGION_CENTER B
+        FROM TB_GGITS_REGION A, TB_REGION_CENTER B
         WHERE A.REGION_CD = B.REGION_CD
         ]]>
     </select>
@@ -22,7 +22,7 @@
                X.REGION_CD                      AS regionCd,
                NVL(Y.UPDT_DT, '20000101000000') AS updtDt
         FROM (SELECT B.REGION_CD
-              FROM TB_REGION_GGITS A, TB_REGION_CENTER B
+              FROM TB_GGITS_REGION A, TB_REGION_CENTER B
               WHERE A.REGION_CD = B.REGION_CD) X,
              (SELECT A.REGION_CD, A.UPDT_DT
               FROM TB_GGITS_ETLP A