|
@@ -15,7 +15,7 @@ public class RecommRedisFeatureConstructor {
|
|
|
|
|
|
public static UserFeature constructUserFeature(Record record) {
|
|
public static UserFeature constructUserFeature(Record record) {
|
|
UserFeature userFeature = new UserFeature();
|
|
UserFeature userFeature = new UserFeature();
|
|
- userFeature.setUid(record.get("uid").toString());
|
|
|
|
|
|
+ userFeature.setUid(String.valueOf(record.getBigint("uid")));
|
|
userFeature.setMid(record.getString("mids").toString());
|
|
userFeature.setMid(record.getString("mids").toString());
|
|
userFeature.setUser_cycle_bucket_7days(record.getString("u_cycle_bucket_7days"));
|
|
userFeature.setUser_cycle_bucket_7days(record.getString("u_cycle_bucket_7days"));
|
|
userFeature.setUser_cycle_bucket_30days(record.getString("u_cycle_bucket_30days"));
|
|
userFeature.setUser_cycle_bucket_30days(record.getString("u_cycle_bucket_30days"));
|
|
@@ -76,11 +76,11 @@ public class RecommRedisFeatureConstructor {
|
|
|
|
|
|
public static ItemFeature constructItemFeature(Record record) {
|
|
public static ItemFeature constructItemFeature(Record record) {
|
|
ItemFeature itemFeature = new ItemFeature();
|
|
ItemFeature itemFeature = new ItemFeature();
|
|
- itemFeature.setVideoId(record.get("videoid").toString());
|
|
|
|
- itemFeature.setUpId(record.get("uid").toString());
|
|
|
|
- itemFeature.setPlayLength(record.get("play_count").toString());
|
|
|
|
- itemFeature.setTotalTime(record.get("total_time").toString());
|
|
|
|
- itemFeature.setDaysSinceUpload(record.get("existence_days").toString());
|
|
|
|
|
|
+ itemFeature.setVideoId(String.valueOf(record.getBigint("videoid")));
|
|
|
|
+ itemFeature.setUpId(String.valueOf(record.getBigint("uid")));
|
|
|
|
+ itemFeature.setPlayLength(String.valueOf(record.getBigint("play_count")));
|
|
|
|
+ itemFeature.setTotalTime(String.valueOf(record.getBigint("total_time")));
|
|
|
|
+ itemFeature.setDaysSinceUpload(String.valueOf(record.getDouble("existence_days")));
|
|
|
|
|
|
UserActionFeature user1dayActionFeature = new UserActionFeature();
|
|
UserActionFeature user1dayActionFeature = new UserActionFeature();
|
|
user1dayActionFeature.setOriginExp_cnt(record.getString("i_1day_exp_cnt"));
|
|
user1dayActionFeature.setOriginExp_cnt(record.getString("i_1day_exp_cnt"));
|