hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r629344 - in /hadoop/core/trunk: CHANGES.txt src/contrib/hod/bin/hod src/contrib/hod/bin/ringmaster src/contrib/hod/hodlib/Common/desc.py src/contrib/hod/hodlib/HodRing/hodRing.py
Date Wed, 20 Feb 2008 04:17:57 GMT
Author: ddas
Date: Tue Feb 19 20:17:52 2008
New Revision: 629344

URL: http://svn.apache.org/viewvc?rev=629344&view=rev
Log:
HADOOP-2766. Enables setting of HADOOP_OPTS env variable for the hadoop daemons through HOD.
Contributed by Vinod Kumar Vavilapalli.

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/contrib/hod/bin/hod
    hadoop/core/trunk/src/contrib/hod/bin/ringmaster
    hadoop/core/trunk/src/contrib/hod/hodlib/Common/desc.py
    hadoop/core/trunk/src/contrib/hod/hodlib/HodRing/hodRing.py

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=629344&r1=629343&r2=629344&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Tue Feb 19 20:17:52 2008
@@ -120,6 +120,9 @@
     HADOOP-2840. Fix gridmix scripts to correctly invoke the java sort through
     the proper jar. (Mukund Madhugiri via cdouglas)
 
+    HADOOP-2766. Enables setting of HADOOP_OPTS env variable for the hadoop
+    daemons through HOD. (Vinod Kumar Vavilapalli via ddas)
+
 Release 0.16.0 - 2008-02-07
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/contrib/hod/bin/hod
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hod/bin/hod?rev=629344&r1=629343&r2=629344&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hod/bin/hod (original)
+++ hadoop/core/trunk/src/contrib/hod/bin/hod Tue Feb 19 20:17:52 2008
@@ -238,14 +238,11 @@
               True, None, False, True, 'M'),
                
              ('envs', 'keyval', 'environment to run this package in',
-              False, None, False, False),
+              False, None, False, True),
 
              ('final-server-params', 'keyval', 'Hadoop final xml key/val list',
               False, None, False, True, 'F'),
 
-             ('java-opts', 'list', 'java jvm options',
-              False, None, False, False),
-               
              ('pkgs', 'directory', "directory where the package is installed",
               False, None, False, False)), 
                
@@ -273,11 +270,8 @@
               False, None, False, True, 'S'),
            
              ('envs', 'keyval', 'Environment in which to run this package.',
-              False, None, False, False),
+              False, None, False, True),
 
-             ('java-opts', 'list', 'java jvm options',
-              False, None, False, False),
-            
              ('pkgs', 'directory', "directory where the package is installed",
               False, None, False, False)),           
              

Modified: hadoop/core/trunk/src/contrib/hod/bin/ringmaster
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hod/bin/ringmaster?rev=629344&r1=629343&r2=629344&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hod/bin/ringmaster (original)
+++ hadoop/core/trunk/src/contrib/hod/bin/ringmaster Tue Feb 19 20:17:52 2008
@@ -163,9 +163,6 @@
              ('envs', 'keyval', 'environment to run this package in',
               False, None, False, False),
               
-             ('java-opts', 'keyval', 'java jvm options',
-              False, None, False, False),
-               
              ('pkgs', 'directory', "directory where the package is installed",
               False, None, False, True)), 
                
@@ -195,9 +192,6 @@
              ('envs', 'keyval', 'Environment in which to run this package.',
               False, None, False, False),
 
-             ('java-opts', 'list', 'java jvm options',
-              False, None, False, False),
-            
              ('pkgs', 'directory', "directory where the package is installed",
               False, None, False, True)),          
              

Modified: hadoop/core/trunk/src/contrib/hod/hodlib/Common/desc.py
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hod/hodlib/Common/desc.py?rev=629344&r1=629343&r2=629344&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hod/hodlib/Common/desc.py (original)
+++ hadoop/core/trunk/src/contrib/hod/hodlib/Common/desc.py Tue Feb 19 20:17:52 2008
@@ -117,7 +117,6 @@
 
     self.dict.setdefault('external', False)
     self.dict.setdefault('attrs', {})
-    self.dict.setdefault('java-opts', [])
     self.dict.setdefault('envs', {})
     self.dict.setdefault('host',None)
     self.dict.setdefault('port',None)
@@ -157,9 +156,6 @@
   def getfinalAttrs(self):
     return self.dict['final-attrs']
   
-  def getJavaOpts(self):
-    return self.dict['java-opts']
-  
   def getEnvs(self):
     return self.dict['envs']
 
@@ -187,9 +183,6 @@
     s = Schema('envs', Schema.MAP)
     schema[s.getName()] = s
 
-    s = Schema('java-opts', Schema.MAP)
-    schema[s.getName()] = s
-
     return schema
   
   getSchema = staticmethod(getSchema)
@@ -219,9 +212,6 @@
     """return the environment in which the command is to be run"""
     return self.dict['envs']
   
-  def _getJavaOpts(self):
-    return self.dict['java-opts']
-
   def _getPkgDirs(self):
     """return the packages for this command"""
     return self.dict['pkgdirs']

Modified: hadoop/core/trunk/src/contrib/hod/hodlib/HodRing/hodRing.py
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hod/hodlib/HodRing/hodRing.py?rev=629344&r1=629343&r2=629344&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hod/hodlib/HodRing/hodRing.py (original)
+++ hadoop/core/trunk/src/contrib/hod/hodlib/HodRing/hodRing.py Tue Feb 19 20:17:52 2008
@@ -56,7 +56,6 @@
     dict.setdefault('argv', [])
     dict.setdefault('version', None)
     dict.setdefault('envs', {})
-    dict.setdefault('java-opts', [])
     dict.setdefault('workdirs', [])
     dict.setdefault('attrs', {})
     dict.setdefault('final-attrs', {})
@@ -91,9 +90,6 @@
   def getEnvs(self):
     return self.dict['envs']
 
-  def getJavaOpts(self):
-    return self.dict['java-opts']
-
   def getPkgDirs(self):
     return self.dict['pkgdirs']
 
@@ -311,16 +307,14 @@
     args.append(self.path)
     args.extend(desc.getArgv())
     envs = desc.getEnvs()
-    javaOpts = desc.getJavaOpts()
     fenvs = os.environ
     
     for k, v in envs.iteritems():
       fenvs[k] = v
     
-    self.log.debug(javaOpts)
-    fenvs['HADOOP_OPTS'] = ''
-    for option in javaOpts:
-      fenvs['HADOOP_OPTS'] = "%s%s " % (fenvs['HADOOP_OPTS'], option)
+    if envs.has_key('HADOOP_OPTS'):
+      fenvs['HADOOP_OPTS'] = envs['HADOOP_OPTS']
+      self.log.debug("HADOOP_OPTS : %s" % fenvs['HADOOP_OPTS'])
     
     fenvs['JAVA_HOME'] = self.javahome
     fenvs['HADOOP_CONF_DIR'] = self.confdir



Mime
View raw message