|
@@ -30,7 +30,7 @@ public class SparkAdCTRSampleLoader {
|
|
|
String odpsUrl = "http://service.odps.aliyun.com/api";
|
|
|
String tunnelUrl = "http://dt.cn-hangzhou.maxcompute.aliyun-inc.com";
|
|
|
String project = "loghubods";
|
|
|
- String table = "alg_recsys_view_sample";
|
|
|
+ String table = "alg_ad_view_sample";
|
|
|
String hdfsPath = "/dw/recommend/model/ad_ctr_samples/" + partition;
|
|
|
|
|
|
SparkConf sparkConf = new SparkConf().setAppName("E-MapReduce Demo 3-2: Spark MaxCompute Demo (Java)");
|
|
@@ -38,7 +38,7 @@ public class SparkAdCTRSampleLoader {
|
|
|
OdpsOps odpsOps = new OdpsOps(jsc.sc(), accessId, accessKey, odpsUrl, tunnelUrl);
|
|
|
System.out.println("Read odps table...");
|
|
|
|
|
|
- JavaRDD<String> readData = odpsOps.readTableWithJava(project, table, partition, new RecordsToSamples(), Integer.valueOf(50));
|
|
|
+ JavaRDD<String> readData = odpsOps.readTableWithJava(project, table, partition, new RecordsToSamples(), Integer.valueOf(30));
|
|
|
readData.saveAsTextFile(hdfsPath);
|
|
|
}
|
|
|
|