@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()); } }; }
@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(); } }; }
@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); } }; }
@Override public ConnectorRecordSetProvider getRecordSetProvider() { return new RestRecordSetProvider(rest); }
@Override public ConnectorRecordSetProvider getRecordSetProvider() { return recordSetProvider; }
@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()); } }; }
@Override public ConnectorRecordSetProvider getRecordSetProvider() { return new LegacyConnectorRecordSetProvider(connector.getRecordSetProvider()); }
public LegacyConnectorRecordSetProvider(com.facebook.presto.spi.ConnectorRecordSetProvider delegate) { this.delegate = requireNonNull(delegate, "delegate is null"); }
public RecordPageSourceProvider(ConnectorRecordSetProvider recordSetProvider) { this.recordSetProvider = requireNonNull(recordSetProvider, "recordSetProvider is null"); }
@Override public ConnectorRecordSetProvider getRecordSetProvider() { return _recordSetProvider; }