Thanks a lot Kunal and Andries. It worked :) On 8 August 2017 at 02:26, Kunal Khatua <kkha...@mapr.com> wrote:
> +1 to Andries' comment. > > When you start Drill in Embedded mode, you are bringing up a single > standalone Drillbit without any Zookeeper that would otherwise allow > discovery of other Drillbits in the cluster. > > Starting in embedded mode is done via SQLLine because in a practical > usage, a single Drillbit doesn't accomplish much, beyond just trying out > things (Drill or data exploration). > Once you have that running, then if a JDBC client needs to connect to > that, you need to tell your JDBC client where to connect. In this case, > since there is no Zookeeper (that, typically, listens on port 2181) that > has knowledge about your Drillbit running in embedded-mode, we need to > explicitly tell it to connect to the Drillbit server. > > Hence, your JDBC URL needs to be > " jdbc:drill:drillbit=<IP-of-your-Drillbit-Server>" > > Hope that helps > > -----Original Message----- > From: Andries Engelbrecht [mailto:aengelbre...@mapr.com] > Sent: Monday, August 07, 2017 8:17 AM > To: user@drill.apache.org > Subject: Re: Drill JDBC connection on windows in embedded node > > Try jdbc:drill:drillbit=localhost > > Since embedded mode doesn’t use ZK you need to connect directly to the > drillbit itself. > > --Andries > > On 8/6/17, 7:37 PM, "Divya Gehlot" <divya.htco...@gmail.com> wrote: > > Hi, > I followed the this link > <https://drill.apache.org/docs/using-jdbc-with-squirrel-on-windows/> > to > connect to drill in JDBC mode . > > *Have installed drill 1.11 on windows 10 in embedded mode .* > > Configurations which I used : > > *JDBC Driver* : > apache-drill-1.11.0.tar\apache-drill-1.11.0\jars\jdbc- > driver\drill-jdbc-all-1.11.0.jar > > JDBC URL options which I tried : > > *Option1 :* jdbc:drill:zk=localhost:2181/drill/drillbits1 > *Option 2* : jdbc:drill:zk=localhost:2181 > *Option 3 *: jdbc:drill:zk=<hostname>:2181 > > I am getting below error with all the the options > > *ERROR* : > Unexpected Error occurred attempting to open an SQL connection. > class java.io.IOException: Failure to connect to the zookeeper cluster > service within the allotted time of 10000 milliseconds > > Appreciate the help . > > > Thanks , > Divya > > >