cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xe...@apache.org
Subject svn commit: r1177701 - in /cassandra/trunk: ./ drivers/java/src/org/apache/cassandra/cql/jdbc/
Date Fri, 30 Sep 2011 15:35:40 GMT
Author: xedin
Date: Fri Sep 30 15:35:39 2011
New Revision: 1177701

URL: http://svn.apache.org/viewvc?rev=1177701&view=rev
Log:
fix JDBC driver to compile under JDK 7
patch by satishbabu; reviewed by xedin for CASSANDRA-3275

Modified:
    cassandra/trunk/CHANGES.txt
    cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractCassandraConnection.java
    cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractResultSet.java
    cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractStatement.java
    cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraDataSource.java
    cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraDatabaseMetaData.java
    cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraDriver.java

Modified: cassandra/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/trunk/CHANGES.txt?rev=1177701&r1=1177700&r2=1177701&view=diff
==============================================================================
--- cassandra/trunk/CHANGES.txt (original)
+++ cassandra/trunk/CHANGES.txt Fri Sep 30 15:35:39 2011
@@ -1,6 +1,6 @@
 1.0.1
  * describe_ring should include datacenter/topology information (CASSANDRA-2882)
-
+ * fix JDBC driver to compile under JDK 7 (CASSANDRA-3275)
 
 1.0.0-final
  * Log a miningfull warning when a node receive a message for a repair session

Modified: cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractCassandraConnection.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractCassandraConnection.java?rev=1177701&r1=1177700&r2=1177701&view=diff
==============================================================================
--- cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractCassandraConnection.java
(original)
+++ cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractCassandraConnection.java
Fri Sep 30 15:35:39 2011
@@ -31,6 +31,7 @@ import java.sql.SQLFeatureNotSupportedEx
 import java.sql.SQLXML;
 import java.sql.Savepoint;
 import java.sql.Struct;
+import java.util.concurrent.Executor;
 import java.util.Map;
 
 abstract class AbstractCassandraConnection
@@ -125,5 +126,29 @@ abstract class AbstractCassandraConnecti
     {
         throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
     }
+    
+    public void abort(Executor executor) throws SQLException
+    {
+    	throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+    }
+
+    public void setSchema(String schema) throws SQLException
+    {
+    	throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+    }
+
+    public String getSchema() throws SQLException
+    {
+    	throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+    }
 
+    public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException
+    {
+    	throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+    }
+
+    public int getNetworkTimeout() throws SQLException
+    {
+    	throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+    }
 }

Modified: cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractResultSet.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractResultSet.java?rev=1177701&r1=1177700&r2=1177701&view=diff
==============================================================================
--- cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractResultSet.java
(original)
+++ cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractResultSet.java
Fri Sep 30 15:35:39 2011
@@ -144,6 +144,16 @@ abstract class AbstractResultSet
     {
         throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
     }
+    
+    public <T> T getObject(String columnLabel, Class<T> type) throws SQLException
+    {
+        throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+    }
+    
+    public <T> T getObject(int columnIndex, Class<T> type) throws SQLException
+    {
+        throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+    }
 
     public Ref getRef(int arg0) throws SQLException
     {

Modified: cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractStatement.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractStatement.java?rev=1177701&r1=1177700&r2=1177701&view=diff
==============================================================================
--- cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractStatement.java
(original)
+++ cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/AbstractStatement.java
Fri Sep 30 15:35:39 2011
@@ -61,4 +61,14 @@ abstract class AbstractStatement
     {
         throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
     }
+
+    public void closeOnCompletion() throws SQLException
+    {
+        throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+    }
+
+    public boolean isCloseOnCompletion() throws SQLException
+    {
+        throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);
+    }
 }

