File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/main/java/ldbc/socialnet/dbgen/generator Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 46
46
import ldbc .socialnet .dbgen .util .*;
47
47
48
48
import org .apache .hadoop .conf .Configuration ;
49
+ import org .apache .hadoop .fs .FSDataInputStream ;
49
50
import org .apache .hadoop .fs .FSDataOutputStream ;
50
51
import org .apache .hadoop .fs .FileSystem ;
51
52
import org .apache .hadoop .fs .Path ;
@@ -600,7 +601,8 @@ public int runGenerateJob(Configuration conf) throws Exception {
600
601
601
602
if (conf .getBoolean ("updateStreams" ,false )) {
602
603
Properties properties = new Properties ();
603
- properties .load (fs .open (new Path (conf .get ("outputDir" ) + "/social_network/updateStream_" + i + "_" + j + "_person.properties" )));
604
+ FSDataInputStream file = fs .open (new Path (conf .get ("outputDir" ) + "/social_network/updateStream_" + i + "_" + j + "_person.properties" ));
605
+ properties .load (file );
604
606
if ( properties .getProperty ("min_write_event_start_time" ) != null ) {
605
607
Long auxMin = Long .parseLong (properties .getProperty ("min_write_event_start_time" ));
606
608
min = auxMin < min ? auxMin : min ;
@@ -617,7 +619,7 @@ public int runGenerateJob(Configuration conf) throws Exception {
617
619
max = auxMax > max ? auxMax : max ;
618
620
numEvents += Long .parseLong (properties .getProperty ("num_events" ));
619
621
}
620
-
622
+ file . close ();
621
623
fs .delete (new Path (conf .get ("outputDir" ) + "/social_network/updateStream_" + i + "_" + j + "_person.properties" ),true );
622
624
fs .delete (new Path (conf .get ("outputDir" ) + "/social_network/updateStream_" + i + "_" + j + "_forum.properties" ),true );
623
625
}
You can’t perform that action at this time.
0 commit comments