Index: jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveStatement.java =================================================================== --- jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveStatement.java (revision 1081782) +++ jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveStatement.java (working copy) @@ -31,7 +31,6 @@ * */ 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 HiveStatement(JdbcSessionState session, HiveInterface client) { - this.session = session; + public HiveStatement(HiveInterface client) { this.client = client; } Index: jdbc/src/java/org/apache/hadoop/hive/jdbc/HivePreparedStatement.java =================================================================== --- jdbc/src/java/org/apache/hadoop/hive/jdbc/HivePreparedStatement.java (revision 1081782) +++ jdbc/src/java/org/apache/hadoop/hive/jdbc/HivePreparedStatement.java (working copy) @@ -50,7 +50,6 @@ */ 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 HivePreparedStatement(JdbcSessionState session, HiveInterface client, + public HivePreparedStatement(HiveInterface client, String sql) { - this.session = session; this.client = client; this.sql = sql; } Index: jdbc/src/java/org/apache/hadoop/hive/jdbc/JdbcSessionState.java =================================================================== --- jdbc/src/java/org/apache/hadoop/hive/jdbc/JdbcSessionState.java (revision 1081782) +++ jdbc/src/java/org/apache/hadoop/hive/jdbc/JdbcSessionState.java (working copy) @@ -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); - } -} Index: jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java =================================================================== --- jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java (revision 1081782) +++ jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java (working copy) @@ -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 @@ * */ 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 @@ * 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 @@ 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 PreparedStatement prepareStatement(String sql) throws SQLException { - return new HivePreparedStatement(session, client, sql); + return new HivePreparedStatement(client, sql); } /* @@ -451,7 +442,7 @@ 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 PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException { - return new HivePreparedStatement(session, client, sql); + return new HivePreparedStatement(client, sql); } /*