Return-Path: X-Original-To: apmail-flink-commits-archive@minotaur.apache.org Delivered-To: apmail-flink-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5621317736 for ; Thu, 19 Nov 2015 16:14:29 +0000 (UTC) Received: (qmail 93384 invoked by uid 500); 19 Nov 2015 16:14:29 -0000 Delivered-To: apmail-flink-commits-archive@flink.apache.org Received: (qmail 93340 invoked by uid 500); 19 Nov 2015 16:14:29 -0000 Mailing-List: contact commits-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list commits@flink.apache.org Received: (qmail 93331 invoked by uid 99); 19 Nov 2015 16:14:29 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Nov 2015 16:14:29 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E87C2E17CB; Thu, 19 Nov 2015 16:14:28 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sewen@apache.org To: commits@flink.apache.org Date: Thu, 19 Nov 2015 16:14:28 -0000 Message-Id: <9a3c527448b94eab8c0e1fae4b25f31a@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] flink git commit: [FLINK-2913] [runtime] Ensure file streams are properly closes in FsStateBackend Repository: flink Updated Branches: refs/heads/master 864357bac -> 93622001e [FLINK-2913] [runtime] Ensure file streams are properly closes in FsStateBackend This closes #1353 Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/ff52d289 Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/ff52d289 Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/ff52d289 Branch: refs/heads/master Commit: ff52d289113560273830421eceef82028d8bc99c Parents: 864357b Author: tedyu Authored: Fri Nov 13 16:43:53 2015 -0800 Committer: Stephan Ewen Committed: Thu Nov 19 15:27:54 2015 +0100 ---------------------------------------------------------------------- .../apache/flink/runtime/state/filesystem/FsStateBackend.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/ff52d289/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsStateBackend.java ---------------------------------------------------------------------- diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsStateBackend.java b/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsStateBackend.java index 045c411..d7b392c 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsStateBackend.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsStateBackend.java @@ -268,9 +268,9 @@ public class FsStateBackend extends StateBackend { continue; } - ObjectOutputStream os = new ObjectOutputStream(outStream); - os.writeObject(state); - os.close(); + try (ObjectOutputStream os = new ObjectOutputStream(outStream)) { + os.writeObject(state); + } return new FileSerializableStateHandle(targetPath); }