Skip to content

Commit 9504b22

Browse files
committed
Fixed error with user forum creation date
1 parent f91cf96 commit 9504b22

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/main/java/ldbc/socialnet/dbgen/generator/ScalableGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1517,7 +1517,7 @@ private DataExporter getSerializer(String type, String outputFileName) {
15171517
return null;
15181518
}
15191519
return new DataExporter(format,sibOutputDir, threadId, dateThreshold,
1520-
exportText,enableCompression,conf.getInt("numUpdatePartitions",1),tagDictionary,browserDictonry,companiesDictionary,
1520+
exportText,enableCompression,conf.getInt("numUpdatePartitions",1),deltaTime,tagDictionary,browserDictonry,companiesDictionary,
15211521
unversityDictionary,ipAddDictionary,locationDictionary,languageDictionary, configFile, factorTable, startMonth, startYear, stats);
15221522
}
15231523

src/main/java/ldbc/socialnet/dbgen/serializer/DataExporter.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public enum DataFormat {
7070
private HashMap<Long, ReducedUserProfile.Counts> factorTable;
7171
private int startMonth, startYear;
7272
private int reducerId = 0;
73+
private long deltaTime = 0;
7374
GregorianCalendar c;
7475

7576
public DataExporter( DataFormat format,
@@ -79,6 +80,7 @@ public DataExporter( DataFormat format,
7980
boolean exportText,
8081
boolean compressed,
8182
int numPartitions,
83+
long deltaTime,
8284
TagDictionary tagDic,
8385
BrowserDictionary browsers,
8486
CompanyDictionary companyDic,
@@ -90,6 +92,7 @@ public DataExporter( DataFormat format,
9092
HashMap<Long, ReducedUserProfile.Counts> factorTable,
9193
int startMonth, int startYear,
9294
Statistics statistics) {
95+
this.deltaTime = deltaTime;
9396
this.locationDic = locationDic;
9497
this.companyDic = companyDic;
9598
this.universityDic = universityDic;
@@ -276,7 +279,7 @@ public void export( UserInfo userInfo ) {
276279

277280
Group group = new Group();
278281
//The forums of the user
279-
group.setCreatedDate(userInfo.user.getCreationDate());
282+
group.setCreatedDate(userInfo.user.getCreationDate()+deltaTime);
280283
group.setGroupName("Wall of " + userInfo.extraInfo.getFirstName() + " " + userInfo.extraInfo.getLastName());
281284
group.setGroupId(userInfo.user.getForumWallId());
282285
group.setModeratorId(userInfo.user.getAccountId());
@@ -301,7 +304,7 @@ public void export( UserInfo userInfo ) {
301304
if (friends[i] != null && friends[i].getCreatedTime() != -1){
302305
GroupMemberShip membership = new GroupMemberShip();
303306
membership.setGroupId(group.getGroupId());
304-
membership.setJoinDate(friends[i].getCreatedTime());
307+
membership.setJoinDate(friends[i].getCreatedTime()+deltaTime);
305308
membership.setUserId(friends[i].getFriendAcc());
306309
if( membership.getJoinDate() <= dateThreshold ) {
307310
staticSerializer.serialize(membership);

0 commit comments

Comments
 (0)