hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1455659 [4/11] - in /hive/trunk: ./ ant/src/org/apache/hadoop/hive/ant/ bin/ bin/ext/ cli/ common/ common/src/gen/ common/src/gen/org/ common/src/gen/org/apache/ common/src/gen/org/apache/hive/ common/src/gen/org/apache/hive/common/ common...
Date Tue, 12 Mar 2013 18:22:03 GMT
Added: hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveCallableStatement.java
URL: http://svn.apache.org/viewvc/hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveCallableStatement.java?rev=1455659&view=auto
==============================================================================
--- hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveCallableStatement.java (added)
+++ hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveCallableStatement.java Tue Mar 12 18:22:00 2013
@@ -0,0 +1,2442 @@
+/**
+ * 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.hive.jdbc;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.math.BigDecimal;
+import java.net.URL;
+import java.sql.Array;
+import java.sql.Blob;
+import java.sql.Clob;
+import java.sql.Connection;
+import java.sql.Date;
+import java.sql.NClob;
+import java.sql.ParameterMetaData;
+import java.sql.Ref;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.RowId;
+import java.sql.SQLException;
+import java.sql.SQLWarning;
+import java.sql.SQLXML;
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.util.Calendar;
+import java.util.Map;
+
+/**
+ * HiveCallableStatement.
+ *
+ */
+public class HiveCallableStatement implements java.sql.CallableStatement {
+
+  /**
+   *
+   */
+  public HiveCallableStatement() {
+    // TODO Auto-generated constructor stub
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getArray(int)
+   */
+
+  public Array getArray(int i) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getArray(java.lang.String)
+   */
+
+  public Array getArray(String parameterName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getBigDecimal(int)
+   */
+
+  public BigDecimal getBigDecimal(int parameterIndex) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getBigDecimal(java.lang.String)
+   */
+
+  public BigDecimal getBigDecimal(String parameterName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getBigDecimal(int, int)
+   */
+
+  public BigDecimal getBigDecimal(int parameterIndex, int scale) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getBlob(int)
+   */
+
+  public Blob getBlob(int i) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getBlob(java.lang.String)
+   */
+
+  public Blob getBlob(String parameterName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getBoolean(int)
+   */
+
+  public boolean getBoolean(int parameterIndex) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getBoolean(java.lang.String)
+   */
+
+  public boolean getBoolean(String parameterName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getByte(int)
+   */
+
+  public byte getByte(int parameterIndex) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getByte(java.lang.String)
+   */
+
+  public byte getByte(String parameterName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getBytes(int)
+   */
+
+  public byte[] getBytes(int parameterIndex) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getBytes(java.lang.String)
+   */
+
+  public byte[] getBytes(String parameterName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getCharacterStream(int)
+   */
+
+  public Reader getCharacterStream(int arg0) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getCharacterStream(java.lang.String)
+   */
+
+  public Reader getCharacterStream(String arg0) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getClob(int)
+   */
+
+  public Clob getClob(int i) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getClob(java.lang.String)
+   */
+
+  public Clob getClob(String parameterName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getDate(int)
+   */
+
+  public Date getDate(int parameterIndex) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getDate(java.lang.String)
+   */
+
+  public Date getDate(String parameterName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getDate(int, java.util.Calendar)
+   */
+
+  public Date getDate(int parameterIndex, Calendar cal) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getDate(java.lang.String,
+   * java.util.Calendar)
+   */
+
+  public Date getDate(String parameterName, Calendar cal) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getDouble(int)
+   */
+
+  public double getDouble(int parameterIndex) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getDouble(java.lang.String)
+   */
+
+  public double getDouble(String parameterName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getFloat(int)
+   */
+
+  public float getFloat(int parameterIndex) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getFloat(java.lang.String)
+   */
+
+  public float getFloat(String parameterName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getInt(int)
+   */
+
+  public int getInt(int parameterIndex) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getInt(java.lang.String)
+   */
+
+  public int getInt(String parameterName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getLong(int)
+   */
+
+  public long getLong(int parameterIndex) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getLong(java.lang.String)
+   */
+
+  public long getLong(String parameterName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getNCharacterStream(int)
+   */
+
+  public Reader getNCharacterStream(int parameterIndex) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getNCharacterStream(java.lang.String)
+   */
+
+  public Reader getNCharacterStream(String parameterName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getNClob(int)
+   */
+
+  public NClob getNClob(int parameterIndex) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getNClob(java.lang.String)
+   */
+
+  public NClob getNClob(String parameterName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getNString(int)
+   */
+
+  public String getNString(int parameterIndex) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getNString(java.lang.String)
+   */
+
+  public String getNString(String parameterName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getObject(int)
+   */
+
+  public Object getObject(int parameterIndex) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getObject(java.lang.String)
+   */
+
+  public Object getObject(String parameterName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getObject(int, java.util.Map)
+   */
+
+  public Object getObject(int i, Map<String, Class<?>> map) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getObject(java.lang.String, java.util.Map)
+   */
+
+  public Object getObject(String parameterName, Map<String, Class<?>> map) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getRef(int)
+   */
+
+  public Ref getRef(int i) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getRef(java.lang.String)
+   */
+
+  public Ref getRef(String parameterName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getRowId(int)
+   */
+
+  public RowId getRowId(int parameterIndex) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getRowId(java.lang.String)
+   */
+
+  public RowId getRowId(String parameterName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getSQLXML(int)
+   */
+
+  public SQLXML getSQLXML(int parameterIndex) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getSQLXML(java.lang.String)
+   */
+
+  public SQLXML getSQLXML(String parameterName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getShort(int)
+   */
+
+  public short getShort(int parameterIndex) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getShort(java.lang.String)
+   */
+
+  public short getShort(String parameterName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getString(int)
+   */
+
+  public String getString(int parameterIndex) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getString(java.lang.String)
+   */
+
+  public String getString(String parameterName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getTime(int)
+   */
+
+  public Time getTime(int parameterIndex) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getTime(java.lang.String)
+   */
+
+  public Time getTime(String parameterName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getTime(int, java.util.Calendar)
+   */
+
+  public Time getTime(int parameterIndex, Calendar cal) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getTime(java.lang.String,
+   * java.util.Calendar)
+   */
+
+  public Time getTime(String parameterName, Calendar cal) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getTimestamp(int)
+   */
+
+  public Timestamp getTimestamp(int parameterIndex) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getTimestamp(java.lang.String)
+   */
+
+  public Timestamp getTimestamp(String parameterName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getTimestamp(int, java.util.Calendar)
+   */
+
+  public Timestamp getTimestamp(int parameterIndex, Calendar cal) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getTimestamp(java.lang.String,
+   * java.util.Calendar)
+   */
+
+  public Timestamp getTimestamp(String parameterName, Calendar cal) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getURL(int)
+   */
+
+  public URL getURL(int parameterIndex) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#getURL(java.lang.String)
+   */
+
+  public URL getURL(String parameterName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#registerOutParameter(int, int)
+   */
+
+  public void registerOutParameter(int parameterIndex, int sqlType) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#registerOutParameter(java.lang.String, int)
+   */
+
+  public void registerOutParameter(String parameterName, int sqlType) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#registerOutParameter(int, int, int)
+   */
+
+  public void registerOutParameter(int parameterIndex, int sqlType, int scale)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#registerOutParameter(int, int,
+   * java.lang.String)
+   */
+
+  public void registerOutParameter(int paramIndex, int sqlType, String typeName)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#registerOutParameter(java.lang.String, int,
+   * int)
+   */
+
+  public void registerOutParameter(String parameterName, int sqlType, int scale)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#registerOutParameter(java.lang.String, int,
+   * java.lang.String)
+   */
+
+  public void registerOutParameter(String parameterName, int sqlType,
+      String typeName) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setAsciiStream(java.lang.String,
+   * java.io.InputStream)
+   */
+
+  public void setAsciiStream(String parameterName, InputStream x)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setAsciiStream(java.lang.String,
+   * java.io.InputStream, int)
+   */
+
+  public void setAsciiStream(String parameterName, InputStream x, int length)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setAsciiStream(java.lang.String,
+   * java.io.InputStream, long)
+   */
+
+  public void setAsciiStream(String parameterName, InputStream x, long length)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setBigDecimal(java.lang.String,
+   * java.math.BigDecimal)
+   */
+
+  public void setBigDecimal(String parameterName, BigDecimal x)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setBinaryStream(java.lang.String,
+   * java.io.InputStream)
+   */
+
+  public void setBinaryStream(String parameterName, InputStream x)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setBinaryStream(java.lang.String,
+   * java.io.InputStream, int)
+   */
+
+  public void setBinaryStream(String parameterName, InputStream x, int length)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setBinaryStream(java.lang.String,
+   * java.io.InputStream, long)
+   */
+
+  public void setBinaryStream(String parameterName, InputStream x, long length)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setBlob(java.lang.String, java.sql.Blob)
+   */
+
+  public void setBlob(String parameterName, Blob x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setBlob(java.lang.String,
+   * java.io.InputStream)
+   */
+
+  public void setBlob(String parameterName, InputStream inputStream)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setBlob(java.lang.String,
+   * java.io.InputStream, long)
+   */
+
+  public void setBlob(String parameterName, InputStream inputStream, long length)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setBoolean(java.lang.String, boolean)
+   */
+
+  public void setBoolean(String parameterName, boolean x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setByte(java.lang.String, byte)
+   */
+
+  public void setByte(String parameterName, byte x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setBytes(java.lang.String, byte[])
+   */
+
+  public void setBytes(String parameterName, byte[] x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setCharacterStream(java.lang.String,
+   * java.io.Reader)
+   */
+
+  public void setCharacterStream(String parameterName, Reader reader)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setCharacterStream(java.lang.String,
+   * java.io.Reader, int)
+   */
+
+  public void setCharacterStream(String parameterName, Reader reader, int length)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setCharacterStream(java.lang.String,
+   * java.io.Reader, long)
+   */
+
+  public void setCharacterStream(String parameterName, Reader reader,
+      long length) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setClob(java.lang.String, java.sql.Clob)
+   */
+
+  public void setClob(String parameterName, Clob x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setClob(java.lang.String, java.io.Reader)
+   */
+
+  public void setClob(String parameterName, Reader reader) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setClob(java.lang.String, java.io.Reader,
+   * long)
+   */
+
+  public void setClob(String parameterName, Reader reader, long length)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setDate(java.lang.String, java.sql.Date)
+   */
+
+  public void setDate(String parameterName, Date x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setDate(java.lang.String, java.sql.Date,
+   * java.util.Calendar)
+   */
+
+  public void setDate(String parameterName, Date x, Calendar cal)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setDouble(java.lang.String, double)
+   */
+
+  public void setDouble(String parameterName, double x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setFloat(java.lang.String, float)
+   */
+
+  public void setFloat(String parameterName, float x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setInt(java.lang.String, int)
+   */
+
+  public void setInt(String parameterName, int x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setLong(java.lang.String, long)
+   */
+
+  public void setLong(String parameterName, long x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setNCharacterStream(java.lang.String,
+   * java.io.Reader)
+   */
+
+  public void setNCharacterStream(String parameterName, Reader value)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setNCharacterStream(java.lang.String,
+   * java.io.Reader, long)
+   */
+
+  public void setNCharacterStream(String parameterName, Reader value,
+      long length) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setNClob(java.lang.String, java.sql.NClob)
+   */
+
+  public void setNClob(String parameterName, NClob value) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setNClob(java.lang.String, java.io.Reader)
+   */
+
+  public void setNClob(String parameterName, Reader reader) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setNClob(java.lang.String, java.io.Reader,
+   * long)
+   */
+
+  public void setNClob(String parameterName, Reader reader, long length)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setNString(java.lang.String,
+   * java.lang.String)
+   */
+
+  public void setNString(String parameterName, String value)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setNull(java.lang.String, int)
+   */
+
+  public void setNull(String parameterName, int sqlType) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setNull(java.lang.String, int,
+   * java.lang.String)
+   */
+
+  public void setNull(String parameterName, int sqlType, String typeName)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setObject(java.lang.String,
+   * java.lang.Object)
+   */
+
+  public void setObject(String parameterName, Object x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setObject(java.lang.String,
+   * java.lang.Object, int)
+   */
+
+  public void setObject(String parameterName, Object x, int targetSqlType)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setObject(java.lang.String,
+   * java.lang.Object, int, int)
+   */
+
+  public void setObject(String parameterName, Object x, int targetSqlType,
+      int scale) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setRowId(java.lang.String, java.sql.RowId)
+   */
+
+  public void setRowId(String parameterName, RowId x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setSQLXML(java.lang.String,
+   * java.sql.SQLXML)
+   */
+
+  public void setSQLXML(String parameterName, SQLXML xmlObject)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setShort(java.lang.String, short)
+   */
+
+  public void setShort(String parameterName, short x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setString(java.lang.String,
+   * java.lang.String)
+   */
+
+  public void setString(String parameterName, String x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setTime(java.lang.String, java.sql.Time)
+   */
+
+  public void setTime(String parameterName, Time x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setTime(java.lang.String, java.sql.Time,
+   * java.util.Calendar)
+   */
+
+  public void setTime(String parameterName, Time x, Calendar cal)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setTimestamp(java.lang.String,
+   * java.sql.Timestamp)
+   */
+
+  public void setTimestamp(String parameterName, Timestamp x)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setTimestamp(java.lang.String,
+   * java.sql.Timestamp, java.util.Calendar)
+   */
+
+  public void setTimestamp(String parameterName, Timestamp x, Calendar cal)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#setURL(java.lang.String, java.net.URL)
+   */
+
+  public void setURL(String parameterName, URL val) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.CallableStatement#wasNull()
+   */
+
+  public boolean wasNull() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#addBatch()
+   */
+
+  public void addBatch() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#clearParameters()
+   */
+
+  public void clearParameters() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#execute()
+   */
+
+  public boolean execute() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#executeQuery()
+   */
+
+  public ResultSet executeQuery() throws SQLException {
+    return new HiveQueryResultSet.Builder().build();
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#executeUpdate()
+   */
+
+  public int executeUpdate() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#getMetaData()
+   */
+
+  public ResultSetMetaData getMetaData() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#getParameterMetaData()
+   */
+
+  public ParameterMetaData getParameterMetaData() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setArray(int, java.sql.Array)
+   */
+
+  public void setArray(int i, Array x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setAsciiStream(int, java.io.InputStream)
+   */
+
+  public void setAsciiStream(int arg0, InputStream arg1) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setAsciiStream(int, java.io.InputStream,
+   * int)
+   */
+
+  public void setAsciiStream(int parameterIndex, InputStream x, int length)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setAsciiStream(int, java.io.InputStream,
+   * long)
+   */
+
+  public void setAsciiStream(int arg0, InputStream arg1, long arg2)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setBigDecimal(int, java.math.BigDecimal)
+   */
+
+  public void setBigDecimal(int parameterIndex, BigDecimal x)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setBinaryStream(int, java.io.InputStream)
+   */
+
+  public void setBinaryStream(int parameterIndex, InputStream x)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setBinaryStream(int, java.io.InputStream,
+   * int)
+   */
+
+  public void setBinaryStream(int parameterIndex, InputStream x, int length)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setBinaryStream(int, java.io.InputStream,
+   * long)
+   */
+
+  public void setBinaryStream(int parameterIndex, InputStream x, long length)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setBlob(int, java.sql.Blob)
+   */
+
+  public void setBlob(int i, Blob x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setBlob(int, java.io.InputStream)
+   */
+
+  public void setBlob(int parameterIndex, InputStream inputStream)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setBlob(int, java.io.InputStream, long)
+   */
+
+  public void setBlob(int parameterIndex, InputStream inputStream, long length)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setBoolean(int, boolean)
+   */
+
+  public void setBoolean(int parameterIndex, boolean x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setByte(int, byte)
+   */
+
+  public void setByte(int parameterIndex, byte x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setBytes(int, byte[])
+   */
+
+  public void setBytes(int parameterIndex, byte[] x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setCharacterStream(int, java.io.Reader)
+   */
+
+  public void setCharacterStream(int parameterIndex, Reader reader)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setCharacterStream(int, java.io.Reader,
+   * int)
+   */
+
+  public void setCharacterStream(int parameterIndex, Reader reader, int length)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setCharacterStream(int, java.io.Reader,
+   * long)
+   */
+
+  public void setCharacterStream(int parameterIndex, Reader reader, long length)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setClob(int, java.sql.Clob)
+   */
+
+  public void setClob(int i, Clob x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setClob(int, java.io.Reader)
+   */
+
+  public void setClob(int parameterIndex, Reader reader) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setClob(int, java.io.Reader, long)
+   */
+
+  public void setClob(int parameterIndex, Reader reader, long length)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setDate(int, java.sql.Date)
+   */
+
+  public void setDate(int parameterIndex, Date x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setDate(int, java.sql.Date,
+   * java.util.Calendar)
+   */
+
+  public void setDate(int parameterIndex, Date x, Calendar cal)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setDouble(int, double)
+   */
+
+  public void setDouble(int parameterIndex, double x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setFloat(int, float)
+   */
+
+  public void setFloat(int parameterIndex, float x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setInt(int, int)
+   */
+
+  public void setInt(int parameterIndex, int x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setLong(int, long)
+   */
+
+  public void setLong(int parameterIndex, long x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setNCharacterStream(int, java.io.Reader)
+   */
+
+  public void setNCharacterStream(int parameterIndex, Reader value)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setNCharacterStream(int, java.io.Reader,
+   * long)
+   */
+
+  public void setNCharacterStream(int parameterIndex, Reader value, long length)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setNClob(int, java.sql.NClob)
+   */
+
+  public void setNClob(int parameterIndex, NClob value) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setNClob(int, java.io.Reader)
+   */
+
+  public void setNClob(int parameterIndex, Reader reader) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setNClob(int, java.io.Reader, long)
+   */
+
+  public void setNClob(int parameterIndex, Reader reader, long length)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setNString(int, java.lang.String)
+   */
+
+  public void setNString(int parameterIndex, String value) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setNull(int, int)
+   */
+
+  public void setNull(int parameterIndex, int sqlType) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setNull(int, int, java.lang.String)
+   */
+
+  public void setNull(int paramIndex, int sqlType, String typeName)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setObject(int, java.lang.Object)
+   */
+
+  public void setObject(int parameterIndex, Object x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setObject(int, java.lang.Object, int)
+   */
+
+  public void setObject(int parameterIndex, Object x, int targetSqlType)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setObject(int, java.lang.Object, int, int)
+   */
+
+  public void setObject(int parameterIndex, Object x, int targetSqlType,
+      int scale) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setRef(int, java.sql.Ref)
+   */
+
+  public void setRef(int i, Ref x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setRowId(int, java.sql.RowId)
+   */
+
+  public void setRowId(int parameterIndex, RowId x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setSQLXML(int, java.sql.SQLXML)
+   */
+
+  public void setSQLXML(int parameterIndex, SQLXML xmlObject)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setShort(int, short)
+   */
+
+  public void setShort(int parameterIndex, short x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setString(int, java.lang.String)
+   */
+
+  public void setString(int parameterIndex, String x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setTime(int, java.sql.Time)
+   */
+
+  public void setTime(int parameterIndex, Time x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setTime(int, java.sql.Time,
+   * java.util.Calendar)
+   */
+
+  public void setTime(int parameterIndex, Time x, Calendar cal)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setTimestamp(int, java.sql.Timestamp)
+   */
+
+  public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setTimestamp(int, java.sql.Timestamp,
+   * java.util.Calendar)
+   */
+
+  public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setURL(int, java.net.URL)
+   */
+
+  public void setURL(int parameterIndex, URL x) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.PreparedStatement#setUnicodeStream(int, java.io.InputStream,
+   * int)
+   */
+
+  public void setUnicodeStream(int parameterIndex, InputStream x, int length)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#addBatch(java.lang.String)
+   */
+
+  public void addBatch(String sql) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#cancel()
+   */
+
+  public void cancel() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#clearBatch()
+   */
+
+  public void clearBatch() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#clearWarnings()
+   */
+
+  public void clearWarnings() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#close()
+   */
+
+  public void close() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#execute(java.lang.String)
+   */
+
+  public boolean execute(String sql) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#execute(java.lang.String, int)
+   */
+
+  public boolean execute(String sql, int autoGeneratedKeys) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#execute(java.lang.String, int[])
+   */
+
+  public boolean execute(String sql, int[] columnIndexes) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#execute(java.lang.String, java.lang.String[])
+   */
+
+  public boolean execute(String sql, String[] columnNames) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#executeBatch()
+   */
+
+  public int[] executeBatch() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#executeQuery(java.lang.String)
+   */
+
+  public ResultSet executeQuery(String sql) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#executeUpdate(java.lang.String)
+   */
+
+  public int executeUpdate(String sql) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#executeUpdate(java.lang.String, int)
+   */
+
+  public int executeUpdate(String sql, int autoGeneratedKeys)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#executeUpdate(java.lang.String, int[])
+   */
+
+  public int executeUpdate(String sql, int[] columnIndexes) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#executeUpdate(java.lang.String, java.lang.String[])
+   */
+
+  public int executeUpdate(String sql, String[] columnNames)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#getConnection()
+   */
+
+  public Connection getConnection() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#getFetchDirection()
+   */
+
+  public int getFetchDirection() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#getFetchSize()
+   */
+
+  public int getFetchSize() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#getGeneratedKeys()
+   */
+
+  public ResultSet getGeneratedKeys() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#getMaxFieldSize()
+   */
+
+  public int getMaxFieldSize() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#getMaxRows()
+   */
+
+  public int getMaxRows() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#getMoreResults()
+   */
+
+  public boolean getMoreResults() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#getMoreResults(int)
+   */
+
+  public boolean getMoreResults(int current) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#getQueryTimeout()
+   */
+
+  public int getQueryTimeout() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#getResultSet()
+   */
+
+  public ResultSet getResultSet() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#getResultSetConcurrency()
+   */
+
+  public int getResultSetConcurrency() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#getResultSetHoldability()
+   */
+
+  public int getResultSetHoldability() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#getResultSetType()
+   */
+
+  public int getResultSetType() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#getUpdateCount()
+   */
+
+  public int getUpdateCount() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#getWarnings()
+   */
+
+  public SQLWarning getWarnings() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#isClosed()
+   */
+
+  public boolean isClosed() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#isPoolable()
+   */
+
+  public boolean isPoolable() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#setCursorName(java.lang.String)
+   */
+
+  public void setCursorName(String name) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#setEscapeProcessing(boolean)
+   */
+
+  public void setEscapeProcessing(boolean enable) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#setFetchDirection(int)
+   */
+
+  public void setFetchDirection(int direction) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#setFetchSize(int)
+   */
+
+  public void setFetchSize(int rows) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#setMaxFieldSize(int)
+   */
+
+  public void setMaxFieldSize(int max) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#setMaxRows(int)
+   */
+
+  public void setMaxRows(int max) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#setPoolable(boolean)
+   */
+
+  public void setPoolable(boolean arg0) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Statement#setQueryTimeout(int)
+   */
+
+  public void setQueryTimeout(int seconds) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Wrapper#isWrapperFor(java.lang.Class)
+   */
+
+  public boolean isWrapperFor(Class<?> iface) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Wrapper#unwrap(java.lang.Class)
+   */
+
+  public <T> T unwrap(Class<T> iface) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+}

Added: hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java
URL: http://svn.apache.org/viewvc/hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java?rev=1455659&view=auto
==============================================================================
--- hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java (added)
+++ hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java Tue Mar 12 18:22:00 2013
@@ -0,0 +1,743 @@
+/**
+ * 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.hive.jdbc;
+
+import java.sql.Array;
+import java.sql.Blob;
+import java.sql.CallableStatement;
+import java.sql.Clob;
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.NClob;
+import java.sql.PreparedStatement;
+import java.sql.SQLClientInfoException;
+import java.sql.SQLException;
+import java.sql.SQLWarning;
+import java.sql.SQLXML;
+import java.sql.Savepoint;
+import java.sql.Statement;
+import java.sql.Struct;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+
+import javax.security.sasl.SaslException;
+
+import org.apache.hadoop.hive.ql.session.SessionState;
+import org.apache.hive.service.auth.KerberosSaslHelper;
+import org.apache.hive.service.auth.PlainSaslHelper;
+import org.apache.hive.service.cli.thrift.EmbeddedThriftCLIService;
+import org.apache.hive.service.cli.thrift.TCLIService;
+import org.apache.hive.service.cli.thrift.TCloseSessionReq;
+import org.apache.hive.service.cli.thrift.TOpenSessionReq;
+import org.apache.hive.service.cli.thrift.TOpenSessionResp;
+import org.apache.hive.service.cli.thrift.TProtocolVersion;
+import org.apache.hive.service.cli.thrift.TSessionHandle;
+import org.apache.thrift.TException;
+import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.protocol.TProtocol;
+import org.apache.thrift.transport.TSocket;
+import org.apache.thrift.transport.TTransport;
+import org.apache.thrift.transport.TTransportException;
+
+/**
+ * HiveConnection.
+ *
+ */
+public class HiveConnection implements java.sql.Connection {
+  private static final String HIVE_AUTH_TYPE= "auth";
+  private static final String HIVE_AUTH_SIMPLE = "noSasl";
+  private static final String HIVE_AUTH_USER = "user";
+  private static final String HIVE_AUTH_PRINCIPAL = "principal";
+  private static final String HIVE_AUTH_PASSWD = "password";
+  private static final String HIVE_ANONYMOUS_USER = "anonymous";
+  private static final String HIVE_ANONYMOUS_PASSWD = "anonymous";
+
+  private TTransport transport;
+  private TCLIService.Iface client;
+  private boolean isClosed = true;
+  private SQLWarning warningChain = null;
+  private TSessionHandle sessHandle = null;
+  private final List<TProtocolVersion> supportedProtocols = new LinkedList<TProtocolVersion>();
+  /**
+   * TODO: - parse uri (use java.net.URI?).
+   */
+  public HiveConnection(String uri, Properties info) throws SQLException {
+    Utils.JdbcConnectionParams connParams = Utils.parseURL(uri);
+    if (connParams.isEmbeddedMode()) {
+      client = new EmbeddedThriftCLIService();
+    } else {
+      // extract user/password from JDBC connection properties if its not supplied in the connection URL
+      if (info.containsKey(HIVE_AUTH_USER)) {
+        connParams.getSessionVars().put(HIVE_AUTH_USER, info.getProperty(HIVE_AUTH_USER));
+        if (info.containsKey(HIVE_AUTH_PASSWD)) {
+            connParams.getSessionVars().put(HIVE_AUTH_PASSWD, info.getProperty(HIVE_AUTH_PASSWD));
+        }
+      }
+
+      openTransport(uri, connParams.getHost(), connParams.getPort(), connParams.getSessionVars());
+    }
+
+    // currently only V1 is supported
+    supportedProtocols.add(TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V1);
+
+    // open client session
+    openSession(uri);
+
+    configureConnection(connParams);
+  }
+
+  private void configureConnection(Utils.JdbcConnectionParams connParams)
+      throws SQLException {
+    // set the hive variable in session state for local mode
+    if (connParams.isEmbeddedMode()) {
+      if (!connParams.getHiveVars().isEmpty()) {
+        SessionState.get().setHiveVariables(connParams.getHiveVars());
+      }
+    } else {
+      // for remote JDBC client, try to set the conf var using 'set foo=bar'
+      Statement stmt = createStatement();
+      for (Entry<String, String> hiveConf : connParams.getHiveConfs().entrySet()) {
+        stmt.execute("set " + hiveConf.getKey() + "=" + hiveConf.getValue());
+        stmt.close();
+      }
+    }
+  }
+
+  private void openTransport(String uri, String host, int port, Map<String, String> sessConf )
+      throws SQLException {
+    transport = new TSocket(host, port);
+
+    // handle secure connection if specified
+    if (!sessConf.containsKey(HIVE_AUTH_TYPE)
+        || !sessConf.get(HIVE_AUTH_TYPE).equals(HIVE_AUTH_SIMPLE)){
+      try {
+        if (sessConf.containsKey(HIVE_AUTH_PRINCIPAL)) {
+          transport = KerberosSaslHelper.getKerberosTransport(
+                  sessConf.get(HIVE_AUTH_PRINCIPAL), host, transport);
+        } else {
+          String userName = sessConf.get(HIVE_AUTH_USER);
+          if ((userName == null) || userName.isEmpty()) {
+            userName = HIVE_ANONYMOUS_USER;
+          }
+          String passwd = sessConf.get(HIVE_AUTH_PASSWD);
+          if ((passwd == null) || passwd.isEmpty()) {
+            passwd = HIVE_ANONYMOUS_PASSWD;
+          }
+          transport = PlainSaslHelper.getPlainTransport(userName, passwd, transport);
+        }
+      } catch (SaslException e) {
+        throw new SQLException("Could not establish secure connection to "
+                  + uri + ": " + e.getMessage(), " 08S01");
+      }
+    }
+
+    TProtocol protocol = new TBinaryProtocol(transport);
+    client = new TCLIService.Client(protocol);
+    try {
+      transport.open();
+    } catch (TTransportException e) {
+      e.printStackTrace();
+      throw new SQLException("Could not establish connection to "
+          + uri + ": " + e.getMessage(), " 08S01");
+    }
+  }
+
+    private void openSession(String uri) throws SQLException {
+      TOpenSessionReq openReq = new TOpenSessionReq();
+
+      // set the session configuration
+      // openReq.setConfiguration(null);
+
+      try {
+        TOpenSessionResp openResp = client.OpenSession(openReq);
+
+        // validate connection
+        Utils.verifySuccess(openResp.getStatus());
+        if (!supportedProtocols.contains(openResp.getServerProtocolVersion())) {
+          throw new TException("Unsupported Hive2 protocol");
+        }
+        sessHandle = openResp.getSessionHandle();
+      } catch (TException e) {
+        throw new SQLException("Could not establish connection to "
+            + uri + ": " + e.getMessage(), " 08S01");
+      }
+      isClosed = false;
+    }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#clearWarnings()
+   */
+
+  public void clearWarnings() throws SQLException {
+    warningChain = null;
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#close()
+   */
+
+  public void close() throws SQLException {
+    if (!isClosed) {
+      TCloseSessionReq closeReq = new TCloseSessionReq(sessHandle);
+      try {
+        client.CloseSession(closeReq);
+      } catch (TException e) {
+        throw new SQLException("Error while cleaning up the server resources", e);
+      } finally {
+        isClosed = true;
+        if (transport != null) {
+          transport.close();
+        }
+      }
+    }
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#commit()
+   */
+
+  public void commit() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#createArrayOf(java.lang.String,
+   * java.lang.Object[])
+   */
+
+  public Array createArrayOf(String arg0, Object[] arg1) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#createBlob()
+   */
+
+  public Blob createBlob() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#createClob()
+   */
+
+  public Clob createClob() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#createNClob()
+   */
+
+  public NClob createNClob() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#createSQLXML()
+   */
+
+  public SQLXML createSQLXML() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /**
+   * Creates a Statement object for sending SQL statements to the database.
+   *
+   * @throws SQLException
+   *           if a database access error occurs.
+   * @see java.sql.Connection#createStatement()
+   */
+
+  public Statement createStatement() throws SQLException {
+    if (isClosed) {
+      throw new SQLException("Can't create Statement, connection is closed");
+    }
+    return new HiveStatement(client, sessHandle);
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#createStatement(int, int)
+   */
+
+  public Statement createStatement(int resultSetType, int resultSetConcurrency)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#createStatement(int, int, int)
+   */
+
+  public Statement createStatement(int resultSetType, int resultSetConcurrency,
+      int resultSetHoldability) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#createStruct(java.lang.String, java.lang.Object[])
+   */
+
+  public Struct createStruct(String typeName, Object[] attributes)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#getAutoCommit()
+   */
+
+  public boolean getAutoCommit() throws SQLException {
+    return true;
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#getCatalog()
+   */
+
+  public String getCatalog() throws SQLException {
+    return "";
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#getClientInfo()
+   */
+
+  public Properties getClientInfo() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#getClientInfo(java.lang.String)
+   */
+
+  public String getClientInfo(String name) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#getHoldability()
+   */
+
+  public int getHoldability() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#getMetaData()
+   */
+
+  public DatabaseMetaData getMetaData() throws SQLException {
+    return new HiveDatabaseMetaData(client, sessHandle);
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#getTransactionIsolation()
+   */
+
+  public int getTransactionIsolation() throws SQLException {
+    return Connection.TRANSACTION_NONE;
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#getTypeMap()
+   */
+
+  public Map<String, Class<?>> getTypeMap() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#getWarnings()
+   */
+
+  public SQLWarning getWarnings() throws SQLException {
+    return warningChain;
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#isClosed()
+   */
+
+  public boolean isClosed() throws SQLException {
+    return isClosed;
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#isReadOnly()
+   */
+
+  public boolean isReadOnly() throws SQLException {
+    return false;
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#isValid(int)
+   */
+
+  public boolean isValid(int timeout) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#nativeSQL(java.lang.String)
+   */
+
+  public String nativeSQL(String sql) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#prepareCall(java.lang.String)
+   */
+
+  public CallableStatement prepareCall(String sql) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#prepareCall(java.lang.String, int, int)
+   */
+
+  public CallableStatement prepareCall(String sql, int resultSetType,
+      int resultSetConcurrency) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#prepareCall(java.lang.String, int, int, int)
+   */
+
+  public CallableStatement prepareCall(String sql, int resultSetType,
+      int resultSetConcurrency, int resultSetHoldability) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#prepareStatement(java.lang.String)
+   */
+
+  public PreparedStatement prepareStatement(String sql) throws SQLException {
+    return new HivePreparedStatement(client, sessHandle, sql);
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#prepareStatement(java.lang.String, int)
+   */
+
+  public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys)
+      throws SQLException {
+    return new HivePreparedStatement(client, sessHandle, sql);
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#prepareStatement(java.lang.String, int[])
+   */
+
+  public PreparedStatement prepareStatement(String sql, int[] columnIndexes)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#prepareStatement(java.lang.String,
+   * java.lang.String[])
+   */
+
+  public PreparedStatement prepareStatement(String sql, String[] columnNames)
+      throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#prepareStatement(java.lang.String, int, int)
+   */
+
+  public PreparedStatement prepareStatement(String sql, int resultSetType,
+      int resultSetConcurrency) throws SQLException {
+    return new HivePreparedStatement(client, sessHandle, sql);
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#prepareStatement(java.lang.String, int, int, int)
+   */
+
+  public PreparedStatement prepareStatement(String sql, int resultSetType,
+      int resultSetConcurrency, int resultSetHoldability) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#releaseSavepoint(java.sql.Savepoint)
+   */
+
+  public void releaseSavepoint(Savepoint savepoint) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#rollback()
+   */
+
+  public void rollback() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#rollback(java.sql.Savepoint)
+   */
+
+  public void rollback(Savepoint savepoint) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#setAutoCommit(boolean)
+   */
+
+  public void setAutoCommit(boolean autoCommit) throws SQLException {
+    if (autoCommit) {
+      throw new SQLException("enabling autocommit is not supported");
+    }
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#setCatalog(java.lang.String)
+   */
+
+  public void setCatalog(String catalog) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#setClientInfo(java.util.Properties)
+   */
+
+  public void setClientInfo(Properties properties)
+      throws SQLClientInfoException {
+    // TODO Auto-generated method stub
+    throw new SQLClientInfoException("Method not supported", null);
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#setClientInfo(java.lang.String, java.lang.String)
+   */
+
+  public void setClientInfo(String name, String value)
+      throws SQLClientInfoException {
+    // TODO Auto-generated method stub
+    throw new SQLClientInfoException("Method not supported", null);
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#setHoldability(int)
+   */
+
+  public void setHoldability(int holdability) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#setReadOnly(boolean)
+   */
+
+  public void setReadOnly(boolean readOnly) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#setSavepoint()
+   */
+
+  public Savepoint setSavepoint() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#setSavepoint(java.lang.String)
+   */
+
+  public Savepoint setSavepoint(String name) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#setTransactionIsolation(int)
+   */
+
+  public void setTransactionIsolation(int level) throws SQLException {
+    // TODO: throw an exception?
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Connection#setTypeMap(java.util.Map)
+   */
+
+  public void setTypeMap(Map<String, Class<?>> map) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Wrapper#isWrapperFor(java.lang.Class)
+   */
+
+  public boolean isWrapperFor(Class<?> iface) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   *
+   * @see java.sql.Wrapper#unwrap(java.lang.Class)
+   */
+
+  public <T> T unwrap(Class<T> iface) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+}

Added: hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveDataSource.java
URL: http://svn.apache.org/viewvc/hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveDataSource.java?rev=1455659&view=auto
==============================================================================
--- hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveDataSource.java (added)
+++ hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveDataSource.java Tue Mar 12 18:22:00 2013
@@ -0,0 +1,131 @@
+/**
+ * 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.hive.jdbc;
+
+import java.io.PrintWriter;
+import java.sql.Connection;
+import java.sql.SQLException;
+
+import javax.sql.DataSource;
+
+/**
+ * HiveDataSource.
+ *
+ */
+public class HiveDataSource implements DataSource {
+
+  /**
+   *
+   */
+  public HiveDataSource() {
+    // TODO Auto-generated constructor stub
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see javax.sql.DataSource#getConnection()
+   */
+
+  public Connection getConnection() throws SQLException {
+    return getConnection("", "");
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see javax.sql.DataSource#getConnection(java.lang.String, java.lang.String)
+   */
+
+  public Connection getConnection(String username, String password)
+      throws SQLException {
+    try {
+      return new HiveConnection("", null);
+    } catch (Exception ex) {
+      throw new SQLException("Error in getting HiveConnection",ex);
+    }
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see javax.sql.CommonDataSource#getLogWriter()
+   */
+
+  public PrintWriter getLogWriter() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see javax.sql.CommonDataSource#getLoginTimeout()
+   */
+
+  public int getLoginTimeout() throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see javax.sql.CommonDataSource#setLogWriter(java.io.PrintWriter)
+   */
+
+  public void setLogWriter(PrintWriter arg0) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see javax.sql.CommonDataSource#setLoginTimeout(int)
+   */
+
+  public void setLoginTimeout(int arg0) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see java.sql.Wrapper#isWrapperFor(java.lang.Class)
+   */
+
+  public boolean isWrapperFor(Class<?> arg0) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see java.sql.Wrapper#unwrap(java.lang.Class)
+   */
+
+  public <T> T unwrap(Class<T> arg0) throws SQLException {
+    // TODO Auto-generated method stub
+    throw new SQLException("Method not supported");
+  }
+
+}



Mime
View raw message