Repository: nifi
Updated Branches:
  refs/heads/master 9ca0f95d0 -> bd4f31a4c


NIFI-1285: Used a BufferedInputStream when swapping in data

Signed-off-by: joewitt <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/1869b446
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/1869b446
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/1869b446

Branch: refs/heads/master
Commit: 1869b44682b44fbd5e12b164a45178a235554baf
Parents: 9ca0f95
Author: Mark Payne <[email protected]>
Authored: Fri Dec 18 11:44:37 2015 -0500
Committer: joewitt <[email protected]>
Committed: Fri Dec 18 12:08:23 2015 -0500

----------------------------------------------------------------------
 .../java/org/apache/nifi/controller/FileSystemSwapManager.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/1869b446/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FileSystemSwapManager.java
----------------------------------------------------------------------
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 1162f39..76f7cd7 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<FlowFileRecord> 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);
         }
 

Reply via email to