hadoop-hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pras...@apache.org
Subject svn commit: r764905 - in /hadoop/hive/branches/branch-0.3: ./ common/src/java/org/apache/hadoop/hive/conf/ metastore/src/java/org/apache/hadoop/hive/metastore/ ql/src/java/org/apache/hadoop/hive/ql/exec/
Date Tue, 14 Apr 2009 17:59:49 GMT
Author: prasadc
Date: Tue Apr 14 17:59:48 2009
New Revision: 764905

URL: http://svn.apache.org/viewvc?rev=764905&view=rev
Log:
HIVE-403:remove password password params from job config that is submitted to job tracker

Modified:
    hadoop/hive/branches/branch-0.3/CHANGES.txt
    hadoop/hive/branches/branch-0.3/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
    hadoop/hive/branches/branch-0.3/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
    hadoop/hive/branches/branch-0.3/ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java

Modified: hadoop/hive/branches/branch-0.3/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.3/CHANGES.txt?rev=764905&r1=764904&r2=764905&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.3/CHANGES.txt (original)
+++ hadoop/hive/branches/branch-0.3/CHANGES.txt Tue Apr 14 17:59:48 2009
@@ -139,6 +139,9 @@
     HIVE-390. Make partition pruner tests deterministic by ordering the 
     output results. (Namit Jain via athusoo)
 
+    HIVE-403. remove password param from job config that is submitted to job
+    tracker and from log (Prasad Chakka)
+
 Release 0.2.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/hive/branches/branch-0.3/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.3/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java?rev=764905&r1=764904&r2=764905&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.3/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
(original)
+++ hadoop/hive/branches/branch-0.3/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
Tue Apr 14 17:59:48 2009
@@ -79,6 +79,7 @@
     METASTOREDIRECTORY("hive.metastore.metadb.dir", ""),
     METASTOREWAREHOUSE("hive.metastore.warehouse.dir", ""),
     METASTOREURIS("hive.metastore.uris", ""),
+    METASTOREPWD("javax.jdo.option.ConnectionPassword", ""),
 
     // Things we log in the jobconf
 

Modified: hadoop/hive/branches/branch-0.3/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.3/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java?rev=764905&r1=764904&r2=764905&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.3/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
(original)
+++ hadoop/hive/branches/branch-0.3/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
Tue Apr 14 17:59:48 2009
@@ -41,6 +41,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configurable;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.metastore.api.Database;
 import org.apache.hadoop.hive.metastore.api.FieldSchema;
 import org.apache.hadoop.hive.metastore.api.InvalidObjectException;
@@ -158,7 +159,7 @@
       Map.Entry<String, String> e = iter.next();
       if(e.getKey().contains("jpox") || e.getKey().contains("jdo")) {
         Object prevVal = prop.setProperty(e.getKey(), e.getValue());
-        if(LOG.isDebugEnabled()) {
+        if(LOG.isDebugEnabled() && !e.getKey().equals(HiveConf.ConfVars.METASTOREPWD.varname))
{
           LOG.debug("Overriding " + e.getKey() + " value " + prevVal 
               + " from  jpox.properties with " + e.getValue());
         }
@@ -167,7 +168,8 @@
 
     if(LOG.isDebugEnabled()) {
       for (Entry<Object, Object> e: prop.entrySet()) {
-        LOG.debug(e.getKey() + " = " + e.getValue());
+        if(!e.getKey().equals(HiveConf.ConfVars.METASTOREPWD.varname))
+          LOG.debug(e.getKey() + " = " + e.getValue());
       }
     }
   }

Modified: hadoop/hive/branches/branch-0.3/ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.3/ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java?rev=764905&r1=764904&r2=764905&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.3/ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java
(original)
+++ hadoop/hive/branches/branch-0.3/ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java
Tue Apr 14 17:59:48 2009
@@ -385,12 +385,17 @@
         return 0;
       }
 
+      // remove the pwd from conf file so that job tracker doesn't show this logs
+      String pwd = job.get(HiveConf.ConfVars.METASTOREPWD.varname);
+      job.set(HiveConf.ConfVars.METASTOREPWD.varname, "HIVE");
       JobClient jc = new JobClient(job);
 
       // make this client wait if job trcker is not behaving well.
       Throttle.checkJobTracker(job, LOG);
 
       orig_rj = rj = jc.submitJob(job);
+      // replace it back
+      job.set(HiveConf.ConfVars.METASTOREPWD.varname, pwd);
 
       // add to list of running jobs so in case of abnormal shutdown can kill
       // it.



Mime
View raw message