String connectorId = "cassandra-test";
CassandraConnectorFactory connectorFactory = new CassandraConnectorFactory(
connectorId,
ImmutableMap.<String, String>of("node.environment", "test"));
Connector connector = connectorFactory.create(connectorId, ImmutableMap.<String, String>of(
"cassandra.contact-points", "localhost",
"cassandra.native-protocol-port", "9142"));
metadata = connector.getService(ConnectorMetadata.class);
assertInstanceOf(metadata, CassandraMetadata.class);
splitManager = connector.getService(ConnectorSplitManager.class);
assertInstanceOf(splitManager, CassandraSplitManager.class);
recordSetProvider = connector.getService(ConnectorRecordSetProvider.class);
assertInstanceOf(recordSetProvider, CassandraRecordSetProvider.class);
ConnectorHandleResolver handleResolver = connector.getService(ConnectorHandleResolver.class);
assertInstanceOf(handleResolver, CassandraHandleResolver.class);
database = "presto_database";
table = new SchemaTableName(database, "presto_test");
tableUnpartitioned = new SchemaTableName(database, "presto_test_unpartitioned");