@@ -795,8 +795,9 @@ public void generateUserActivity( ReducedUserProfile userProfile, Reducer<MapRed
795
795
firstNameCount .put (extraInfo .getFirstName (), nameCount +1 );
796
796
long init = System .currentTimeMillis ();
797
797
if (conf .getBoolean ("activity" ,true )) {
798
- generatePosts (uniformPostGenerator , reducedUserProfiles [index ], extraInfo );
799
- generatePosts (flashmobPostGenerator , reducedUserProfiles [index ], extraInfo );
798
+ Group wall = generateWall (userInfo );
799
+ generatePosts (uniformPostGenerator , reducedUserProfiles [index ], extraInfo , wall );
800
+ generatePosts (flashmobPostGenerator , reducedUserProfiles [index ], extraInfo , wall );
800
801
generatePhotos (reducedUserProfiles [index ], extraInfo );
801
802
generateUserGroups (reducedUserProfiles [index ], extraInfo );
802
803
}
@@ -982,7 +983,27 @@ private void mr2SlideLastCellsFriendShip(int pass, int cellPos, int numleftCell,
982
983
exactOutput = exactOutput + cellSize ;
983
984
}
984
985
985
- private void generatePosts (PostGenerator postGenerator , ReducedUserProfile user , UserExtraInfo extraInfo ){
986
+
987
+ private Group generateWall (UserInfo userInfo ) {
988
+ Group group = new Group ();
989
+ group .setCreatedDate (userInfo .user .getCreationDate ()+deltaTime );
990
+ group .setGroupName ("Wall of " + userInfo .extraInfo .getFirstName () + " " + userInfo .extraInfo .getLastName ());
991
+ group .setGroupId (userInfo .user .getForumWallId ());
992
+ group .setModeratorId (userInfo .user .getAccountId ());
993
+
994
+ Iterator <Integer > itTags = userInfo .user .getSetOfTags ().iterator ();
995
+ Integer tags [] = new Integer [userInfo .user .getSetOfTags ().size ()];
996
+ int index = 0 ;
997
+ while (itTags .hasNext ()){
998
+ tags [index ] = itTags .next ();
999
+ index ++;
1000
+ }
1001
+ group .setTags (tags );
1002
+ dataExporter .export (group ,userInfo .user .getCreationDate ());
1003
+ return group ;
1004
+ }
1005
+
1006
+ private void generatePosts (PostGenerator postGenerator , ReducedUserProfile user , UserExtraInfo extraInfo , Group group ){
986
1007
Vector <Post > createdPosts = postGenerator .createPosts ( randomFarm , user , extraInfo , postId );
987
1008
postId +=createdPosts .size ();
988
1009
Iterator <Post > it = createdPosts .iterator ();
@@ -1021,7 +1042,7 @@ private void generatePosts(PostGenerator postGenerator, ReducedUserProfile user,
1021
1042
stats .minPostCreationDate = strCreationDate ;
1022
1043
}
1023
1044
}
1024
- dataExporter .export (post );
1045
+ dataExporter .export (post , group . getCreatedDate () );
1025
1046
// Generate comments
1026
1047
int numComment = randomFarm .get (RandomGeneratorFarm .Aspect .NUM_COMMENT ).nextInt (maxNumComments +1 );
1027
1048
ArrayList <Message > replyCandidates = new ArrayList <Message >();
@@ -1051,7 +1072,7 @@ private void generatePosts(PostGenerator postGenerator, ReducedUserProfile user,
1051
1072
postCount = postsPerCountry .containsKey (locationID ) ? postsPerCountry .get (locationID ) : 0 ;
1052
1073
postsPerCountry .put (locationID , postCount +1 );
1053
1074
stats .countries .add (countryName );
1054
- dataExporter .export (comment );
1075
+ dataExporter .export (comment , post . getCreationDate () );
1055
1076
if ( comment .getTextSize () > 10 ) replyCandidates .add (comment );
1056
1077
postId ++;
1057
1078
}
@@ -1071,7 +1092,7 @@ private void generatePhotos(ReducedUserProfile user, UserExtraInfo extraInfo){
1071
1092
Group album = groupGenerator .createAlbum (randomFarm , groupId , user , extraInfo , m , joinProbs [0 ]);
1072
1093
if ( album != null ) {
1073
1094
groupId ++;
1074
- dataExporter .export (album );
1095
+ dataExporter .export (album , user . getCreationDate () );
1075
1096
1076
1097
// Generate photos for this album
1077
1098
int numPhotos = randomFarm .get (RandomGeneratorFarm .Aspect .NUM_PHOTO ).nextInt (maxNumPhotoPerAlbums +1 );
@@ -1089,7 +1110,7 @@ private void generatePhotos(ReducedUserProfile user, UserExtraInfo extraInfo){
1089
1110
int postCount = postsPerCountry .containsKey (locationID ) ? postsPerCountry .get (locationID ) : 0 ;
1090
1111
postsPerCountry .put (locationID , postCount +1 );
1091
1112
stats .countries .add (countryName );
1092
- dataExporter .export (photo );
1113
+ dataExporter .export (photo , album . getCreatedDate () );
1093
1114
1094
1115
if (photo .getTags () != null ) {
1095
1116
for (Integer t : photo .getTags ()){
@@ -1184,7 +1205,7 @@ private void createGroupForUser(ReducedUserProfile user,
1184
1205
numLoop ++;
1185
1206
}
1186
1207
1187
- dataExporter .export (group );
1208
+ dataExporter .export (group , user . getCreationDate ());
1188
1209
generatePostForGroup (uniformPostGenerator ,group );
1189
1210
generatePostForGroup (flashmobPostGenerator ,group );
1190
1211
}
@@ -1212,7 +1233,7 @@ private void generatePostForGroup(PostGenerator postGenerator, Group group) {
1212
1233
int postCount = postsPerCountry .containsKey (locationID ) ? postsPerCountry .get (locationID ) : 0 ;
1213
1234
postsPerCountry .put (locationID , postCount +1 );
1214
1235
stats .countries .add (countryName );
1215
- dataExporter .export (groupPost );
1236
+ dataExporter .export (groupPost , group . getCreatedDate () );
1216
1237
1217
1238
int numComment = randomFarm .get (RandomGeneratorFarm .Aspect .NUM_COMMENT ).nextInt (maxNumComments +1 );
1218
1239
ArrayList <Message > replyCandidates = new ArrayList <Message >();
@@ -1232,7 +1253,7 @@ private void generatePostForGroup(PostGenerator postGenerator, Group group) {
1232
1253
postCount = postsPerCountry .containsKey (locationID ) ? postsPerCountry .get (locationID ) : 0 ;
1233
1254
postsPerCountry .put (locationID , postCount +1 );
1234
1255
stats .countries .add (countryName );
1235
- dataExporter .export (comment );
1256
+ dataExporter .export (comment , groupPost . getCreationDate () );
1236
1257
if ( comment .getTextSize () > 10 ) replyCandidates .add (comment );
1237
1258
1238
1259
if (comment .getTags () != null ) {
0 commit comments