Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 99D3F1B44 for ; Tue, 19 Apr 2011 20:47:45 +0000 (UTC) Received: (qmail 44808 invoked by uid 500); 19 Apr 2011 20:47:44 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 44759 invoked by uid 500); 19 Apr 2011 20:47:44 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 44593 invoked by uid 99); 19 Apr 2011 20:47:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Apr 2011 20:47:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Apr 2011 20:47:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id E914AA9522 for ; Tue, 19 Apr 2011 20:47:05 +0000 (UTC) Date: Tue, 19 Apr 2011 20:47:05 +0000 (UTC) From: "John George (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <1121160364.68139.1303246025951.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1616642244.65149.1303152071097.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HDFS-1845) symlink comes up as directory after namenode restart MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-1845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13021787#comment-13021787 ] John George commented on HDFS-1845: ----------------------------------- Thanks Eli. Attached a patch with Eli's suggestions. > symlink comes up as directory after namenode restart > ---------------------------------------------------- > > Key: HDFS-1845 > URL: https://issues.apache.org/jira/browse/HDFS-1845 > Project: Hadoop HDFS > Issue Type: Bug > Affects Versions: 0.22.0 > Reporter: John George > Assignee: John George > Fix For: 0.22.0 > > Attachments: HDFS-1845-apache-2.patch, HDFS-1845-apache-3.patch, HDFS-1845-apache.patch > > > When a symlink is first created, it get added to EditLogs. When namenode is restarted, it reads from this editlog and represents a symlink correctly and saves this information to its image. If the namenode is restarted again, it reads its from this FSImage, but thinks that a symlink is a directory. This is because it uses "Block[] blocks" to determine if an INode is a directory, a file, or symlink. Since both a directory and a symlink has blocks as null, it thinks that a symlink is a directory. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira