From 1869b44682b44fbd5e12b164a45178a235554baf Mon Sep 17 00:00:00 2001 From: Mark Payne Date: Fri, 18 Dec 2015 11:44:37 -0500 Subject: [PATCH] NIFI-1285: Used a BufferedInputStream when swapping in data Signed-off-by: joewitt --- .../java/org/apache/nifi/controller/FileSystemSwapManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java index 1162f390f7..76f7cd7300 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java @@ -149,7 +149,8 @@ public class FileSystemSwapManager implements FlowFileSwapManager { final List swappedFlowFiles; try (final InputStream fis = new FileInputStream(swapFile); - final DataInputStream in = new DataInputStream(fis)) { + final InputStream bis = new BufferedInputStream(fis); + final DataInputStream in = new DataInputStream(bis)) { swappedFlowFiles = deserializeFlowFiles(in, swapLocation, flowFileQueue, claimManager); }