|
@@ -10,9 +10,7 @@ import org.apache.spark.api.java.JavaRDD;
|
|
import org.apache.spark.api.java.JavaSparkContext;
|
|
import org.apache.spark.api.java.JavaSparkContext;
|
|
import org.apache.spark.api.java.function.Function;
|
|
import org.apache.spark.api.java.function.Function;
|
|
|
|
|
|
-import java.util.Collections;
|
|
|
|
-import java.util.HashMap;
|
|
|
|
-import java.util.Map;
|
|
|
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @author dyp
|
|
* @author dyp
|
|
@@ -23,8 +21,16 @@ public class FeatureDiff {
|
|
private static ODPSService odpsService = new ODPSService();
|
|
private static ODPSService odpsService = new ODPSService();
|
|
|
|
|
|
private static Map<String, String> tableToCol;
|
|
private static Map<String, String> tableToCol;
|
|
|
|
+ private static Set<String> abCodes;
|
|
|
|
|
|
static {
|
|
static {
|
|
|
|
+ abCodes = new HashSet<>();
|
|
|
|
+ abCodes.add("ab0");
|
|
|
|
+ abCodes.add("ab1");
|
|
|
|
+ abCodes.add("ab2");
|
|
|
|
+ abCodes.add("ab3");
|
|
|
|
+
|
|
|
|
+
|
|
tableToCol = new HashMap<>();
|
|
tableToCol = new HashMap<>();
|
|
tableToCol.put("alg_vid_feature_all_exp", "b1_feature");
|
|
tableToCol.put("alg_vid_feature_all_exp", "b1_feature");
|
|
tableToCol.put("alg_vid_feature_all_share", "b2_feature");
|
|
tableToCol.put("alg_vid_feature_all_share", "b2_feature");
|
|
@@ -55,7 +61,6 @@ public class FeatureDiff {
|
|
// tableToCol.put("alg_mid_feature_sharecf", "c8_feature");
|
|
// tableToCol.put("alg_mid_feature_sharecf", "c8_feature");
|
|
// tableToCol.put("alg_mid_feature_returncf", "c9_feature");
|
|
// tableToCol.put("alg_mid_feature_returncf", "c9_feature");
|
|
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
public static void main(String[] args) {
|
|
public static void main(String[] args) {
|
|
@@ -88,6 +93,10 @@ public class FeatureDiff {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (!abCodes.contains(map.get("abcode"))) {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
Map<String, Map<String, String>> metaFeatureMap = JSONUtils.fromJson(map.get("metafeaturemap"),
|
|
Map<String, Map<String, String>> metaFeatureMap = JSONUtils.fromJson(map.get("metafeaturemap"),
|
|
new TypeToken<Map<String, Map<String, String>>>() {
|
|
new TypeToken<Map<String, Map<String, String>>>() {
|
|
}, Collections.emptyMap());
|
|
}, Collections.emptyMap());
|