From 567778d5c09dde19b6e057cd00fd8eeb9219dd57 Mon Sep 17 00:00:00 2001 From: Todd Lipcon Date: Sat, 14 Apr 2012 02:51:09 +0000 Subject: [PATCH] HDFS-3280. DFSOutputStream.sync should not be synchronized. Contributed by Todd Lipcon. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1326049 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 ++ .../src/main/java/org/apache/hadoop/hdfs/DFSOutputStream.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 706600c6df6..e4bdf258277 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -395,6 +395,8 @@ Release 2.0.0 - UNRELEASED HDFS-2765. TestNameEditsConfigs is incorrectly swallowing IOE. (atm) + HDFS-3280. DFSOutputStream.sync should not be synchronized (todd) + BREAKDOWN OF HDFS-1623 SUBTASKS HDFS-2179. Add fencing framework and mechanisms for NameNode HA. (todd) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSOutputStream.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSOutputStream.java index 10e23b6f766..c0e38cf5562 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSOutputStream.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSOutputStream.java @@ -1418,7 +1418,7 @@ class DFSOutputStream extends FSOutputSummer implements Syncable { @Override @Deprecated - public synchronized void sync() throws IOException { + public void sync() throws IOException { hflush(); }