Browse Source

HADOOP-2936. Fixes HOD in a way that it generates hdfs://host:port on the client side configs. Contributed by Vinod Kumar Vavilapalli.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@639217 13f79535-47bb-0310-9956-ffa450edef68
Devaraj Das 17 years ago
parent
commit
f11b0d6f9a
3 changed files with 9 additions and 2 deletions
  1. 4 0
      CHANGES.txt
  2. 1 1
      src/contrib/hod/hodlib/Hod/hadoop.py
  3. 4 1
      src/contrib/hod/hodlib/HodRing/hodRing.py

+ 4 - 0
CHANGES.txt

@@ -304,6 +304,10 @@ Trunk (unreleased changes)
     HADOOP-2783. Fixes a problem to do with import in 
     hod/hodlib/Common/xmlrpc.py. (Vinod Kumar Vavilapalli via ddas) 
 
+    HADOOP-2936. Fixes HOD in a way that it generates hdfs://host:port on the
+    client side configs. (Vinod Kumar Vavilapalli via ddas)
+
+
 Release 0.16.2 - Unreleased
 
   BUG FIXES

+ 1 - 1
src/contrib/hod/hodlib/Hod/hadoop.py

@@ -72,7 +72,7 @@ class hadoopConfig:
 
     description = {}
     paramsDict = {  'mapred.job.tracker'    : mapredAddr , \
-                    'fs.default.name'       : hdfsAddr, \
+                    'fs.default.name'       : "hdfs://" + hdfsAddr, \
                     'hadoop.tmp.dir'        : confDir, \
                     'dfs.client.buffer.dir' : tempDir, }
 

+ 4 - 1
src/contrib/hod/hodlib/HodRing/hodRing.py

@@ -229,7 +229,10 @@ class HadoopCommand:
           prop = self._createXmlElement(doc, k, item, "No description", final)
           topElement.appendChild(prop)
       else:
-        prop = self._createXmlElement(doc, k, v, "No description", final)
+        if k == 'fs.default.name':
+          prop = self._createXmlElement(doc, k, "hdfs://" + v, "No description", final)
+        else:
+          prop = self._createXmlElement(doc, k, v, "No description", final)
         topElement.appendChild(prop)
 	
   def _createHadoopSiteXml(self):