hadoop-hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zs...@apache.org
Subject svn commit: r807880 - in /hadoop/hive/trunk: CHANGES.txt common/src/java/org/apache/hadoop/hive/conf/HiveConf.java ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java
Date Wed, 26 Aug 2009 05:11:10 GMT
Author: zshao
Date: Wed Aug 26 05:11:10 2009
New Revision: 807880

URL: http://svn.apache.org/viewvc?rev=807880&view=rev
Log:
HIVE-792. Support "add archive" in addition to "add file" and "add jar". (He Yongqiang via
zshao)

Modified:
    hadoop/hive/trunk/CHANGES.txt
    hadoop/hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java

Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=807880&r1=807879&r2=807880&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Wed Aug 26 05:11:10 2009
@@ -27,6 +27,9 @@
 
     HIVE-777. CREATE TABLE with STRUCT type. (He Yongqiang via zshao)
 
+    HIVE-792. Support "add archive" in addition to "add file" and "add jar".
+    (He Yongqiang via zshao)
+
   IMPROVEMENTS
 
     HIVE-760. Add version info to META-INF/MANIFEST.MF.

Modified: hadoop/hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java?rev=807880&r1=807879&r2=807880&view=diff
==============================================================================
--- hadoop/hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java (original)
+++ hadoop/hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java Wed Aug 26
05:11:10 2009
@@ -110,6 +110,7 @@
     // hive added files and jars
     HIVEADDEDFILES("hive.added.files.path", ""),
     HIVEADDEDJARS("hive.added.jars.path", ""),
+    HIVEADDEDARCHIVES("hive.added.archives.path", ""),
    
     // for hive script operator
     HIVETABLENAME("hive.table.name", ""),

Modified: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java?rev=807880&r1=807879&r2=807880&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java (original)
+++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java Wed Aug 26
05:11:10 2009
@@ -115,6 +115,10 @@
     if (StringUtils.isNotBlank(addedJars)) {
       HiveConf.setVar(job, ConfVars.HIVEADDEDJARS, addedJars);
     }
+    String addedArchives = getResourceFiles(job, SessionState.ResourceType.ARCHIVE);
+    if (StringUtils.isNotBlank(addedArchives)) {
+      HiveConf.setVar(job, ConfVars.HIVEADDEDARCHIVES, addedArchives);
+    }
   }
 
   /**
@@ -434,6 +438,11 @@
     if (StringUtils.isNotBlank(addedFiles)) {
       initializeFiles("tmpfiles", addedFiles);
     }
+    // Transfer HIVEADDEDARCHIVES to "tmparchives" so hadoop understands it
+    String addedArchives = HiveConf.getVar(job, HiveConf.ConfVars.HIVEADDEDARCHIVES);
+    if (StringUtils.isNotBlank(addedArchives)) {
+      initializeFiles("tmparchives", addedArchives);
+    }
     
     int returnVal = 0;
     RunningJob rj = null, orig_rj = null;

Modified: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java?rev=807880&r1=807879&r2=807880&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java (original)
+++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java Wed
Aug 26 05:11:10 2009
@@ -360,6 +360,11 @@
           }
         }
         public boolean postHook(Set<String> cur, String s) { return unregisterJar(s);
}
+      }),
+      
+    ARCHIVE(new ResourceHook () {
+        public String preHook(Set<String> cur, String s) { return validateFile(cur,
s); }
+        public boolean postHook(Set<String> cur, String s) { return true; }
       });
 
     public ResourceHook hook;



Mime
View raw message