io.prestosql.spi.connector.ConnectorHandleResolver Java Examples

The following examples show how to use io.prestosql.spi.connector.ConnectorHandleResolver. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TestCoordinatorDynamicFiltering.java    From presto with Apache License 2.0 6 votes vote down vote up
@Override
public Iterable<ConnectorFactory> getConnectorFactories()
{
    return ImmutableList.of(new ConnectorFactory()
    {
        private final ConnectorMetadata metadata = new TestingMetadata();

        @Override
        public String getName()
        {
            return "test";
        }

        @Override
        public ConnectorHandleResolver getHandleResolver()
        {
            return new TestingHandleResolver();
        }

        @Override
        public Connector create(String catalogName, Map<String, String> config, ConnectorContext context)
        {
            return new TestConnector(metadata, Duration.valueOf("10s"), expectedDynamicFilter);
        }
    });
}
 
Example #2
Source File: TestBeginQuery.java    From presto with Apache License 2.0 6 votes vote down vote up
@Override
public Iterable<ConnectorFactory> getConnectorFactories()
{
    return ImmutableList.of(new ConnectorFactory()
    {
        @Override
        public String getName()
        {
            return "test";
        }

        @Override
        public ConnectorHandleResolver getHandleResolver()
        {
            return new TestingHandleResolver();
        }

        @Override
        public Connector create(String catalogName, Map<String, String> config, ConnectorContext context)
        {
            return new TestConnector(metadata);
        }
    });
}
 
Example #3
Source File: HandleResolver.java    From presto with Apache License 2.0 5 votes vote down vote up
public MaterializedHandleResolver(ConnectorHandleResolver resolver)
{
    tableHandle = getHandleClass(resolver::getTableHandleClass);
    layoutHandle = getHandleClass(resolver::getTableLayoutHandleClass);
    columnHandle = getHandleClass(resolver::getColumnHandleClass);
    split = getHandleClass(resolver::getSplitClass);
    indexHandle = getHandleClass(resolver::getIndexHandleClass);
    outputTableHandle = getHandleClass(resolver::getOutputTableHandleClass);
    insertTableHandle = getHandleClass(resolver::getInsertTableHandleClass);
    partitioningHandle = getHandleClass(resolver::getPartitioningHandleClass);
    transactionHandle = getHandleClass(resolver::getTransactionHandleClass);
}
 
Example #4
Source File: HandleResolver.java    From presto with Apache License 2.0 5 votes vote down vote up
public void addCatalogHandleResolver(String catalogName, ConnectorHandleResolver resolver)
{
    requireNonNull(catalogName, "catalogName is null");
    requireNonNull(resolver, "resolver is null");
    MaterializedHandleResolver existingResolver = handleResolvers.putIfAbsent(catalogName, new MaterializedHandleResolver(resolver));
    checkState(existingResolver == null, "Catalog '%s' is already assigned to resolver: %s", catalogName, existingResolver);
}
 
Example #5
Source File: KuduConnectorFactory.java    From presto with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorHandleResolver getHandleResolver()
{
    return new KuduHandleResolver();
}
 
Example #6
Source File: ElasticsearchConnectorFactory.java    From presto with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorHandleResolver getHandleResolver()
{
    return new ElasticsearchHandleResolver();
}
 
Example #7
Source File: TestingElasticsearchConnectorFactory.java    From presto with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorHandleResolver getHandleResolver()
{
    return new ElasticsearchHandleResolver();
}
 
Example #8
Source File: IcebergConnector.java    From presto with Apache License 2.0 4 votes vote down vote up
@Override
public Optional<ConnectorHandleResolver> getHandleResolver()
{
    return Optional.of(new IcebergHandleResolver());
}
 
Example #9
Source File: TestingIcebergConnectorFactory.java    From presto with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorHandleResolver getHandleResolver()
{
    return new IcebergHandleResolver();
}
 
Example #10
Source File: ThriftConnectorFactory.java    From presto with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorHandleResolver getHandleResolver()
{
    return new ThriftHandleResolver();
}
 
Example #11
Source File: BigQueryConnectorFactory.java    From presto with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorHandleResolver getHandleResolver()
{
    return new BigQueryHandleResolver();
}
 
Example #12
Source File: LocalFileConnectorFactory.java    From presto with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorHandleResolver getHandleResolver()
{
    return new LocalFileHandleResolver();
}
 
Example #13
Source File: CassandraConnectorFactory.java    From presto with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorHandleResolver getHandleResolver()
{
    return new CassandraHandleResolver();
}
 
Example #14
Source File: MemoryConnectorFactory.java    From presto with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorHandleResolver getHandleResolver()
{
    return new MemoryHandleResolver();
}
 
Example #15
Source File: KinesisConnectorFactory.java    From presto with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorHandleResolver getHandleResolver()
{
    return new KinesisHandleResolver();
}
 
Example #16
Source File: SheetsConnectorFactory.java    From presto with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorHandleResolver getHandleResolver()
{
    return new SheetsHandleResolver();
}
 
Example #17
Source File: HiveConnector.java    From presto with Apache License 2.0 4 votes vote down vote up
@Override
public Optional<ConnectorHandleResolver> getHandleResolver()
{
    return Optional.of(new HiveHandleResolver());
}
 
Example #18
Source File: TestingHiveConnectorFactory.java    From presto with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorHandleResolver getHandleResolver()
{
    return new HiveHandleResolver();
}
 
Example #19
Source File: AtopConnectorFactory.java    From presto with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorHandleResolver getHandleResolver()
{
    return new AtopHandleResolver();
}
 
Example #20
Source File: PinotConnectorFactory.java    From presto with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorHandleResolver getHandleResolver()
{
    return new PinotHandleResolver();
}
 
Example #21
Source File: HBaseConnectorFactory.java    From presto-hbase-connector with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorHandleResolver getHandleResolver() {
    return new HBaseHandleResolver();
}
 
Example #22
Source File: PulsarConnectorFactory.java    From pulsar with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorHandleResolver getHandleResolver() {
    return new PulsarHandleResolver();
}
 
Example #23
Source File: IndexedTpchConnectorFactory.java    From presto with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorHandleResolver getHandleResolver()
{
    return new TpchIndexHandleResolver();
}
 
Example #24
Source File: PrometheusConnectorFactory.java    From presto with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorHandleResolver getHandleResolver()
{
    return new PrometheusHandleResolver();
}
 
Example #25
Source File: ExampleConnectorFactory.java    From presto with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorHandleResolver getHandleResolver()
{
    return new ExampleHandleResolver();
}
 
Example #26
Source File: RedisConnectorFactory.java    From presto with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorHandleResolver getHandleResolver()
{
    return new RedisHandleResolver();
}
 
Example #27
Source File: BlackHoleConnectorFactory.java    From presto with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorHandleResolver getHandleResolver()
{
    return new BlackHoleHandleResolver();
}
 
Example #28
Source File: JmxConnectorFactory.java    From presto with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorHandleResolver getHandleResolver()
{
    return new JmxHandleResolver();
}
 
Example #29
Source File: AccumuloConnectorFactory.java    From presto with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorHandleResolver getHandleResolver()
{
    return new AccumuloHandleResolver();
}
 
Example #30
Source File: JdbcConnectorFactory.java    From presto with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorHandleResolver getHandleResolver()
{
    return new JdbcHandleResolver();
}