Thank you. I Could connect to drillbit node. Thanks, Sudip
-----Original Message----- From: Tomer Shiran [mailto:[email protected]] Sent: 03 September 2015 PM 09:48 To: [email protected] Subject: Re: Apache drill jdbc driver - can i connect to a drillbit? If you want to connect to a random drillbit in the cluster you would use ZooKeeper in the connection URL: jdbc:drill:zk=<zk quorum>/drill/<cluster id> If you want to connect to a specific drillbit you could specify that directly by replacing "zk=<zk quorum>" with "drillbit=<node>" On Thu, Sep 3, 2015 at 12:28 AM, Rajkumar Singh <[email protected]> wrote: > This is a sample code snippet to connect to drill using Drill-Jdbc-all > Driver. > > Class.forName("org.apache.drill.jdbc.Driver"); > Connection connection =DriverManager.getConnection("jdbc:drill:zk= > node3.mynode.com:5181/drill/my_cluster_com-drillbits"); > Statement st = connection.createStatement(); ResultSet rs = > st.executeQuery("SELECT * from cp.`employee`"); while(rs.next()){ > System.out.println(rs.getString(1)); > } > > > Rajkumar Singh > MapR Technologies > > > > On Sep 3, 2015, at 12:50 PM, Sudip Mukherjee > > <[email protected]> > wrote: > > > > Hi Devs, > > > > Is there way to connect a drillbit using the jdbc driver. Could you > please point me to an example if there is one? > > > > Thanks, > > Sudip > > > > > > > > ***************************Legal > > Disclaimer*************************** > > "This communication may contain confidential and privileged material > > for > the > > sole use of the intended recipient. Any unauthorized review, use or > distribution > > by others is strictly prohibited. If you have received the message > > by > mistake, > > please advise the sender by reply email and delete the message. > > Thank > you." > > ******************************************************************** > > ** > > -- Tomer Shiran CEO and Co-Founder, Dremio ***************************Legal Disclaimer*************************** "This communication may contain confidential and privileged material for the sole use of the intended recipient. Any unauthorized review, use or distribution by others is strictly prohibited. If you have received the message by mistake, please advise the sender by reply email and delete the message. Thank you." **********************************************************************
