Package org.apache.cassandra.tools
Class BulkLoadConnectionFactory
- java.lang.Object
-
- org.apache.cassandra.streaming.DefaultConnectionFactory
-
- org.apache.cassandra.tools.BulkLoadConnectionFactory
-
- All Implemented Interfaces:
StreamConnectionFactory
public class BulkLoadConnectionFactory extends DefaultConnectionFactory implements StreamConnectionFactory
-
-
Field Summary
-
Fields inherited from class org.apache.cassandra.streaming.DefaultConnectionFactory
MAX_CONNECT_ATTEMPTS
-
-
Constructor Summary
Constructors Constructor Description BulkLoadConnectionFactory(EncryptionOptions.ServerEncryptionOptions encryptionOptions, int storagePort)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.netty.channel.ChannelcreateConnection(OutboundConnectionSettings template, int messagingVersion)booleansupportsPreferredIp()Provide way to disable getPreferredIP() for tools without access to the system keyspace
-
-
-
Constructor Detail
-
BulkLoadConnectionFactory
public BulkLoadConnectionFactory(EncryptionOptions.ServerEncryptionOptions encryptionOptions, int storagePort)
-
-
Method Detail
-
createConnection
public io.netty.channel.Channel createConnection(OutboundConnectionSettings template, int messagingVersion) throws java.io.IOException
- Specified by:
createConnectionin interfaceStreamConnectionFactory- Overrides:
createConnectionin classDefaultConnectionFactory- Throws:
java.io.IOException
-
supportsPreferredIp
public boolean supportsPreferredIp()
Description copied from interface:StreamConnectionFactoryProvide way to disable getPreferredIP() for tools without access to the system keyspaceCASSANDRA-17663 moves calls to SystemKeyspace.getPreferredIP() outside of any threads that are regularly interrupted. However the streaming subsystem is also used by the bulk loader tool, which does not have direct access to the local tables and uses the client metadata/queries to retrieve it.
- Specified by:
supportsPreferredIpin interfaceStreamConnectionFactory- Returns:
- true if SystemKeyspace.getPreferredIP() should be used when connecting
-
-