hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yhema...@apache.org
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 GMT
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")



Mime
View raw message