Skip to content

Commit b5122e1

Browse files
authored
Merge pull request #47 from instcode/fix_buffer_size
Change input stream buffer size to 32MB to reduce number of storage reads
2 parents 6acbba1 + a646f8d commit b5122e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/embulk/output/sftp/SftpUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public Void call() throws IOException
159159
BufferedOutputStream outputStream = new BufferedOutputStream(remoteFile.getContent().getOutputStream());
160160
) {
161161
logger.info("Uploading to remote sftp file ({} KB): {}", size / 1024, remoteFile.getPublicURIString());
162-
byte[] buffer = new byte[4 * 1024 * 1024]; // 4MB buffer size
162+
byte[] buffer = new byte[32 * 1024 * 1024]; // 32MB buffer size
163163
int len = inputStream.read(buffer);
164164
long total = 0;
165165
int progress = 0;

0 commit comments

Comments
 (0)