diff --git a/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveBaseResultSet.java b/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveBaseResultSet.java index 7936c1e..652dbc6 100644 --- a/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveBaseResultSet.java +++ b/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 a/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveCallableStatement.java b/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveCallableStatement.java index 556249a..0df3d59 100644 --- a/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveCallableStatement.java +++ b/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveCallableStatement.java @@ -462,6 +462,16 @@ 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 +2041,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 a/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java b/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java index 6618243..437ac3a 100644 --- a/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java +++ b/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java @@ -47,6 +47,7 @@ import java.sql.Statement; import java.sql.Struct; import java.util.Map; import java.util.Properties; +import java.util.concurrent.Executor; /** * HiveConnection. @@ -121,6 +122,11 @@ public class HiveConnection implements java.sql.Connection { 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(); stmt.execute( @@ -340,6 +346,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 +624,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 +662,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 a/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDataSource.java b/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDataSource.java index 21599ff..f5e60c9 100644 --- a/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDataSource.java +++ b/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDataSource.java @@ -21,7 +21,8 @@ package org.apache.hadoop.hive.jdbc; import java.io.PrintWriter; import java.sql.Connection; import java.sql.SQLException; - +import java.sql.SQLFeatureNotSupportedException; +import java.util.logging.Logger; import javax.sql.DataSource; /** @@ -95,6 +96,11 @@ public class HiveDataSource implements DataSource { throw new SQLException("Method not supported"); } + public Logger getParentLogger() throws SQLFeatureNotSupportedException { + // JDK 1.7 + throw new SQLFeatureNotSupportedException("Method not supported"); + } + /* * (non-Javadoc) * diff --git a/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java b/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java index e59a65e..ec8c432 100644 --- a/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java +++ b/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java @@ -124,6 +124,18 @@ 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 +151,16 @@ 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 +278,18 @@ 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 +548,18 @@ 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 +609,18 @@ 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 +688,17 @@ 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 +758,18 @@ 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 a/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDriver.java b/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDriver.java index c61425f..71bc3de 100644 --- a/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDriver.java +++ b/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 a/jdbc/src/java/org/apache/hadoop/hive/jdbc/HivePreparedStatement.java b/jdbc/src/java/org/apache/hadoop/hive/jdbc/HivePreparedStatement.java index b847d51..2f37db3 100644 --- a/jdbc/src/java/org/apache/hadoop/hive/jdbc/HivePreparedStatement.java +++ b/jdbc/src/java/org/apache/hadoop/hive/jdbc/HivePreparedStatement.java @@ -844,6 +844,11 @@ 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 +1145,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 a/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveQueryResultSet.java b/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveQueryResultSet.java index 239cb8d..47b4d62 100644 --- a/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveQueryResultSet.java +++ b/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 a/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveStatement.java b/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveStatement.java index 4dc70eb..23cb4cd 100644 --- a/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveStatement.java +++ b/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) * diff --git a/metastore/build.xml b/metastore/build.xml index 2348dc2..844da5d 100755 --- a/metastore/build.xml +++ b/metastore/build.xml @@ -103,7 +103,7 @@ - +