丁云鹏 10 месяцев назад
Родитель
Сommit
a6eb96b761

+ 2 - 19
recommend-feature-produce/src/main/java/com/tzld/piaoquan/recommend/feature/produce/FeatureDiff.java

@@ -20,7 +20,7 @@ public class FeatureDiff {
 
     private static ODPSService odpsService = new ODPSService();
 
-    private static Map<String, String> tableToCol = new HashMap<>();
+    private static Map<String, String> tableToCol;
     ;
     private static Set<String> abCodes;
 
@@ -30,9 +30,8 @@ public class FeatureDiff {
         abCodes.add("ab1");
         abCodes.add("ab2");
         abCodes.add("ab3");
-    }
+        tableToCol = new HashMap<>();
 
-    private static void addUserTable() {
         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");
@@ -42,9 +41,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");
@@ -68,19 +64,6 @@ public class FeatureDiff {
 
     public static void main(String[] args) {
 
-        log.info("args {}", JSONUtils.toJson(args));
-        if (args[0].equals("0")) {
-            addVideoTable();
-        }
-        if (args[0].equals("1")) {
-            addUserTable();
-        }
-        if (args[0].equals("2")) {
-            addVideoTable();
-            addUserTable();
-        }
-        log.info("tableToCol {}", JSONUtils.toJson(tableToCol));
-
 
         SparkConf sparkConf = new SparkConf()
                 // .setMaster("local")