Modified: cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraDataSource.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraDataSource.java?rev=1177701&r1=1177700&r2=1177701&view=diff
==============================================================================
--- cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraDataSource.java
(original)
+++ cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraDataSource.java
Fri Sep 30 15:35:39 2011
@@ -3,6 +3,7 @@ package org.apache.cassandra.cql.jdbc;
 
 import static org.apache.cassandra.cql.jdbc.Utils.HOST_REQUIRED;
 import static org.apache.cassandra.cql.jdbc.Utils.NO_INTERFACE;
+import static org.apache.cassandra.cql.jdbc.Utils.NOT_SUPPORTED;
 import static org.apache.cassandra.cql.jdbc.Utils.PROTOCOL;
 import static org.apache.cassandra.cql.jdbc.Utils.TAG_SERVER_NAME;
 import static org.apache.cassandra.cql.jdbc.Utils.TAG_DATABASE_NAME;
@@ -17,6 +18,7 @@ import java.sql.DriverManager;
 import java.sql.SQLException;
 import java.sql.SQLFeatureNotSupportedException;
 import java.sql.SQLNonTransientConnectionException;
+import java.util.logging.Logger;
 import java.util.Properties;
 
 import javax.sql.DataSource;
@@ -164,5 +166,10 @@ public class CassandraDataSource impleme
     {
         if (iface.isAssignableFrom(getClass())) return iface.cast(this);
         throw new SQLFeatureNotSupportedException(String.format(NO_INTERFACE, iface.getSimpleName()));
-    }      
+    }  
+    
+    public Logger getParentLogger() throws SQLFeatureNotSupportedException
+    {
+    	throw new SQLFeatureNotSupportedException(String.format(NOT_SUPPORTED));
+    }
 }

Modified: cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraDatabaseMetaData.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraDatabaseMetaData.java?rev=1177701&r1=1177700&r2=1177701&view=diff
==============================================================================
--- cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraDatabaseMetaData.java
(original)
+++ cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraDatabaseMetaData.java
Fri Sep 30 15:35:39 2011
@@ -21,6 +21,7 @@
 package org.apache.cassandra.cql.jdbc;
 
 import static org.apache.cassandra.cql.jdbc.Utils.NO_INTERFACE;
+import static org.apache.cassandra.cql.jdbc.Utils.NOT_SUPPORTED;
 
 import java.sql.Connection;
 import java.sql.DatabaseMetaData;
@@ -915,5 +916,14 @@ class CassandraDatabaseMetaData implemen
     {
         return false;
     }
-
+    
+    public boolean generatedKeyAlwaysReturned() throws SQLException
+    {
+    	throw new SQLFeatureNotSupportedException(String.format(NOT_SUPPORTED));
+    }
+    
+    public ResultSet getPseudoColumns(String catalog, String schemaPattern, String tableNamePattern,
String columnNamePattern) throws SQLException
+    {
+    	throw new SQLFeatureNotSupportedException(String.format(NOT_SUPPORTED));
+    }
 }

Modified: cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraDriver.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraDriver.java?rev=1177701&r1=1177700&r2=1177701&view=diff
==============================================================================
--- cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraDriver.java (original)
+++ cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraDriver.java Fri
Sep 30 15:35:39 2011
@@ -23,12 +23,14 @@ package org.apache.cassandra.cql.jdbc;
 import static org.apache.cassandra.cql.jdbc.Utils.PROTOCOL;
 import static org.apache.cassandra.cql.jdbc.Utils.TAG_PASSWORD;
 import static org.apache.cassandra.cql.jdbc.Utils.TAG_USER;
+import static org.apache.cassandra.cql.jdbc.Utils.NOT_SUPPORTED;
 
 import java.sql.Connection;
 import java.sql.Driver;
 import java.sql.DriverManager;
 import java.sql.DriverPropertyInfo;
 import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
 import java.util.Properties;
 
 import org.slf4j.Logger;
@@ -136,4 +138,9 @@ public class CassandraDriver implements 
     {
         return false;
     }
+    
+    public java.util.logging.Logger getParentLogger() throws SQLFeatureNotSupportedException
+    {
+    	throw new SQLFeatureNotSupportedException(String.format(NOT_SUPPORTED));
+    }
 }



Mime
View raw message