Return-Path: Delivered-To: apmail-hadoop-mapreduce-issues-archive@minotaur.apache.org Received: (qmail 17136 invoked from network); 11 Jun 2010 03:01:41 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 11 Jun 2010 03:01:41 -0000 Received: (qmail 85832 invoked by uid 500); 11 Jun 2010 03:01:41 -0000 Delivered-To: apmail-hadoop-mapreduce-issues-archive@hadoop.apache.org Received: (qmail 85767 invoked by uid 500); 11 Jun 2010 03:01:41 -0000 Mailing-List: contact mapreduce-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-issues@hadoop.apache.org Delivered-To: mailing list mapreduce-issues@hadoop.apache.org Received: (qmail 85759 invoked by uid 99); 11 Jun 2010 03:01:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jun 2010 03:01:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jun 2010 03:01:38 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o5B31GuF008007 for ; Fri, 11 Jun 2010 03:01:16 GMT Message-ID: <31080095.38381276225276571.JavaMail.jira@thor> Date: Thu, 10 Jun 2010 23:01:16 -0400 (EDT) From: "Amar Kamat (JIRA)" To: mapreduce-issues@hadoop.apache.org Subject: [jira] Commented: (MAPREDUCE-1778) CompletedJobStatusStore initialization should fail if {mapred.job.tracker.persist.jobstatus.dir} is unwritable In-Reply-To: <3659629.58761273459188121.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/MAPREDUCE-1778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12877697#action_12877697 ] Amar Kamat commented on MAPREDUCE-1778: --------------------------------------- bq. I only see FileStatus.isDir() Look at [FileStatus.java|http://tinyurl.com/2uaew2a] from hadoop-common. Comments: # I still see few lines of code crossing the 80 column margin. # Plz add comments. For example {code} + } else { + FileStatus stat = fs.getFileStatus(path); + FsPermission actual = stat.getPermission(); + if (!stat.isDir()) + throw new DiskErrorException("not a directory: " + + path.toString()); + FsAction user = actual.getUserAction(); + if (!user.implies(FsAction.READ)) + throw new DiskErrorException("directory is not readable: " + + path.toString()); + if (!user.implies(FsAction.WRITE)) + throw new DiskErrorException("directory is not writable: " + + path.toString()); {code} It would be nice to explain why its done this way. Testcase: # It would be better if we test the following scenarios ## directory doesnt exist but mkdir fails() [example: parent folder doesnt have write permissions?] ## directory exists but no read/write permissions ## completedjob status store is a file and not a directory I think the current changes in the patch tests sceanrio#2. Can you please add tests for testing scenario#1 and scenario#3? # If the JobTracker gets started, it should be shut down. # For a newly created job-status-store dir, it would be nice to validate its permissions (i.e JOB_STATUS_STORE_DIR_PERMISSION). > CompletedJobStatusStore initialization should fail if {mapred.job.tracker.persist.jobstatus.dir} is unwritable > -------------------------------------------------------------------------------------------------------------- > > Key: MAPREDUCE-1778 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-1778 > Project: Hadoop Map/Reduce > Issue Type: Improvement > Components: jobtracker > Reporter: Amar Kamat > Assignee: Krishna Ramachandran > Attachments: mapred-1778-1.patch, mapred-1778-2.patch, mapred-1778-3.patch, mapred-1778-4.patch, mapred-1778.patch > > > If {mapred.job.tracker.persist.jobstatus.dir} points to an unwritable location or mkdir of {mapred.job.tracker.persist.jobstatus.dir} fails, then CompletedJobStatusStore silently ignores the failure and disables CompletedJobStatusStore. Ideally the JobTracker should bail out early indicating a misconfiguration. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.