From 698fa5077ac742d025e979c053b54528e09357f3 Mon Sep 17 00:00:00 2001 From: Tsz-wo Sze Date: Mon, 15 Oct 2012 14:05:31 +0000 Subject: [PATCH] HDFS-4036. Remove "throw UnresolvedLinkException" from FSDirectory.unprotectedAddFile(..). Contributed by Jing Zhao git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1398293 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../hadoop/hdfs/server/namenode/FSDirectory.java | 10 ++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 9778ad25ed0..a56f86516a6 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -385,6 +385,9 @@ Release 2.0.3-alpha - Unreleased HDFS-4037. Rename the getReplication() method in BlockCollection to getBlockReplication(). (szetszwo) + HDFS-4036. Remove "throw UnresolvedLinkException" from + FSDirectory.unprotectedAddFile(..). (Jing Zhao via szetszwo) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java index 21e98dc524d..d339e017bf2 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java @@ -213,8 +213,9 @@ public class FSDirectory implements Closeable { /** * Add the given filename to the fs. - * @throws QuotaExceededException - * @throws FileAlreadyExistsException + * @throws FileAlreadyExistsException + * @throws QuotaExceededException + * @throws UnresolvedLinkException */ INodeFileUnderConstruction addFile(String path, PermissionStatus permissions, @@ -265,8 +266,6 @@ public class FSDirectory implements Closeable { return newNode; } - /** - */ INode unprotectedAddFile( String path, PermissionStatus permissions, short replication, @@ -275,8 +274,7 @@ public class FSDirectory implements Closeable { long preferredBlockSize, boolean underConstruction, String clientName, - String clientMachine) - throws UnresolvedLinkException { + String clientMachine) { INode newNode; assert hasWriteLock(); if (underConstruction) {