@@ -78,6 +78,7 @@ public class CSVOriginal implements Serializer {
78
78
private TagDictionary tagDic ;
79
79
private IPAddressDictionary ipDic ;
80
80
private boolean exportText ;
81
+ private boolean activity = true ;
81
82
82
83
/**
83
84
* Used to avoid serialize more than once the same data.
@@ -220,7 +221,7 @@ enum Files {
220
221
public CSVOriginal (String file , int reducerID ,
221
222
TagDictionary tagDic , BrowserDictionary browsers ,
222
223
CompanyDictionary companyDic , UniversityDictionary universityDictionary ,
223
- IPAddressDictionary ipDic , LocationDictionary locationDic , LanguageDictionary languageDic , boolean exportText , boolean compressed ) {
224
+ IPAddressDictionary ipDic , LocationDictionary locationDic , LanguageDictionary languageDic , boolean exportText , boolean compressed , boolean activity ) {
224
225
225
226
this .tagDic = tagDic ;
226
227
this .browserDic = browsers ;
@@ -230,6 +231,7 @@ public CSVOriginal(String file, int reducerID,
230
231
this .universityDic = universityDictionary ;
231
232
this .ipDic = ipDic ;
232
233
this .exportText = exportText ;
234
+ this .activity = activity ;
233
235
csvRows = 0l ;
234
236
date = new GregorianCalendar ();
235
237
locations = new Vector <Integer >();
@@ -350,8 +352,10 @@ public void serialize(Friend friend) {
350
352
if (friend != null && friend .getCreatedTime () != -1 ){
351
353
arguments .add (Long .toString (friend .getUserAcc ()));
352
354
arguments .add (Long .toString (friend .getFriendAcc ()));
353
- date .setTimeInMillis (friend .getCreatedTime ());
354
- arguments .add (DateGenerator .formatDateDetail (date ));
355
+ if (activity ) {
356
+ date .setTimeInMillis (friend .getCreatedTime ());
357
+ arguments .add (DateGenerator .formatDateDetail (date ));
358
+ }
355
359
ToCSV (arguments ,Files .PERSON_KNOWS_PERSON .ordinal ());
356
360
}
357
361
}
0 commit comments