Jelajahi Sumber

feat:修改partitionNum

zhaohaipeng 1 hari lalu
induk
melakukan
251e1abc85

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

@@ -112,7 +112,9 @@ public class ODPSToRedis {
 
         log.info("odps count {}", count);
         long odpsBatchSize = NumberUtils.toLong(argMap.getOrDefault("odpsBatchSize", "200000"));
-        argMap.put("partitionNum", String.valueOf(count / odpsBatchSize + 1));
+        if (!argMap.containsKey("partitionNum")){
+            argMap.put("partitionNum", String.valueOf(count / odpsBatchSize + 1));
+        }
 
         JavaRDD<Map<String, String>> fieldValues = odpsService.read(jsc, config, argMap);
         if (fieldValues == null) {