hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r1089148 - in /hive/branches/branch-0.7/jdbc/src/java/org/apache/hadoop/hive/jdbc: HiveConnection.java HivePreparedStatement.java HiveStatement.java JdbcSessionState.java
Date Tue, 05 Apr 2011 18:10:03 GMT
Author: cws
Date: Tue Apr  5 18:10:02 2011
New Revision: 1089148

URL: http://svn.apache.org/viewvc?rev=1089148&view=rev
Log:
HIVE-2054. Exception on windows when using the jdbc driver. 'IOException: The system cannot
find the path specified' (Bennie Schut via cws)

Modified:
    hive/branches/branch-0.7/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java
    hive/branches/branch-0.7/jdbc/src/java/org/apache/hadoop/hive/jdbc/HivePreparedStatement.java
    hive/branches/branch-0.7/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveStatement.java
    hive/branches/branch-0.7/jdbc/src/java/org/apache/hadoop/hive/jdbc/JdbcSessionState.java

Modified: hive/branches/branch-0.7/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.7/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java?rev=1089148&r1=1089147&r2=1089148&view=diff
==============================================================================
--- hive/branches/branch-0.7/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java
(original)
+++ hive/branches/branch-0.7/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java
Tue Apr  5 18:10:02 2011
@@ -18,9 +18,7 @@
 
 package org.apache.hadoop.hive.jdbc;
 
-import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.metastore.api.MetaException;
-import org.apache.hadoop.hive.ql.session.SessionState;
 import org.apache.hadoop.hive.service.HiveClient;
 import org.apache.hadoop.hive.service.HiveInterface;
 import org.apache.hadoop.hive.service.HiveServer;
@@ -53,7 +51,6 @@ import java.util.Properties;
  *
  */
 public class HiveConnection implements java.sql.Connection {
-  private final JdbcSessionState session;
   private TTransport transport;
   private HiveInterface client;
   private boolean isClosed = true;
@@ -65,12 +62,6 @@ public class HiveConnection implements j
    * TODO: - parse uri (use java.net.URI?).
    */
   public HiveConnection(String uri, Properties info) throws SQLException {
-    session = new JdbcSessionState(new HiveConf(SessionState.class));
-    session.in = null;
-    session.out = null;
-    session.err = null;
-    SessionState.start(session);
-
     if (!uri.startsWith(URI_PREFIX)) {
       throw new SQLException("Invalid URL: " + uri, "08S01");
     }
@@ -223,7 +214,7 @@ public class HiveConnection implements j
     if (isClosed) {
       throw new SQLException("Can't create Statement, connection is closed");
     }
-    return new HiveStatement(session, client);
+    return new HiveStatement(client);
   }
 
   /*
@@ -440,7 +431,7 @@ public class HiveConnection implements j
    */
 
   public PreparedStatement prepareStatement(String sql) throws SQLException {
-    return new HivePreparedStatement(session, client, sql);
+    return new HivePreparedStatement(client, sql);
   }
 
   /*
@@ -451,7 +442,7 @@ public class HiveConnection implements j
 
   public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys)
       throws SQLException {
-    return new HivePreparedStatement(session, client, sql);
+    return new HivePreparedStatement(client, sql);
   }
 
   /*
@@ -487,7 +478,7 @@ public class HiveConnection implements j
 
   public PreparedStatement prepareStatement(String sql, int resultSetType,
       int resultSetConcurrency) throws SQLException {
-    return new HivePreparedStatement(session, client, sql);
+    return new HivePreparedStatement(client, sql);
   }
 
   /*

Modified: hive/branches/branch-0.7/jdbc/src/java/org/apache/hadoop/hive/jdbc/HivePreparedStatement.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.7/jdbc/src/java/org/apache/hadoop/hive/jdbc/HivePreparedStatement.java?rev=1089148&r1=1089147&r2=1089148&view=diff
==============================================================================
--- hive/branches/branch-0.7/jdbc/src/java/org/apache/hadoop/hive/jdbc/HivePreparedStatement.java
(original)
+++ hive/branches/branch-0.7/jdbc/src/java/org/apache/hadoop/hive/jdbc/HivePreparedStatement.java
Tue Apr  5 18:10:02 2011
@@ -50,7 +50,6 @@ import org.apache.hadoop.hive.service.Hi
  */
 public class HivePreparedStatement implements PreparedStatement {
   private String sql;
-  private JdbcSessionState session;
   private HiveInterface client;
   /**
    * We need to keep a reference to the result set to support the following:
@@ -78,9 +77,8 @@ public class HivePreparedStatement imple
   /**
    *
    */
-  public HivePreparedStatement(JdbcSessionState session, HiveInterface client,
+  public HivePreparedStatement(HiveInterface client,
       String sql) {
-    this.session = session;
     this.client = client;
     this.sql = sql;
   }

Modified: hive/branches/branch-0.7/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveStatement.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.7/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveStatement.java?rev=1089148&r1=1089147&r2=1089148&view=diff
==============================================================================
--- hive/branches/branch-0.7/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveStatement.java
(original)
+++ hive/branches/branch-0.7/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveStatement.java
Tue Apr  5 18:10:02 2011
@@ -31,7 +31,6 @@ import org.apache.hadoop.hive.service.Hi
  *
  */
 public class HiveStatement implements java.sql.Statement {
-  private JdbcSessionState session;
   private HiveInterface client;
   /**
    * We need to keep a reference to the result set to support the following:
@@ -60,8 +59,7 @@ public class HiveStatement implements ja
   /**
    *
    */
-  public HiveStatement(JdbcSessionState session, HiveInterface client) {
-    this.session = session;
+  public HiveStatement(HiveInterface client) {
     this.client = client;
   }
 

Modified: hive/branches/branch-0.7/jdbc/src/java/org/apache/hadoop/hive/jdbc/JdbcSessionState.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.7/jdbc/src/java/org/apache/hadoop/hive/jdbc/JdbcSessionState.java?rev=1089148&r1=1089147&r2=1089148&view=diff
==============================================================================
--- hive/branches/branch-0.7/jdbc/src/java/org/apache/hadoop/hive/jdbc/JdbcSessionState.java
(original)
+++ hive/branches/branch-0.7/jdbc/src/java/org/apache/hadoop/hive/jdbc/JdbcSessionState.java
Tue Apr  5 18:10:02 2011
@@ -1,37 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.jdbc;
-
-import org.apache.hadoop.hive.conf.HiveConf;
-import org.apache.hadoop.hive.ql.session.SessionState;
-
-/**
- * JdbcSessionState.
- *
- */
-public class JdbcSessionState extends SessionState {
-
-  public JdbcSessionState() {
-    super();
-  }
-
-  public JdbcSessionState(HiveConf conf) {
-    super(conf);
-  }
-}



Mime
View raw message