|
@@ -44,7 +44,9 @@ public class ODPSToRedis {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ log.info("read odps");
|
|
List<Map<String, String>> fieldValues = odpsService.read(config, argMap);
|
|
List<Map<String, String>> fieldValues = odpsService.read(config, argMap);
|
|
|
|
+ log.info("odps count {}", fieldValues.size());
|
|
if (CollectionUtils.isEmpty(fieldValues)) {
|
|
if (CollectionUtils.isEmpty(fieldValues)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -61,6 +63,7 @@ public class ODPSToRedis {
|
|
);
|
|
);
|
|
|
|
|
|
int partitionNum = fieldValues.size() / 1000 + 1;
|
|
int partitionNum = fieldValues.size() / 1000 + 1;
|
|
|
|
+ log.info("sync redis");
|
|
json.repartition(partitionNum).foreachPartition(iterator -> {
|
|
json.repartition(partitionNum).foreachPartition(iterator -> {
|
|
redisService.mSet(iterator, config);
|
|
redisService.mSet(iterator, config);
|
|
});
|
|
});
|