Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Won't Fix
-
None
-
Normal
Description
The native transport CQL driver "Java Driver" has a maven pom which declares a dependency on the cassandra-all artifact (aka Everything). This is Bad because Cassandra makes use of many common libraries, making conflicts with client applications inevitable.
Some of java-driver's uses can be avoided, I think. For example, it seems to use the AbstractType extending classes in org.apache.cassandra.db.marshal instead of the classes included in the cassandra-clientutil artifact (org.apache.cassandra.cql.jdbc). I will file a separate Github issue for that. The rest of its usage looks something like the following:
- org.apache.cassandra.db.marshal.*
- org.apache.cassandra.exceptions.*
- org.apache.cassandra.transport.Message;
- org.apache.cassandra.transport.messages.ErrorMessage
- org.apache.cassandra.transport.messages.ExecuteMessage
- org.apache.cassandra.transport.messages.PrepareMessage
- org.apache.cassandra.transport.messages.QueryMessage
- org.apache.cassandra.transport.messages.ResultMessage
- org.apache.cassandra.service.ClientState
- org.apache.cassandra.transport.* ??
- org.apache.cassandra.transport.ConsistencyLevel ??
- org.apache.cassandra.transport.Event ??
- org.apache.cassandra.cql3.ColumnSpecification
- org.apache.cassandra.utils.MD5Digest
Ostensibly the solution would be to move what's needed into clientutil jar, but this will likely require significantly more. For example, grepping imports on the o.a.c.transport package yields the following:
- org.apache.cassandra.concurrent.DebuggableThreadPoolExecutor
- org.apache.cassandra.concurrent.NamedThreadFactory
- org.apache.cassandra.config.DatabaseDescriptor
- org.apache.cassandra.config.EncryptionOptions
- org.apache.cassandra.cql3.ColumnSpecification
- org.apache.cassandra.cql3.CQLStatement
- org.apache.cassandra.cql3.QueryProcessor
- org.apache.cassandra.cql3.ResultSet
- org.apache.cassandra.db.ConsistencyLevel
- org.apache.cassandra.db.marshal.*
- org.apache.cassandra.db.marshal.Int32Type
- org.apache.cassandra.db.marshal.TypeParser
- org.apache.cassandra.db.marshal.UTF8Type
- org.apache.cassandra.db.WriteType
- org.apache.cassandra.security.SSLFactory
- org.apache.cassandra.service.CassandraDaemon
- org.apache.cassandra.service.ClientState
- org.apache.cassandra.service.IEndpointLifecycleSubscriber
- org.apache.cassandra.service.IMigrationListener
- org.apache.cassandra.service.MigrationManager
- org.apache.cassandra.service.QueryState
- org.apache.cassandra.service.StorageService
- org.apache.cassandra.tracing.Tracing
- org.apache.cassandra.utils.FBUtilities
- org.apache.cassandra.utils.MD5Digest
- org.apache.cassandra.utils.Pair
- org.apache.cassandra.utils.SemanticVersion
And it's probably much worse once transitive dependencies are taken into account.
Attachments
Issue Links
- duplicates
-
CASSANDRA-4623 Revise contents of clientutil.jar to reflect needs of new native protocol on client side
- Resolved
- is duplicated by
-
CASSANDRA-5405 Provide a utility API for client libraries
- Resolved