|
@@ -34,7 +34,7 @@ public class ODPSToRedis {
|
|
}
|
|
}
|
|
|
|
|
|
SparkConf sparkConf = new SparkConf()
|
|
SparkConf sparkConf = new SparkConf()
|
|
- .setMaster("local")
|
|
|
|
|
|
+ // .setMaster("local")
|
|
.setAppName("odps sync to redis");
|
|
.setAppName("odps sync to redis");
|
|
for (Map.Entry<String, String> e : argMap.entrySet()) {
|
|
for (Map.Entry<String, String> e : argMap.entrySet()) {
|
|
sparkConf.set(e.getKey(), e.getValue());
|
|
sparkConf.set(e.getKey(), e.getValue());
|
|
@@ -70,6 +70,7 @@ public class ODPSToRedis {
|
|
}
|
|
}
|
|
|
|
|
|
log.info("odps count {}", count);
|
|
log.info("odps count {}", count);
|
|
|
|
+ argMap.put("partitionNum", String.valueOf(count / 100000 + 1));
|
|
|
|
|
|
JavaRDD<Map<String, String>> fieldValues = odpsService.read(jsc, config, argMap);
|
|
JavaRDD<Map<String, String>> fieldValues = odpsService.read(jsc, config, argMap);
|
|
if (fieldValues == null) {
|
|
if (fieldValues == null) {
|