Return-Path: Delivered-To: apmail-hadoop-core-commits-archive@www.apache.org Received: (qmail 10761 invoked from network); 19 Dec 2008 10:55:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Dec 2008 10:55:35 -0000 Received: (qmail 52925 invoked by uid 500); 19 Dec 2008 10:55:47 -0000 Delivered-To: apmail-hadoop-core-commits-archive@hadoop.apache.org Received: (qmail 52883 invoked by uid 500); 19 Dec 2008 10:55:47 -0000 Mailing-List: contact core-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-commits@hadoop.apache.org Received: (qmail 52874 invoked by uid 99); 19 Dec 2008 10:55:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Dec 2008 02:55:47 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Dec 2008 10:55:27 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 17FFA2388970; Fri, 19 Dec 2008 02:55:07 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r728000 - in /hadoop/core/branches/branch-0.18/src/contrib/hod: CHANGES.txt hodlib/HodRing/hodRing.py Date: Fri, 19 Dec 2008 10:55:06 -0000 To: core-commits@hadoop.apache.org From: yhemanth@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081219105507.17FFA2388970@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: yhemanth Date: Fri Dec 19 02:55:06 2008 New Revision: 728000 URL: http://svn.apache.org/viewvc?rev=728000&view=rev Log: HADOOP-4919. Provide execute access on jobtracker history directory path. Contributed by Peeyush Bishnoi. Modified: hadoop/core/branches/branch-0.18/src/contrib/hod/CHANGES.txt hadoop/core/branches/branch-0.18/src/contrib/hod/hodlib/HodRing/hodRing.py Modified: hadoop/core/branches/branch-0.18/src/contrib/hod/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/src/contrib/hod/CHANGES.txt?rev=728000&r1=727999&r2=728000&view=diff ============================================================================== --- hadoop/core/branches/branch-0.18/src/contrib/hod/CHANGES.txt (original) +++ hadoop/core/branches/branch-0.18/src/contrib/hod/CHANGES.txt Fri Dec 19 02:55:06 2008 @@ -1,6 +1,14 @@ HOD Change Log -Release 0.18.2 - Unreleased +Release 0.18.3 - (unreleased changes) + + IMPROVEMENTS + + HADOOP-4919. Provide execute access on jobtracker history directory + path to allow monitoring programs to read the history logs. + (Peeyush Bishnoi via yhemanth) + +Release 0.18.2 - 2008-11-03 BUG FIXES Modified: hadoop/core/branches/branch-0.18/src/contrib/hod/hodlib/HodRing/hodRing.py URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/src/contrib/hod/hodlib/HodRing/hodRing.py?rev=728000&r1=727999&r2=728000&view=diff ============================================================================== --- hadoop/core/branches/branch-0.18/src/contrib/hod/hodlib/HodRing/hodRing.py (original) +++ hadoop/core/branches/branch-0.18/src/contrib/hod/hodlib/HodRing/hodRing.py Fri Dec 19 02:55:06 2008 @@ -329,13 +329,38 @@ sitefile.close() self.log.debug('created %s' % (siteName)) + def __createJTHistoryDir(self): + '''Creating JobTracker History Directory inside hadoop logdir''' + jobtrackerhistorydir = os.path.join(self.logdir,'history') + self.log.debug('Creating %s' % (jobtrackerhistorydir)) + os.makedirs(jobtrackerhistorydir) + self.__setJTHistoryDirPermission(jobtrackerhistorydir) + + def __setJTHistoryDirPermission(self,jobtrackerhistorydir): + '''Setting the permission 710 on JobTracker History Directory''' + self.log.debug('Setting the permission 710 on jobtracker history directory: %s' % (jobtrackerhistorydir)) + childdir = jobtrackerhistorydir + while childdir != self.hadoopdir : + os.chmod(childdir,0710) + parentdir = os.path.dirname(childdir) + childdir = parentdir + os.chmod(self.hadoopdir,0710) + def _createHadoopLogDir(self): if self.restart: if not os.path.exists(self.logdir): - os.makedirs(self.logdir) + if self.name == "jobtracker": + os.makedirs(self.logdir) + self.__createJTHistoryDir() + else: + os.makedirs(self.logdir) else: assert os.path.exists(self.logdir) == False - os.makedirs(self.logdir) + if self.name == "jobtracker": + os.makedirs(self.logdir) + self.__createJTHistoryDir() + else: + os.makedirs(self.logdir) def _createXmlElement(self, doc, name, value, description, final): prop = doc.createElement("property")