cnauroth commented on code in PR #7761: URL: https://github.com/apache/hadoop/pull/7761#discussion_r2167217331
########## hadoop-tools/hadoop-gcp/src/main/java/org/apache/hadoop/fs/gs/GoogleHadoopOutputStream.java: ########## @@ -80,45 +175,191 @@ private static OutputStream createOutputStream(GoogleCloudStorageFileSystem gcsf String.format("'%s' already exists", gcsPath)).initCause(e); } OutputStream outputStream = Channels.newOutputStream(channel); - int bufferSize = fileSystemConfiguration.getOutStreamBufferSize(); + int bufferSize = gcsfs.getConfiguration().getOutStreamBufferSize(); return bufferSize > 0 ? new BufferedOutputStream(outputStream, bufferSize) : outputStream; } @Override public void write(int b) throws IOException { throwIfNotOpen(); - outputStream.write(b); + tmpOut.write(b); statistics.incrementBytesWritten(1); statistics.incrementWriteOps(1); } @Override public void write(@Nonnull byte[] b, int offset, int len) throws IOException { throwIfNotOpen(); - outputStream.write(b, offset, len); + tmpOut.write(b, offset, len); statistics.incrementBytesWritten(len); statistics.incrementWriteOps(1); } + private void commitTempFile() throws IOException { + // TODO(user): return early when 0 bytes have been written in the temp files Review Comment: I'm going to remove the "(user)" when I commit this. This is a Google commenting standard, but it's not typical here in the Apache Hadoop codebase. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org