src/main/java/org/embulk/output/sftp/SftpUtils.java in embulk-output-sftp-0.1.7 vs src/main/java/org/embulk/output/sftp/SftpUtils.java in embulk-output-sftp-0.1.8
- old
+ new
@@ -157,10 +157,10 @@
try (FileObject remoteFile = newSftpFile(getSftpFileUri(remotePath));
InputStream inputStream = new FileInputStream(localTempFile);
BufferedOutputStream outputStream = new BufferedOutputStream(remoteFile.getContent().getOutputStream());
) {
logger.info("Uploading to remote sftp file ({} KB): {}", size / 1024, remoteFile.getPublicURIString());
- byte[] buffer = new byte[4 * 1024 * 1024]; // 4MB buffer size
+ byte[] buffer = new byte[32 * 1024 * 1024]; // 32MB buffer size
int len = inputStream.read(buffer);
long total = 0;
int progress = 0;
while (len != -1) {
outputStream.write(buffer, 0, len);