Class HttpStoragePlugin

java.lang.Object
org.apache.drill.exec.store.AbstractStoragePlugin
org.apache.drill.exec.store.http.HttpStoragePlugin
All Implemented Interfaces:
AutoCloseable, SchemaFactory, StoragePlugin

public class HttpStoragePlugin extends AbstractStoragePlugin
  • Constructor Details

  • Method Details

    • registerSchemas

      public void registerSchemas(SchemaConfig schemaConfig, org.apache.calcite.schema.SchemaPlus parent)
      Description copied from interface: SchemaFactory
      Register the schemas provided by this SchemaFactory implementation under the given parent schema.
      Parameters:
      schemaConfig - Configuration for schema objects.
      parent - Reference to parent schema.
    • initializeOauthTokenTable

      public void initializeOauthTokenTable(String username)
    • getConfig

      public HttpStoragePluginConfig getConfig()
      Description copied from interface: StoragePlugin
      Method returns a Jackson serializable object that extends a StoragePluginConfig.
      Returns:
      an extension of StoragePluginConfig
    • getRegistry

      public StoragePluginRegistry getRegistry()
    • getTokenRegistry

      public TokenRegistry getTokenRegistry()
    • getTokenRegistry

      public TokenRegistry getTokenRegistry(String username)
      This method returns the TokenRegistry for a given user. It is only used for testing user translation with OAuth 2.0.
      Parameters:
      username - A String of the current active user.
      Returns:
      A TokenRegistry for the given user.
    • getTokenTable

      public PersistentTokenTable getTokenTable()
    • supportsRead

      public boolean supportsRead()
      Description copied from interface: StoragePlugin
      Indicates if Drill can read the table from this format.
      Specified by:
      supportsRead in interface StoragePlugin
      Overrides:
      supportsRead in class AbstractStoragePlugin
    • getPhysicalScan

      public AbstractGroupScan getPhysicalScan(String userName, JSONOptions selection, SessionOptionManager options) throws IOException
      Description copied from interface: StoragePlugin
      Get the physical scan operator for the particular GroupScan (read) node.
      Specified by:
      getPhysicalScan in interface StoragePlugin
      Overrides:
      getPhysicalScan in class AbstractStoragePlugin
      Parameters:
      userName - User whom to impersonate when reading the contents as part of Scan.
      selection - The configured storage engine specific selection.
      options - (optional) session options
      Returns:
      The physical scan operator for the particular GroupScan (read) node.
      Throws:
      IOException
    • getPhysicalScan

      public AbstractGroupScan getPhysicalScan(String userName, JSONOptions selection, SessionOptionManager options, MetadataProviderManager metadataProviderManager) throws IOException
      Description copied from interface: StoragePlugin
      Get the physical scan operator for the particular GroupScan (read) node.
      Specified by:
      getPhysicalScan in interface StoragePlugin
      Overrides:
      getPhysicalScan in class AbstractStoragePlugin
      Parameters:
      userName - User whom to impersonate when reading the contents as part of Scan.
      selection - The configured storage engine specific selection.
      options - (optional) session options
      metadataProviderManager - manager for handling metadata providers
      Returns:
      The physical scan operator for the particular GroupScan (read) node.
      Throws:
      IOException
    • getPhysicalScan

      public AbstractGroupScan getPhysicalScan(String userName, JSONOptions selection, List<SchemaPath> columns) throws IOException
      Description copied from interface: StoragePlugin
      Get the physical scan operator for the particular GroupScan (read) node.
      Specified by:
      getPhysicalScan in interface StoragePlugin
      Overrides:
      getPhysicalScan in class AbstractStoragePlugin
      Parameters:
      userName - User whom to impersonate when reading the contents as part of Scan.
      selection - The configured storage engine specific selection.
      columns - (optional) The list of column names to scan from the data source.
      Returns:
      The physical scan operator for the particular GroupScan (read) node.
      Throws:
      IOException
    • getPhysicalScan

      public AbstractGroupScan getPhysicalScan(String userName, JSONOptions selection) throws IOException
      Description copied from interface: StoragePlugin
      Get the physical scan operator for the particular GroupScan (read) node.
      Specified by:
      getPhysicalScan in interface StoragePlugin
      Overrides:
      getPhysicalScan in class AbstractStoragePlugin
      Parameters:
      userName - User whom to impersonate when when reading the contents as part of Scan.
      selection - The configured storage engine specific selection.
      Returns:
      The physical scan operator for the particular GroupScan (read) node.
      Throws:
      IOException
    • getPhysicalScan

      public AbstractGroupScan getPhysicalScan(String userName, JSONOptions selection, List<SchemaPath> columns, SessionOptionManager options, MetadataProviderManager metadataProviderManager) throws IOException
      Description copied from interface: StoragePlugin
      Get the physical scan operator for the particular GroupScan (read) node.
      Specified by:
      getPhysicalScan in interface StoragePlugin
      Overrides:
      getPhysicalScan in class AbstractStoragePlugin
      Parameters:
      userName - User whom to impersonate when reading the contents as part of Scan.
      selection - The configured storage engine specific selection.
      columns - (optional) The list of column names to scan from the data source.
      options - (optional) session options
      metadataProviderManager - manager for handling metadata providers
      Returns:
      The physical scan operator for the particular GroupScan (read) node.
      Throws:
      IOException
    • getOptimizerRules

      public Set<? extends org.apache.calcite.plan.RelOptRule> getOptimizerRules(OptimizerRulesContext optimizerContext, PlannerPhase phase)
      Description copied from interface: StoragePlugin
      An implementation of this method will return one or more specialized rules that Drill query optimizer can leverage in physical space. Otherwise, it should return an empty set.
      Returns:
      an empty set or a set of plugin specific physical optimizer rules.