You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by Sudip Mukherjee <sm...@commvault.com> on 2015/09/03 09:20:20 UTC

Apache drill jdbc driver - can i connect to a drillbit?

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."
**********************************************************************

RE: Apache drill jdbc driver - can i connect to a drillbit?

Posted by Sudip Mukherjee <sm...@commvault.com>.
Thank you. I Could connect to drillbit node.

Thanks,
Sudip

-----Original Message-----
From: Tomer Shiran [mailto:tshiran@dremio.com] 
Sent: 03 September 2015 PM 09:48
To: dev@drill.apache.org
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 <rs...@maprtech.com> 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 
> > <sm...@commvault.com>
> 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."
**********************************************************************

Re: Apache drill jdbc driver - can i connect to a drillbit?

Posted by Tomer Shiran <ts...@dremio.com>.
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 <rs...@maprtech.com> 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 <sm...@commvault.com>
> 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

Re: Apache drill jdbc driver - can i connect to a drillbit?

Posted by Rajkumar Singh <rs...@maprtech.com>.
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 <sm...@commvault.com> 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."
> **********************************************************************