congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Connector.getMetadata
Code IndexAdd Tabnine to your IDE (free)

How to use
getMetadata
method
in
io.prestosql.spi.connector.Connector

Best Java code snippets using io.prestosql.spi.connector.Connector.getMetadata (Showing top 5 results out of 315)

origin: io.prestosql/presto-main

public ConnectorTransactionMetadata(ConnectorId connectorId, Connector connector, ConnectorTransactionHandle transactionHandle)
{
  this.connectorId = requireNonNull(connectorId, "connectorId is null");
  this.connector = requireNonNull(connector, "connector is null");
  this.transactionHandle = requireNonNull(transactionHandle, "transactionHandle is null");
  this.connectorMetadata = connector.getMetadata(transactionHandle);
}
origin: prestosql/presto

public ConnectorTransactionMetadata(ConnectorId connectorId, Connector connector, ConnectorTransactionHandle transactionHandle)
{
  this.connectorId = requireNonNull(connectorId, "connectorId is null");
  this.connector = requireNonNull(connector, "connector is null");
  this.transactionHandle = requireNonNull(transactionHandle, "transactionHandle is null");
  this.connectorMetadata = connector.getMetadata(transactionHandle);
}
origin: prestosql/presto

private static void assertCreateConnector(String metastoreUri)
{
  HiveConnectorFactory connectorFactory = new HiveConnectorFactory(
      "hive-test",
      HiveConnector.class.getClassLoader(),
      Optional.empty());
  Map<String, String> config = ImmutableMap.<String, String>builder()
      .put("hive.metastore.uri", metastoreUri)
      .build();
  Connector connector = connectorFactory.create("hive-test", config, new TestingConnectorContext());
  ConnectorTransactionHandle transaction = connector.beginTransaction(READ_UNCOMMITTED, true);
  assertInstanceOf(connector.getMetadata(transaction), ClassLoaderSafeConnectorMetadata.class);
  assertInstanceOf(connector.getSplitManager(), ClassLoaderSafeConnectorSplitManager.class);
  assertInstanceOf(connector.getPageSourceProvider(), ConnectorPageSourceProvider.class);
  connector.commit(transaction);
}
origin: io.prestosql/presto-hive

private static void assertCreateConnector(String metastoreUri)
{
  HiveConnectorFactory connectorFactory = new HiveConnectorFactory(
      "hive-test",
      HiveConnector.class.getClassLoader(),
      Optional.empty());
  Map<String, String> config = ImmutableMap.<String, String>builder()
      .put("hive.metastore.uri", metastoreUri)
      .build();
  Connector connector = connectorFactory.create("hive-test", config, new TestingConnectorContext());
  ConnectorTransactionHandle transaction = connector.beginTransaction(READ_UNCOMMITTED, true);
  assertInstanceOf(connector.getMetadata(transaction), ClassLoaderSafeConnectorMetadata.class);
  assertInstanceOf(connector.getSplitManager(), ClassLoaderSafeConnectorSplitManager.class);
  assertInstanceOf(connector.getPageSourceProvider(), ConnectorPageSourceProvider.class);
  connector.commit(transaction);
}
origin: prestosql/presto

@BeforeClass
public void setup()
    throws Exception
{
  EmbeddedCassandra.start();
  String keyspace = "test_connector";
  createTestTables(EmbeddedCassandra.getSession(), keyspace, DATE);
  String connectorId = "cassandra-test";
  CassandraConnectorFactory connectorFactory = new CassandraConnectorFactory(connectorId);
  Connector connector = connectorFactory.create(connectorId, ImmutableMap.of(
      "cassandra.contact-points", EmbeddedCassandra.getHost(),
      "cassandra.native-protocol-port", Integer.toString(EmbeddedCassandra.getPort())),
      new TestingConnectorContext());
  metadata = connector.getMetadata(CassandraTransactionHandle.INSTANCE);
  assertInstanceOf(metadata, CassandraMetadata.class);
  splitManager = connector.getSplitManager();
  assertInstanceOf(splitManager, CassandraSplitManager.class);
  recordSetProvider = connector.getRecordSetProvider();
  assertInstanceOf(recordSetProvider, CassandraRecordSetProvider.class);
  database = keyspace;
  table = new SchemaTableName(database, TABLE_ALL_TYPES.toLowerCase(ENGLISH));
  tableUnpartitioned = new SchemaTableName(database, "presto_test_unpartitioned");
  invalidTable = new SchemaTableName(database, "totally_invalid_table_name");
}
io.prestosql.spi.connectorConnectorgetMetadata

Javadoc

Guaranteed to be called at most once per transaction. The returned metadata will only be accessed in a single threaded context.

Popular methods of Connector

  • getSplitManager
  • beginTransaction
  • commit
  • getAnalyzeProperties
  • getPageSourceProvider
  • getRecordSetProvider
  • getSystemTables
  • shutdown
  • getAccessControl
  • getColumnProperties
  • getIndexProvider
  • getNodePartitioningProvider
  • getIndexProvider,
  • getNodePartitioningProvider,
  • getPageSinkProvider,
  • getProcedures,
  • getSchemaProperties,
  • getSessionProperties,
  • getTableProperties,
  • isSingleStatementWritesOnly,
  • rollback

Popular in Java

  • Making http requests using okhttp
  • requestLocationUpdates (LocationManager)
  • getSystemService (Context)
  • getSupportFragmentManager (FragmentActivity)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • JButton (javax.swing)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now