|
@@ -30,8 +30,8 @@ public class FeatureDiff {
|
|
|
abCodes.add("ab1");
|
|
|
abCodes.add("ab2");
|
|
|
abCodes.add("ab3");
|
|
|
- tableToCol = new HashMap<>();
|
|
|
-
|
|
|
+// tableToCol = new HashMap<>();
|
|
|
+//
|
|
|
// tableToCol.put("alg_mid_feature_play", "c1_feature");
|
|
|
// tableToCol.put("alg_mid_feature_share_and_return", "c2_feature");
|
|
|
// tableToCol.put("alg_mid_feature_play_tags", "c3_feature");
|
|
@@ -62,7 +62,10 @@ public class FeatureDiff {
|
|
|
// tableToCol.put("alg_vid_feature_feed_province_root_return", "b19_feature");
|
|
|
}
|
|
|
|
|
|
- private static void addUserTable() {
|
|
|
+ public static void main(String[] args) {
|
|
|
+
|
|
|
+ tableToCol = new HashMap<>();
|
|
|
+
|
|
|
tableToCol.put("alg_mid_feature_play", "c1_feature");
|
|
|
tableToCol.put("alg_mid_feature_share_and_return", "c2_feature");
|
|
|
tableToCol.put("alg_mid_feature_play_tags", "c3_feature");
|
|
@@ -72,9 +75,6 @@ public class FeatureDiff {
|
|
|
tableToCol.put("alg_mid_feature_feed_exp_return_tags", "c7_feature");
|
|
|
tableToCol.put("alg_mid_feature_sharecf", "c8_feature");
|
|
|
tableToCol.put("alg_mid_feature_returncf", "c9_feature");
|
|
|
- }
|
|
|
-
|
|
|
- private static void addVideoTable() {
|
|
|
tableToCol.put("alg_vid_feature_all_exp", "b1_feature");
|
|
|
tableToCol.put("alg_vid_feature_all_share", "b2_feature");
|
|
|
tableToCol.put("alg_vid_feature_all_return", "b3_feature");
|
|
@@ -94,22 +94,6 @@ public class FeatureDiff {
|
|
|
tableToCol.put("alg_vid_feature_feed_province_exp", "b17_feature");
|
|
|
tableToCol.put("alg_vid_feature_feed_province_root_share", "b18_feature");
|
|
|
tableToCol.put("alg_vid_feature_feed_province_root_return", "b19_feature");
|
|
|
- }
|
|
|
-
|
|
|
- public static void main(String[] args) {
|
|
|
-
|
|
|
- log.info("args {}", JSONUtils.toJson(args));
|
|
|
- if (args[3].equals("0")) {
|
|
|
- addVideoTable();
|
|
|
- }
|
|
|
- if (args[3].equals("1")) {
|
|
|
- addUserTable();
|
|
|
- }
|
|
|
- if (args[3].equals("2")) {
|
|
|
- addVideoTable();
|
|
|
- addUserTable();
|
|
|
- }
|
|
|
- log.info("tableToCol {}", JSONUtils.toJson(tableToCol));
|
|
|
|
|
|
SparkConf sparkConf = new SparkConf()
|
|
|
// .setMaster("local")
|
|
@@ -129,9 +113,6 @@ public class FeatureDiff {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- long totalCount = fieldValues.count();
|
|
|
- log.info("total count {}", totalCount);
|
|
|
-
|
|
|
long diffCount =
|
|
|
fieldValues.repartition(partitionNum).filter(new Function<Map<String, String>,
|
|
|
Boolean>() {
|