com.facebook.presto.spi.connector.ConnectorMetadata Java Examples
The following examples show how to use
com.facebook.presto.spi.connector.ConnectorMetadata.
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: ElasticsearchConnector.java From presto-connectors with Apache License 2.0 | 5 votes |
/** * lock */ @Override public ConnectorMetadata getMetadata(ConnectorTransactionHandle transactionHandle) { ConnectorMetadata metadata = transactions.get(transactionHandle); checkArgument(metadata != null, "no such transaction: %s", transactionHandle); return metadata; }
Example #2
Source File: ParaflowConnector.java From paraflow with Apache License 2.0 | 5 votes |
/** * Guaranteed to be called at most once per transaction. The returned metadata will only be accessed * in a single threaded context. * * @param transactionHandle transaction handle */ @Override public ConnectorMetadata getMetadata(ConnectorTransactionHandle transactionHandle) { ParaflowMetadata metadata = transactions.get(transactionHandle); checkArgument(metadata != null, "no such transaction: %s", transactionHandle); return paraflowMetadataFactory.create(); }
Example #3
Source File: TestKinesisPlugin.java From presto-kinesis with Apache License 2.0 | 5 votes |
@Parameters({ "kinesis.awsAccessKey", "kinesis.awsSecretKey" }) @Test public void testSpinUp(String awsAccessKey, String awsSecretKey) { ConnectorFactory factory = testConnectorExists(); // Important: this has to be created before we setup the injector in the factory: assertNotNull(factory.getHandleResolver()); Connector c = factory.create("kinesis.test-connector", ImmutableMap.<String, String>builder() .put("kinesis.hide-internal-columns", "false") .put("kinesis.access-key", TestUtils.noneToBlank(awsAccessKey)) .put("kinesis.secret-key", TestUtils.noneToBlank(awsSecretKey)) .build(), new TestingConnectorContext() {}); assertNotNull(c); // Verify that the key objects have been created on the connector assertNotNull(c.getRecordSetProvider()); assertNotNull(c.getSplitManager()); ConnectorMetadata md = c.getMetadata(KinesisTransactionHandle.INSTANCE); assertNotNull(md); ConnectorTransactionHandle handle = c.beginTransaction(READ_COMMITTED, true); assertTrue(handle != null && handle instanceof KinesisTransactionHandle); }
Example #4
Source File: HbaseConnector.java From presto-connectors with Apache License 2.0 | 4 votes |
@Override public ConnectorMetadata getMetadata(ConnectorTransactionHandle transactionHandle) { return metadata; }
Example #5
Source File: EthereumConnector.java From presto-ethereum with Apache License 2.0 | 4 votes |
@Override public ConnectorMetadata getMetadata(ConnectorTransactionHandle transactionHandle) { return metadata; }
Example #6
Source File: KuduConnector.java From presto-kudu with Apache License 2.0 | 4 votes |
@Override public ConnectorMetadata getMetadata(ConnectorTransactionHandle transactionHandle) { return metadata; }
Example #7
Source File: BitcoinConnector.java From hadoopcryptoledger with Apache License 2.0 | 4 votes |
@Override public ConnectorMetadata getMetadata(ConnectorTransactionHandle transactionHandle) { // TODO Auto-generated method stub return null; }
Example #8
Source File: KinesisConnector.java From presto-kinesis with Apache License 2.0 | 4 votes |
@Override public ConnectorMetadata getMetadata(ConnectorTransactionHandle transactionHandle) { return metadata; }