You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by gu...@apache.org on 2013/08/30 09:35:56 UTC

svn commit: r1518898 - /hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java

Author: gunther
Date: Fri Aug 30 07:35:56 2013
New Revision: 1518898

URL: http://svn.apache.org/r1518898
Log:
HIVE-5184: Load filesystem, ugi, metastore client at tez session startup (Gunther Hagleitner)

Modified:
    hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java

Modified: hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java?rev=1518898&r1=1518897&r2=1518898&view=diff
==============================================================================
--- hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java (original)
+++ hive/branches/tez/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java Fri Aug 30 07:35:56 2013
@@ -33,6 +33,9 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hdfs.DistributedFileSystem;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.ql.ErrorMsg;
+import org.apache.hadoop.hive.ql.metadata.Hive;
+import org.apache.hadoop.hive.ql.metadata.HiveException;
+import org.apache.hadoop.hive.shims.ShimLoader;
 import org.apache.hadoop.yarn.api.records.LocalResource;
 import org.apache.tez.client.AMConfiguration;
 import org.apache.tez.client.TezSession;
@@ -76,13 +79,20 @@ public class TezSessionState {
    * @throws URISyntaxException
    * @throws LoginException
    * @throws TezException
+   * @throws HiveException
    */
   public void open(String sessionId, HiveConf conf)
-      throws IOException, LoginException, URISyntaxException, TezException {
+      throws IOException, LoginException, URISyntaxException, TezException, HiveException {
 
     this.sessionId = sessionId;
     this.conf = conf;
 
+    // Get the following out of the way when you start the session these take a
+    // while and should be done when we start up.
+    FileSystem.get(conf);
+    ShimLoader.getHadoopShims().getUGIForConf(conf);
+    Hive.get(conf).getAllDatabases();
+
     // create the tez tmp dir
     tezScratchDir = createTezDir(sessionId);