丁云鹏 11 месяцев назад
Родитель
Сommit
d1f1e65e05

+ 3 - 2
recommend-feature-produce/src/main/java/com/tzld/piaoquan/recommend/feature/produce/ODPSToRedis.java

@@ -41,14 +41,14 @@ public class ODPSToRedis {
         DTSConfig config = dtsConfigService.getDTSConfig(argMap);
         if (config == null || !config.selfCheck()) {
             log.error("dts config error");
-            return;
+            System.exit(0);
         }
 
         List<Map<String, String>> fieldValues = odpsService.read(config, argMap);
         log.info("odps count {}", fieldValues.size());
         if (CollectionUtils.isEmpty(fieldValues)) {
             log.info("odps empty");
-            return;
+            System.exit(0);
         }
 
         // RDD
@@ -66,6 +66,7 @@ public class ODPSToRedis {
         json.repartition(partitionNum).foreachPartition(iterator -> {
             redisService.mSet(iterator, config);
         });
+        jsc.stop();
     }
 
 }