Java 类com.facebook.presto.spi.connector.ConnectorSplitManager 实例源码

项目:presto    文件:TestAccessControlManager.java   
private static void registerBogusConnector(TransactionManager transactionManager, String connectorId)
{
    transactionManager.addConnector(connectorId, new Connector()
    {
        @Override
        public ConnectorTransactionHandle beginTransaction(IsolationLevel isolationLevel, boolean readOnly)
        {
            // Just return something
            return new ConnectorTransactionHandle() {};
        }

        @Override
        public ConnectorMetadata getMetadata(ConnectorTransactionHandle transactionHandle)
        {
            throw new UnsupportedOperationException();
        }

        @Override
        public ConnectorSplitManager getSplitManager()
        {
            throw new UnsupportedOperationException();
        }
    });
}
项目:presto    文件:JmxConnectorFactory.java   
@Override
public Connector create(String connectorId, Map<String, String> properties)
{
    return new Connector()
    {
        @Override
        public ConnectorTransactionHandle beginTransaction(IsolationLevel isolationLevel, boolean readOnly)
        {
            checkConnectorSupports(READ_COMMITTED, isolationLevel);
            return JmxTransactionHandle.INSTANCE;
        }

        @Override
        public ConnectorMetadata getMetadata(ConnectorTransactionHandle transactionHandle)
        {
            return new JmxMetadata(connectorId, mbeanServer);
        }

        @Override
        public ConnectorSplitManager getSplitManager()
        {
            return new JmxSplitManager(connectorId, nodeManager);
        }

        @Override
        public ConnectorRecordSetProvider getRecordSetProvider()
        {
            return new JmxRecordSetProvider(mbeanServer, nodeManager.getCurrentNode().getNodeIdentifier());
        }
    };
}
项目:presto    文件:SplitManager.java   
public SplitSource getSplits(Session session, TableLayoutHandle layout)
{
    String connectorId = layout.getConnectorId();
    ConnectorSplitManager splitManager = getConnectorSplitManager(connectorId);

    // assumes connectorId and catalog are the same
    ConnectorSession connectorSession = session.toConnectorSession(connectorId);

    ConnectorSplitSource source = splitManager.getSplits(layout.getTransactionHandle(), connectorSession, layout.getConnectorHandle());

    return new ConnectorAwareSplitSource(connectorId, layout.getTransactionHandle(), source);
}
项目:presto    文件:TpchConnectorFactory.java   
@Override
public Connector create(String connectorId, Map<String, String> properties)
{
    int splitsPerNode = getSplitsPerNode(properties);

    return new Connector()
    {
        @Override
        public ConnectorTransactionHandle beginTransaction(IsolationLevel isolationLevel, boolean readOnly)
        {
            return TpchTransactionHandle.INSTANCE;
        }

        @Override
        public ConnectorMetadata getMetadata(ConnectorTransactionHandle transaction)
        {
            return new TpchMetadata(connectorId);
        }

        @Override
        public ConnectorSplitManager getSplitManager()
        {
            return new TpchSplitManager(connectorId, nodeManager, splitsPerNode);
        }

        @Override
        public ConnectorRecordSetProvider getRecordSetProvider()
        {
            return new TpchRecordSetProvider();
        }
    };
}
项目:presto    文件:SampledTpchConnectorFactory.java   
@Override
public Connector create(String connectorId, Map<String, String> properties)
{
    requireNonNull(properties, "properties is null");
    int splitsPerNode = getSplitsPerNode(properties);

    return new Connector()
    {
        @Override
        public ConnectorTransactionHandle beginTransaction(IsolationLevel isolationLevel, boolean readOnly)
        {
            return TpchTransactionHandle.INSTANCE;
        }

        @Override
        public ConnectorMetadata getMetadata(ConnectorTransactionHandle transaction)
        {
            return new SampledTpchMetadata(connectorId);
        }

        @Override
        public ConnectorSplitManager getSplitManager()
        {
            return new TpchSplitManager(connectorId, nodeManager, splitsPerNode);
        }

        @Override
        public ConnectorRecordSetProvider getRecordSetProvider()
        {
            return new SampledTpchRecordSetProvider(connectorId, sampleWeight);
        }
    };
}
项目:paraflow    文件:HDFSConnector.java   
@Override
public ConnectorSplitManager getSplitManager()
{
    return hdfsSplitManager;
}
项目:presto-rest    文件:RestConnector.java   
@Override
public ConnectorSplitManager getSplitManager()
{
    return new RestSplitManager(nodeManager);
}
项目:presto-ethereum    文件:EthereumConnector.java   
@Override
public ConnectorSplitManager getSplitManager() {
    return splitManager;
}
项目:presto-kudu    文件:KuduConnector.java   
@Override
public ConnectorSplitManager getSplitManager()
{
    return splitManager;
}
项目:presto    文件:KafkaConnector.java   
@Override
public ConnectorSplitManager getSplitManager()
{
    return splitManager;
}
项目:presto    文件:RaptorConnector.java   
@Override
public ConnectorSplitManager getSplitManager()
{
    return splitManager;
}
项目:presto    文件:BlackHoleConnector.java   
@Override
public ConnectorSplitManager getSplitManager()
{
    return splitManager;
}
项目:presto    文件:IndexedTpchConnectorFactory.java   
@Override
public Connector create(String connectorId, Map<String, String> properties)
{
    int splitsPerNode = getSplitsPerNode(properties);
    TpchIndexedData indexedData = new TpchIndexedData(connectorId, indexSpec);

    return new Connector()
    {
        @Override
        public ConnectorTransactionHandle beginTransaction(IsolationLevel isolationLevel, boolean readOnly)
        {
            return TpchTransactionHandle.INSTANCE;
        }

        @Override
        public ConnectorMetadata getMetadata(ConnectorTransactionHandle transactionHandle)
        {
            return new TpchIndexMetadata(connectorId, indexedData);
        }

        @Override
        public ConnectorSplitManager getSplitManager()
        {
            return new TpchSplitManager(connectorId, nodeManager, splitsPerNode);
        }

        @Override
        public ConnectorRecordSetProvider getRecordSetProvider()
        {
            return new TpchRecordSetProvider();
        }

        @Override
        public ConnectorIndexProvider getIndexProvider()
        {
            return new TpchIndexProvider(indexedData);
        }

        @Override
        public Set<SystemTable> getSystemTables()
        {
            return ImmutableSet.of(new ExampleSystemTable());
        }
    };
}
项目:presto    文件:LegacyTransactionConnector.java   
@Override
public ConnectorSplitManager getSplitManager()
{
    return new LegacyConnectorSplitManager(connector.getSplitManager());
}
项目:presto    文件:LegacyConnectorSplitManager.java   
public LegacyConnectorSplitManager(com.facebook.presto.spi.ConnectorSplitManager splitManager)
{
    this.splitManager = requireNonNull(splitManager, "splitManager is null");
}
项目:presto    文件:InformationSchemaConnector.java   
@Override
public ConnectorSplitManager getSplitManager()
{
    return splitManager;
}
项目:presto    文件:SystemConnector.java   
@Override
public ConnectorSplitManager getSplitManager()
{
    return splitManager;
}
项目:presto    文件:GlobalSystemConnector.java   
@Override
public ConnectorSplitManager getSplitManager()
{
    return new ConnectorSplitManager() {};
}
项目:presto    文件:SplitManager.java   
public void addConnectorSplitManager(String connectorId, ConnectorSplitManager connectorSplitManager)
{
    checkState(splitManagers.putIfAbsent(connectorId, connectorSplitManager) == null, "SplitManager for connector '%s' is already registered", connectorId);
}
项目:presto    文件:SplitManager.java   
private ConnectorSplitManager getConnectorSplitManager(String connectorId)
{
    ConnectorSplitManager result = splitManagers.get(connectorId);
    checkArgument(result != null, "No split manager for connector '%s'", connectorId);
    return result;
}
项目:presto    文件:CassandraConnector.java   
@Override
public ConnectorSplitManager getSplitManager()
{
    return splitManager;
}
项目:presto-plugins    文件:SpreadsheetConnector.java   
@Override
public ConnectorSplitManager getSplitManager() {
  return _splitManager;
}
项目:presto-kinesis    文件:KinesisConnector.java   
@Override
public ConnectorSplitManager getSplitManager()
{
    return splitManager;
}