Browse Source

ad feature fix 20240106

sunmingze 1 năm trước cách đây
mục cha
commit
68d71ae4ce

+ 1 - 1
pom.xml

@@ -48,7 +48,7 @@
         <dependency>
             <groupId>com.tzld.piaoquan</groupId>
             <artifactId>recommend-feature-client</artifactId>
-            <version>1.0.6</version>
+            <version>1.0.9</version>
         </dependency>
 
 

+ 2 - 1
src/main/java/examples/sparksql/SparkAdCTRSampleTester.java

@@ -36,7 +36,8 @@ public class SparkAdCTRSampleTester {
         System.out.println("Read odps table...");
 
         JavaRDD<Record> readData = odpsOps.readTableWithJava(project, table, partition, new RecordsToSamples(), Integer.valueOf(30));
-        readData.filter(row -> row.get("type") != null).filter(row -> row.getString("type").equals("VlogAdCtrLRScorer"))
+        readData.filter(row -> row.get("type") != null)
+                .filter(row -> row.get("lrsample") != null)
                 .map(line -> singleParse(line))
                 .saveAsTextFile(hdfsPath);
     }

+ 2 - 1
src/main/java/examples/sparksql/SparkAdCVRSampleTester.java

@@ -36,7 +36,8 @@ public class SparkAdCVRSampleTester {
         System.out.println("Read odps table...");
 
         JavaRDD<Record> readData = odpsOps.readTableWithJava(project, table, partition, new RecordsToSamples(), Integer.valueOf(30));
-        readData.filter(row -> row.getString("type").equals("VlogAdCtrLRScorer"))
+        readData.filter(row -> row.get("type") != null)
+                .filter(row -> row.get("lrsample") != null)
                 .map(line -> singleParse(line))
                 .saveAsTextFile(hdfsPath);
     }