Class DrillEndpoint

  • All Implemented Interfaces:
    AutoCloseable, org.apache.camel.CamelContextAware, org.apache.camel.Endpoint, org.apache.camel.IsSingleton, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasId, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

    @UriEndpoint(firstVersion="2.19.0",
                 scheme="drill",
                 title="Drill",
                 syntax="drill:host",
                 producerOnly=true,
                 category={DATABASE,SQL})
    public class DrillEndpoint
    extends org.apache.camel.support.DefaultPollingEndpoint
    Perform queries against an Apache Drill cluster.
    • Field Summary

      • Fields inherited from class org.apache.camel.support.service.BaseService

        BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.camel.Consumer createConsumer​(org.apache.camel.Processor processor)  
      org.apache.camel.Producer createProducer()  
      String getClusterId()  
      String getDirectory()  
      String getHost()  
      DrillConnectionMode getMode()
      Connection mode: zk: Zookeeper drillbit: Drillbit direct connection https://drill.apache.org/docs/using-the-jdbc-driver/
      Integer getPort()  
      List<?> queryForList​(ResultSet rs)  
      void setClusterId​(String clusterId)
      Cluster ID https://drill.apache.org/docs/using-the-jdbc-driver/#determining-the-cluster-id
      void setDirectory​(String directory)
      Drill directory in ZooKeeper
      void setHost​(String host)
      ZooKeeper host name or IP address.
      void setMode​(DrillConnectionMode mode)  
      void setPort​(Integer port)
      ZooKeeper port number
      String toJDBCUri()  
      • Methods inherited from class org.apache.camel.support.ScheduledPollEndpoint

        configureConsumer, configureProperties, configureScheduledPollConsumerProperties, doConfigureConsumer, doStart, doStop, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDefaultDelay, getDelay, getInitialDelay, getPollStrategy, getRepeatCount, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, isGreedy, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRepeatCount, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay
      • Methods inherited from class org.apache.camel.support.DefaultEndpoint

        configurePollingConsumer, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isSingleton, isSynchronous, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
      • Methods inherited from class org.apache.camel.support.service.BaseService

        build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
      • Methods inherited from interface org.apache.camel.Endpoint

        getEndpointBaseUri, isSingletonProducer
      • Methods inherited from interface org.apache.camel.Service

        build, close, init, start, stop
      • Methods inherited from interface org.apache.camel.ShutdownableService

        shutdown
      • Methods inherited from interface org.apache.camel.StatefulService

        getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
      • Methods inherited from interface org.apache.camel.SuspendableService

        isSuspended, resume, suspend
    • Constructor Detail

      • DrillEndpoint

        public DrillEndpoint​(String uri,
                             DrillComponent component)
        creates a drill endpoint
        Parameters:
        uri - the endpoint uri
        component - the component
    • Method Detail

      • createConsumer

        public org.apache.camel.Consumer createConsumer​(org.apache.camel.Processor processor)
                                                 throws Exception
        Specified by:
        createConsumer in interface org.apache.camel.Endpoint
        Overrides:
        createConsumer in class org.apache.camel.support.DefaultPollingEndpoint
        Throws:
        Exception
      • createProducer

        public org.apache.camel.Producer createProducer()
                                                 throws Exception
        Throws:
        Exception
      • toJDBCUri

        public String toJDBCUri()
      • getHost

        public String getHost()
      • setHost

        public void setHost​(String host)
        ZooKeeper host name or IP address. Use local instead of a host name or IP address to connect to the local Drillbit
        Parameters:
        host -
      • getPort

        public Integer getPort()
      • setPort

        public void setPort​(Integer port)
        ZooKeeper port number
        Parameters:
        port -
      • getDirectory

        public String getDirectory()
      • setDirectory

        public void setDirectory​(String directory)
        Drill directory in ZooKeeper
        Parameters:
        directory -
      • getClusterId

        public String getClusterId()
      • setClusterId

        public void setClusterId​(String clusterId)
        Cluster ID https://drill.apache.org/docs/using-the-jdbc-driver/#determining-the-cluster-id
        Parameters:
        clusterId -
      • getMode

        public DrillConnectionMode getMode()
        Connection mode: zk: Zookeeper drillbit: Drillbit direct connection https://drill.apache.org/docs/using-the-jdbc-driver/
        Returns: