2828import org .apache .flink .runtime .executiongraph .JobInformation ;
2929import org .apache .flink .runtime .executiongraph .TaskInformation ;
3030import org .apache .flink .runtime .util .GroupCache ;
31- import org .apache .flink .util .FileUtils ;
3231import org .apache .flink .util .InstantiationUtil ;
3332import org .apache .flink .util .Preconditions ;
3433import org .apache .flink .util .SerializedValue ;
3534
3635import javax .annotation .Nullable ;
3736
37+ import java .io .BufferedInputStream ;
3838import java .io .File ;
3939import java .io .IOException ;
4040import java .io .Serializable ;
41+ import java .nio .file .Files ;
4142import java .util .List ;
4243
4344/**
@@ -281,7 +282,7 @@ public void loadBigData(
281282 // enters a terminal state)
282283 jobInformation =
283284 InstantiationUtil .deserializeObject (
284- FileUtils . readAllBytes (dataFile .toPath ()),
285+ new BufferedInputStream ( Files . newInputStream (dataFile .toPath () )),
285286 getClass ().getClassLoader ());
286287 jobInformationCache .put (jobId , jobInfoKey , jobInformation );
287288 }
@@ -303,7 +304,7 @@ public void loadBigData(
303304 // enters a terminal state)
304305 taskInformation =
305306 InstantiationUtil .deserializeObject (
306- FileUtils . readAllBytes (dataFile .toPath ()),
307+ new BufferedInputStream ( Files . newInputStream (dataFile .toPath () )),
307308 getClass ().getClassLoader ());
308309 taskInformationCache .put (jobId , taskInfoKey , taskInformation );
309310 }
0 commit comments