com.facebook.presto.spi.connector.ConnectorSplitManager Java Examples

The following examples show how to use com.facebook.presto.spi.connector.ConnectorSplitManager. 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: KuduModule.java    From presto-kudu with Apache License 2.0 6 votes vote down vote up
@Override
protected void configure() {
    bind(TypeManager.class).toInstance(typeManager);

    bind(KuduConnector.class).in(Scopes.SINGLETON);
    bind(KuduConnectorId.class).toInstance(new KuduConnectorId(connectorId));
    bind(KuduMetadata.class).in(Scopes.SINGLETON);
    bind(KuduTableProperties.class).in(Scopes.SINGLETON);
    bind(ConnectorSplitManager.class).to(KuduSplitManager.class).in(Scopes.SINGLETON);
    bind(ConnectorRecordSetProvider.class).to(KuduRecordSetProvider.class)
            .in(Scopes.SINGLETON);
    bind(ConnectorPageSourceProvider.class).to(KuduPageSourceProvider.class)
            .in(Scopes.SINGLETON);
    bind(ConnectorPageSinkProvider.class).to(KuduPageSinkProvider.class).in(Scopes.SINGLETON);
    bind(KuduHandleResolver.class).in(Scopes.SINGLETON);
    bind(KuduRecordSetProvider.class).in(Scopes.SINGLETON);
    configBinder(binder()).bindConfig(KuduClientConfig.class);

    bind(RangePartitionProcedures.class).in(Scopes.SINGLETON);
    Multibinder.newSetBinder(binder(), Procedure.class);
}
 
Example #2
Source File: KuduConnector.java    From presto-kudu with Apache License 2.0 6 votes vote down vote up
@Inject
public KuduConnector(LifeCycleManager lifeCycleManager, KuduMetadata metadata,
                     ConnectorSplitManager splitManager, ConnectorRecordSetProvider recordSetProvider,
                     KuduTableProperties tableProperties,
                     ConnectorPageSourceProvider pageSourceProvider,
                     ConnectorPageSinkProvider pageSinkProvider,
                     Set<Procedure> procedures) {
    this.lifeCycleManager = requireNonNull(lifeCycleManager, "lifeCycleManager is null");
    this.metadata = requireNonNull(metadata, "metadata is null");
    this.splitManager = requireNonNull(splitManager, "splitManager is null");
    this.recordSetProvider = requireNonNull(recordSetProvider, "recordSetProvider is null");
    this.pageSourceProvider = requireNonNull(pageSourceProvider, "pageSourceProvider is null");
    this.tableProperties = requireNonNull(tableProperties, "tableProperties is null");
    this.pageSinkProvider = requireNonNull(pageSinkProvider, "pageSinkProvider is null");
    this.procedures = ImmutableSet.copyOf(requireNonNull(procedures, "procedures is null"));
}
 
Example #3
Source File: KinesisSplitManager.java    From presto-kinesis with Apache License 2.0 6 votes vote down vote up
@Override
public ConnectorSplitSource getSplits(ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorTableLayoutHandle layout, ConnectorSplitManager.SplitSchedulingStrategy splitSchedulingStrategy)
{
    KinesisTableLayoutHandle kinesislayout = handleResolver.convertLayout(layout);
    KinesisTableHandle kinesisTableHandle = kinesislayout.getTable();

    InternalStreamDescription desc = this.getStreamDescription(kinesisTableHandle.getStreamName());

    ImmutableList.Builder<ConnectorSplit> builder = ImmutableList.builder();
    for (Shard shard : desc.getShards()) {
        KinesisSplit split = new KinesisSplit(connectorId,
                kinesisTableHandle.getStreamName(),
                kinesisTableHandle.getMessageDataFormat(),
                shard.getShardId(),
                shard.getSequenceNumberRange().getStartingSequenceNumber(),
                shard.getSequenceNumberRange().getEndingSequenceNumber());
        builder.add(split);
    }

    return new FixedSplitSource(builder.build());
}
 
Example #4
Source File: BaseClient.java    From presto-connectors with Apache License 2.0 4 votes vote down vote up
public List<ElasticsearchSplit> getTabletSplits(
ConnectorSession session,
ElasticsearchTableHandle tableHandle,
ElasticsearchTableLayoutHandle layoutHandle,
ConnectorSplitManager.SplitSchedulingStrategy splitSchedulingStrategy);
 
Example #5
Source File: ElasticsearchConnector.java    From presto-connectors with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorSplitManager getSplitManager()
{
    return this.splitManager;
}
 
Example #6
Source File: HbaseConnector.java    From presto-connectors with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorSplitManager getSplitManager()
{
    return splitManager;
}
 
Example #7
Source File: ParaflowConnector.java    From paraflow with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorSplitManager getSplitManager()
{
    return paraflowSplitManager;
}
 
Example #8
Source File: EthereumConnector.java    From presto-ethereum with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorSplitManager getSplitManager() {
    return splitManager;
}
 
Example #9
Source File: KuduConnector.java    From presto-kudu with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorSplitManager getSplitManager() {
    return splitManager;
}
 
Example #10
Source File: BitcoinConnector.java    From hadoopcryptoledger with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorSplitManager getSplitManager() {
	// TODO Auto-generated method stub
	return null;
}
 
Example #11
Source File: KinesisConnector.java    From presto-kinesis with Apache License 2.0 4 votes vote down vote up
@Override
public ConnectorSplitManager getSplitManager()
{
    return splitManager;
}