diff --git jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveBaseResultSet.java jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveBaseResultSet.java index 7936c1e..652dbc6 100644 --- jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveBaseResultSet.java +++ jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveBaseResultSet.java @@ -370,6 +370,16 @@ public abstract class HiveBaseResultSet implements ResultSet{ return getObject(findColumn(columnName)); } + public T getObject(int columnIndex, Class type) throws SQLException { + // TODO method required by JDK 1.7 + throw new SQLException("Method not supported"); + } + + public T getObject(String columnLabel, Class type) throws SQLException { + // TODO method required by JDK 1.7 + throw new SQLException("Method not supported"); + } + public Object getObject(int i, Map> map) throws SQLException { throw new SQLException("Method not supported"); } diff --git jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveCallableStatement.java jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveCallableStatement.java index 556249a..c2ef007 100644 --- jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveCallableStatement.java +++ jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveCallableStatement.java @@ -462,6 +462,17 @@ public class HiveCallableStatement implements java.sql.CallableStatement { throw new SQLException("Method not supported"); } + public T getObject(int parameterIndex, Class type) throws SQLException { + // TODO JDK 1.7 + throw new SQLException("Method not supported"); + } + + public T getObject(String parameterName, Class type) throws SQLException { + // TODO JDK 1.7 + throw new SQLException("Method not supported"); + } + + /* * (non-Javadoc) * @@ -2031,6 +2042,16 @@ public class HiveCallableStatement implements java.sql.CallableStatement { throw new SQLException("Method not supported"); } + public void closeOnCompletion() throws SQLException { + // JDK 1.7 + throw new SQLException("Method not supported"); + } + + public boolean isCloseOnCompletion() throws SQLException { + // JDK 1.7 + throw new SQLException("Method not supported"); + } + /* * (non-Javadoc) * diff --git jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java index 6618243..28eebba 100644 --- jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java +++ jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java @@ -45,6 +45,7 @@ import java.sql.SQLXML; import java.sql.Savepoint; import java.sql.Statement; import java.sql.Struct; +import java.util.concurrent.*; import java.util.Map; import java.util.Properties; @@ -120,6 +121,12 @@ public class HiveConnection implements java.sql.Connection { isClosed = false; configureConnection(); } + + + public void abort(Executor executor) throws SQLException { + // JDK 1.7 + throw new SQLException("Method not supported"); + } private void configureConnection() throws SQLException { Statement stmt = createStatement(); @@ -340,6 +347,17 @@ public class HiveConnection implements java.sql.Connection { return new HiveDatabaseMetaData(client); } + + public int getNetworkTimeout() throws SQLException { + // JDK 1.7 + throw new SQLException("Method not supported"); + } + + + public String getSchema() throws SQLException { + // JDK 1.7 + throw new SQLException("Method not supported"); + } /* * (non-Javadoc) * @@ -607,6 +625,11 @@ public class HiveConnection implements java.sql.Connection { throw new SQLException("Method not supported"); } + public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException { + // JDK 1.7 + throw new SQLException("Method not supported"); + } + /* * (non-Javadoc) * @@ -640,6 +663,11 @@ public class HiveConnection implements java.sql.Connection { throw new SQLException("Method not supported"); } + public void setSchema(String schema) throws SQLException { + // JDK 1.7 + throw new SQLException("Method not supported"); + } + /* * (non-Javadoc) * diff --git jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDataSource.java jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDataSource.java index 21599ff..584133c 100644 --- jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDataSource.java +++ jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDataSource.java @@ -21,9 +21,12 @@ package org.apache.hadoop.hive.jdbc; import java.io.PrintWriter; import java.sql.Connection; import java.sql.SQLException; +import java.sql.SQLFeatureNotSupportedException; import javax.sql.DataSource; +import java.util.logging.Logger; + /** * HiveDataSource. * @@ -90,6 +93,12 @@ public class HiveDataSource implements DataSource { * @see javax.sql.CommonDataSource#setLogWriter(java.io.PrintWriter) */ + public Logger getParentLogger() throws SQLFeatureNotSupportedException { + // JDK 1.7 + throw new SQLFeatureNotSupportedException("Method not supported"); + } + + public void setLogWriter(PrintWriter arg0) throws SQLException { // TODO Auto-generated method stub throw new SQLException("Method not supported"); diff --git jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java index e59a65e..e27a8cf 100644 --- jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java +++ jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java @@ -124,6 +124,14 @@ public class HiveDatabaseMetaData implements java.sql.DatabaseMetaData { return false; } } + public T getObject(String columnLabel, Class type) throws SQLException { + //JDK 1.7 + throw new SQLException("Method not supported"); + } + public T getObject(int columnIndex, Class type) throws SQLException { + //JDK 1.7 + throw new SQLException("Method not supported"); + } }; } catch (Exception e) { throw new SQLException(e); @@ -139,6 +147,17 @@ public class HiveDatabaseMetaData implements java.sql.DatabaseMetaData { throw new SQLException("Method not supported"); } + public ResultSet getPseudoColumns(String catalog, String schemaPattern, + String tableNamePattern, String columnNamePattern) throws SQLException { + throw new SQLException("Method not supported"); + } + + public boolean generatedKeyAlwaysReturned() throws SQLException { + // JDK 1.7 + throw new SQLException("Method not supported"); + } + + /** * Convert a pattern containing JDBC catalog search wildcards into * Java regex patterns. @@ -256,6 +275,14 @@ public class HiveDatabaseMetaData implements java.sql.DatabaseMetaData { return false; } } + public T getObject(String columnLabel, Class type) throws SQLException { + //JDK 1.7 + throw new SQLException("Method not supported"); + } + public T getObject(int columnIndex, Class type) throws SQLException { + //JDK 1.7 + throw new SQLException("Method not supported"); + } }; } catch (Exception e) { throw new SQLException(e); @@ -514,6 +541,14 @@ public class HiveDatabaseMetaData implements java.sql.DatabaseMetaData { public boolean next() throws SQLException { return false; } + public T getObject(String columnLabel, Class type) throws SQLException { + //JDK 1.7 + throw new SQLException("Method not supported"); + } + public T getObject(int columnIndex, Class type) throws SQLException { + //JDK 1.7 + throw new SQLException("Method not supported"); + } }; } @@ -563,6 +598,14 @@ public class HiveDatabaseMetaData implements java.sql.DatabaseMetaData { return false; } } + public T getObject(String columnLabel, Class type) throws SQLException { + //JDK 1.7 + throw new SQLException("Method not supported"); + } + public T getObject(int columnIndex, Class type) throws SQLException { + //JDK 1.7 + throw new SQLException("Method not supported"); + } }; return result; } @@ -630,6 +673,15 @@ public class HiveDatabaseMetaData implements java.sql.DatabaseMetaData { } } + public T getObject(String columnLabel, Class type) throws SQLException { + //JDK 1.7 + throw new SQLException("Method not supported"); + } + public T getObject(int columnIndex, Class type) throws SQLException { + //JDK 1.7 + throw new SQLException("Method not supported"); + } + }; return result; } @@ -689,6 +741,14 @@ public class HiveDatabaseMetaData implements java.sql.DatabaseMetaData { public boolean next() throws SQLException { return false; } + public T getObject(String columnLabel, Class type) throws SQLException { + //JDK 1.7 + throw new SQLException("Method not supported"); + } + public T getObject(int columnIndex, Class type) throws SQLException { + //JDK 1.7 + throw new SQLException("Method not supported"); + } }; } diff --git jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDriver.java jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDriver.java index c61425f..71bc3de 100644 --- jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDriver.java +++ jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDriver.java @@ -24,9 +24,11 @@ import java.sql.Connection; import java.sql.Driver; import java.sql.DriverPropertyInfo; import java.sql.SQLException; +import java.sql.SQLFeatureNotSupportedException; import java.util.Properties; import java.util.jar.Attributes; import java.util.jar.Manifest; +import java.util.logging.Logger; import java.util.regex.Pattern; /** @@ -166,6 +168,11 @@ public class HiveDriver implements Driver { return HiveDriver.getMinorDriverVersion(); } + public Logger getParentLogger() throws SQLFeatureNotSupportedException { + // JDK 1.7 + throw new SQLFeatureNotSupportedException("Method not supported"); + } + public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException { if (info == null) { info = new Properties(); diff --git jdbc/src/java/org/apache/hadoop/hive/jdbc/HivePreparedStatement.java jdbc/src/java/org/apache/hadoop/hive/jdbc/HivePreparedStatement.java index b847d51..4c9af2a 100644 --- jdbc/src/java/org/apache/hadoop/hive/jdbc/HivePreparedStatement.java +++ jdbc/src/java/org/apache/hadoop/hive/jdbc/HivePreparedStatement.java @@ -844,6 +844,12 @@ public class HivePreparedStatement implements PreparedStatement { warningChain=null; } + + public void closeOnCompletion() throws SQLException { + //JDK 1.7 + throw new SQLException("Method not supported"); + } + /** * Closes the prepared statement. * @@ -1140,6 +1146,11 @@ public class HivePreparedStatement implements PreparedStatement { return isClosed; } + public boolean isCloseOnCompletion() throws SQLException { + //JDK 1.7 + throw new SQLException("Method not supported"); + } + /* * (non-Javadoc) * diff --git jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveQueryResultSet.java jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveQueryResultSet.java index 239cb8d..47b4d62 100644 --- jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveQueryResultSet.java +++ jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveQueryResultSet.java @@ -190,6 +190,16 @@ public class HiveQueryResultSet extends HiveBaseResultSet { return fetchSize; } + public T getObject(String columnLabel, Class type) throws SQLException { + //JDK 1.7 + throw new SQLException("Method not supported"); + } + + public T getObject(int columnIndex, Class type) throws SQLException { + //JDK 1.7 + throw new SQLException("Method not supported"); + } + /** * Convert a LazyObject to a standard Java object in compliance with JDBC 3.0 (see JDBC 3.0 * Specification, Table B-3: Mapping from JDBC Types to Java Object Types). diff --git jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveStatement.java jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveStatement.java index 4dc70eb..cbdff2c 100644 --- jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveStatement.java +++ jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveStatement.java @@ -117,6 +117,11 @@ public class HiveStatement implements java.sql.Statement { isClosed = true; } + public void closeOnCompletion() throws SQLException { + //JDK 1.7 + throw new SQLException("Method not supported"); + } + /* * (non-Javadoc) * @@ -400,6 +405,11 @@ public class HiveStatement implements java.sql.Statement { return isClosed; } + public boolean isCloseOnCompletion() throws SQLException { + //JDK 1.7 + throw new SQLException("Method not supported"); + } + /* * (non-Javadoc) *