@@ -601,19 +601,22 @@ public int runGenerateJob(Configuration conf) throws Exception {
601
601
if (conf .getBoolean ("updateStreams" ,false )) {
602
602
Properties properties = new Properties ();
603
603
properties .load (fs .open (new Path (conf .get ("outputDir" ) + "/social_network/updateStream_" + i + "_" + j + "_person.properties" )));
604
- Long auxMin = Long .parseLong (properties .getProperty ("min_write_event_start_time" ));
605
- min = auxMin < min ? auxMin : min ;
606
- Long auxMax = Long .parseLong (properties .getProperty ("max_write_event_start_time" ));
607
- max = auxMax > max ? auxMax : max ;
608
- numEvents += Long .parseLong (properties .getProperty ("num_events" ));
609
-
610
- properties .load (fs .open (new Path (conf .get ("outputDir" ) + "/social_network/updateStream_" + i + "_" + j + "_forum.properties" )));
611
-
612
- auxMin = Long .parseLong (properties .getProperty ("min_write_event_start_time" ));
613
- min = auxMin < min ? auxMin : min ;
614
- auxMax = Long .parseLong (properties .getProperty ("max_write_event_start_time" ));
615
- max = auxMax > max ? auxMax : max ;
616
- numEvents += Long .parseLong (properties .getProperty ("num_events" ));
604
+ if ( properties .getProperty ("min_write_event_start_time" ) != null ) {
605
+ Long auxMin = Long .parseLong (properties .getProperty ("min_write_event_start_time" ));
606
+ min = auxMin < min ? auxMin : min ;
607
+ Long auxMax = Long .parseLong (properties .getProperty ("max_write_event_start_time" ));
608
+ max = auxMax > max ? auxMax : max ;
609
+ numEvents += Long .parseLong (properties .getProperty ("num_events" ));
610
+ }
611
+
612
+ if ( properties .getProperty ("min_write_event_start_time" ) != null ) {
613
+ properties .load (fs .open (new Path (conf .get ("outputDir" ) + "/social_network/updateStream_" + i + "_" + j + "_forum.properties" )));
614
+ Long auxMin = Long .parseLong (properties .getProperty ("min_write_event_start_time" ));
615
+ min = auxMin < min ? auxMin : min ;
616
+ Long auxMax = Long .parseLong (properties .getProperty ("max_write_event_start_time" ));
617
+ max = auxMax > max ? auxMax : max ;
618
+ numEvents += Long .parseLong (properties .getProperty ("num_events" ));
619
+ }
617
620
618
621
fs .delete (new Path (conf .get ("outputDir" ) + "/social_network/updateStream_" + i + "_" + j + "_person.properties" ),true );
619
622
fs .delete (new Path (conf .get ("outputDir" ) + "/social_network/updateStream_" + i + "_" + j + "_forum.properties" ),true );
0 commit comments