This is an automated email from the ASF dual-hosted git repository. danny0405 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/hudi.git
The following commit(s) were added to refs/heads/master by this push: new 32c9a633f6c [HUDI-6605] Write handlers not close with try block in ClientIds (#9309) 32c9a633f6c is described below commit 32c9a633f6cf83faf7e3c4ad32e28c52cce0049f Author: xuzifu666 <x...@zepp.com> AuthorDate: Tue Aug 1 09:33:07 2023 +0800 [HUDI-6605] Write handlers not close with try block in ClientIds (#9309) --- .../hudi-flink/src/main/java/org/apache/hudi/util/ClientIds.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/util/ClientIds.java b/hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/util/ClientIds.java index 55dfbb5ed9c..325fedc9060 100644 --- a/hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/util/ClientIds.java +++ b/hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/util/ClientIds.java @@ -162,10 +162,8 @@ public class ClientIds implements AutoCloseable, Serializable { } private void updateHeartbeat(Path heartbeatFilePath) throws HoodieHeartbeatException { - try { - OutputStream outputStream = - this.fs.create(heartbeatFilePath, true); - outputStream.close(); + try (OutputStream outputStream = this.fs.create(heartbeatFilePath, true)) { + // no operation } catch (IOException io) { throw new HoodieHeartbeatException("Unable to generate heartbeat for file path " + heartbeatFilePath, io); }