drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Hou <r...@mapr.com>
Subject Re: Drill connection using jdbc
Date Wed, 09 Jan 2019 09:08:01 GMT
When you run "ls /" in zookeeper, you should see something like this:

   [zookeeper, resourcemanager_locks, services, drill, servers, nodes]

I believe this is where your zk.root is defined.  So in my case, it is
"drill" which is the default.

Thanks.

--Robert

On Wed, Jan 9, 2019 at 1:03 AM Robert Hou <rhou@mapr.com> wrote:

> Can you try "drill" as your zk.root?
>
> What do you see when you log into zookeeper and run "ls /"?
>
> Thanks.
>
> --Robert
>
> On Wed, Jan 9, 2019 at 12:45 AM Tushar Pathare <tpathare@sidra.org> wrote:
>
>> Hello Robert,
>>                        Thanks for the info.
>>                        Drillbit connection worked but zk connection not
>> working.
>>                        Zk.root for me is /opt/drill and clusterid is
>> sidra-drillbit.
>>
>> My drill-override.conf looks as follows.
>>
>> drill.exec: {
>>   cluster-id: "sidra-drillbit",
>>   zk.connect: "hpcsrcn01:2181,hpcsrcn02:2181,hpcsrcn04:2181"
>> }
>>
>>
>>
>> Tushar Bhalchandra Pathare
>> Bigdata,GPFS,CSXF – Research Department
>> t. +974 4003 7443
>> m. +974 74793547
>> PO BOX 26999 Doha, Qatar
>> sidra.org <
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.sidra.org_&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=GXRJhB4g1YFDJsrcglHwUA&m=GzXrG3NEgyu3DwC61SjSD5gw0TYMT4GGi_jOLjSGttY&s=3IKZg-nDhsGJG70FdwBMabw_o0GCo_vADXVODbny7T8&e=
>> >
>>
>>
>> On 1/9/19, 11:34 AM, "Robert Hou" <rhou@mapr.com> wrote:
>>
>>     I would suggest connecting with drillbit first, and if that works, I
>> would
>>     use zookeeper.
>>
>>        sqlline -u "jdbc:drill:drillbit=<IP address>"
>>
>>     Please note the quotation marks.
>>
>>     If that works, then try:
>>
>>        sqlline -u "jdbc:drill:zk=<IPaddress>:port/<zk.root for
>>     drill>/<clusterID>"
>>
>>     zk.root is "drill" by default.  If you have specified zk.root in
>>     drill-override.conf, then use that.
>>
>>     Thanks.
>>
>>     --Robert
>>
>>
>>     On Wed, Jan 9, 2019 at 12:13 AM Tushar Pathare <tpathare@sidra.org>
>> wrote:
>>
>>     > Hello Team,
>>     > Same issue.
>>     >
>>     >
>>     > ERROR: An error occurred while trying to make a connection to
>>     > the database:
>>     >
>>     > JDBC URL:
>>     > jdbc:drill:zk=172.32.63.64:2181/opt/apache-drill/sidra-drillbit
>>     >
>>     > Failure in creating DrillConnectionImpl:
>>     > java.lang.IllegalStateException: No active Drillbit endpoint
>>     > found from ZooKeeper. Check connection parameters?
>>     >
>>     >
>>     > Tushar Bhalchandra Pathare
>>     > Bigdata,GPFS,CSXF – Research Department
>>     > t. +974 4003 7443
>>     > m. +974 74793547
>>     > PO BOX 26999 Doha, Qatar
>>     > sidra.org <
>>     >
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.sidra.org_&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=GXRJhB4g1YFDJsrcglHwUA&m=BJqk_hazvoApEDyas3DwYGI3NAEtSjzIEex2DF5uhHk&s=9M5Aak1SIn-KuFJWfpDiUyALzAKZWCwQUnD_m-SQvtA&e=
>>     > >
>>     >
>>     >
>>     > On 1/9/19, 11:02 AM, "Arjun kr" <arjun.kr@outlook.com> wrote:
>>     >
>>     >     Yes. I believe its a necessary parameter if non default cluster
>> I'd is
>>     > used and given in the connection url. You can check if it works with
>>     > directory specified.
>>     >
>>     >     Get Outlook for Android<
>>     >
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__aka.ms_ghei36&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=GXRJhB4g1YFDJsrcglHwUA&m=BJqk_hazvoApEDyas3DwYGI3NAEtSjzIEex2DF5uhHk&s=Pq7kuN1t4H6e-BdtFBP7VVnFqhNMVVXBHX8qIQMq9B0&e=
>>     > >
>>     >
>>     >     ________________________________
>>     >     From: Tushar Pathare <tpathare@sidra.org>
>>     >     Sent: Tuesday, January 8, 2019 11:40:22 PM
>>     >     To: user@drill.apache.org
>>     >     Subject: Re: Drill connection using jdbc
>>     >
>>     >     Is it necessary because I thought it is optional including the
>> cluster
>>     > ID
>>     >
>>     >
>>     >     Tushar Bhalchandra Pathare
>>     >     Bigdata,GPFS,CSXF – Research Department
>>     >     t. +974 4003 7443
>>     >     m. +974 74793547
>>     >     PO BOX 26999 Doha, Qatar
>>     >     sidra.org <
>>     >
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.sidra.org_&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=GXRJhB4g1YFDJsrcglHwUA&m=BJqk_hazvoApEDyas3DwYGI3NAEtSjzIEex2DF5uhHk&s=9M5Aak1SIn-KuFJWfpDiUyALzAKZWCwQUnD_m-SQvtA&e=
>>     > >
>>     >
>>     >
>>     >     On 1/9/19, 10:39 AM, "Arjun kr" <arjun.kr@outlook.com> wrote:
>>     >
>>     >         Are you missing drill zk directory in connection url?
>>     >         By default, it's value is drill.
>>     >
>>     >         jdbc:drill:zk=<zk name>[:<port>][,<zk name2>[:<port>]...
>>     >         <directory>/<cluster ID>;[schema=<storage plugin>]
>>     >
>>     >
>>     >
>>     >
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__drill.apache.org_docs_using-2Dthe-2D&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=GXRJhB4g1YFDJsrcglHwUA&m=BJqk_hazvoApEDyas3DwYGI3NAEtSjzIEex2DF5uhHk&s=OkoCdG1xe3BPsJ45-qJ9Z7ewXUUgGpz3w54SuZXNr9U&e=
>>     > <
>>     >
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__drill.apache.org_docs_using-2Dthe-2Djdbc-2Ddriver_&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=GXRJhB4g1YFDJsrcglHwUA&m=BJqk_hazvoApEDyas3DwYGI3NAEtSjzIEex2DF5uhHk&s=YuYqrYaD7-X633jjZFcolbBVC82m74rKASSB0u87LTo&e=
>>     > >jdbc<
>>     >
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__drill.apache.org_docs_using-2Dthe-2Djdbc-2Ddriver_&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=GXRJhB4g1YFDJsrcglHwUA&m=BJqk_hazvoApEDyas3DwYGI3NAEtSjzIEex2DF5uhHk&s=YuYqrYaD7-X633jjZFcolbBVC82m74rKASSB0u87LTo&e=
>>     > >-driver/<
>>     >
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__drill.apache.org_docs_using-2Dthe-2Djdbc-2Ddriver_&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=GXRJhB4g1YFDJsrcglHwUA&m=BJqk_hazvoApEDyas3DwYGI3NAEtSjzIEex2DF5uhHk&s=YuYqrYaD7-X633jjZFcolbBVC82m74rKASSB0u87LTo&e=
>>     > >
>>     >
>>     >         Thanks,
>>     >
>>     >         Arjun
>>     >
>>     >         Get Outlook for Android<
>>     >
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__aka.ms_ghei36&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=GXRJhB4g1YFDJsrcglHwUA&m=BJqk_hazvoApEDyas3DwYGI3NAEtSjzIEex2DF5uhHk&s=Pq7kuN1t4H6e-BdtFBP7VVnFqhNMVVXBHX8qIQMq9B0&e=
>>     > >
>>     >
>>     >         ________________________________
>>     >         From: Khurram Faraaz <kfaraaz@mapr.com>
>>     >         Sent: Tuesday, January 8, 2019 11:17:58 PM
>>     >         To: user@drill.apache.org
>>     >         Subject: Re: Drill connection using jdbc
>>     >
>>     >         Hi Tushar,
>>     >
>>     >         This example works just fine for me, you may want to use the
>>     > template
>>     >
>>     >         import org.apache.log4j.Logger;
>>     >
>>     >         import java.sql.Connection;
>>     >         import java.sql.ResultSet;
>>     >         import java.sql.SQLException;
>>     >         import java.sql.Statement;
>>     >         import java.sql.Types;
>>     >         import java.sql.*;
>>     >         import java.io.*;
>>     >         import java.lang.*;
>>     >         import java.util.*;
>>     >         import java.util.Scanner;
>>     >
>>     >         public class TestQuery {
>>     >
>>     >         public static void main(String s[]) throws Exception {
>>     >
>>     >             Connection conn = null;
>>     >             PreparedStatement prdstmnt = null;
>>     >             try {
>>     >                     // Please replace test1302-145 with your
>> hostname,
>>     > name of host
>>     >         where Drillbit is up and running
>>     >                     final String URL_STRING =
>>     >         "jdbc:drill:schema=dfs.tmp;drillbit=test1302-145";
>>     >
>>     > Class.forName("org.apache.drill.jdbc.Driver").newInstance();
>>     >
>>     >                     // Please replace username and password with
>> your
>>     > username and
>>     >         password
>>     >                     conn =
>>     > DriverManager.getConnection(URL_STRING,"mapr","mapr");
>>     >                     prdstmnt = conn.prepareStatement("SELECT * FROM
>>     >         cp.`employee.json`");
>>     >                     prdstmnt.executeQuery();
>>     >                     prdstmnt.close();
>>     >             } catch (Exception e) {
>>     >                System.out.println(e.getMessage());
>>     >                e.printStackTrace();
>>     >             } finally {
>>     >                 if(conn != null)
>>     >                     try { conn.close(); } catch(SQLException
>> sqlexcpn){
>>     >         sqlexcpn.printStackTrace(); }
>>     >                 if(prdstmnt != null)
>>     >                     try { prdstmnt.close(); } catch(SQLException
>> sqlexcpn){
>>     >         sqlexcpn.printStackTrace(); }
>>     >                 }
>>     >             }
>>     >         }
>>     >
>>     >         Regards,
>>     >         Khurram
>>     >
>>     >         On Tue, Jan 8, 2019 at 11:10 PM Tushar Pathare <
>> tpathare@sidra.org>
>>     > wrote:
>>     >
>>     >         > Hello Team,
>>     >         >
>>     >         >                     We have installed drill 1.12.0 and
>> trying to
>>     > connect
>>     >         > using a client to the drill cluster
>>     >         >
>>     >         > Our config for connection is
>>     >         >
>>     >         >
>>     >         >
>>     >         > Drill class is : org.apache.drill.jdbc.Driver
>>     >         >
>>     >         > Driver location is
>>     >         >
>>     >
>> /Users/tpathare/Downloads/apache-drill-1.12.0/jars/jdbc-driver/drill-jdbc-all-1.12.0.jar
>>     >         >
>>     >         > Jdbc url is : jdbc:drill:zk=172.32.63.64:2181,
>> 172.32.63.65:2181,
>>     >         > 172.32.63.67:2181
>>     >         >
>>     >         >
>>     >         >
>>     >         > When I hit connect I see the following error.Though the
>> cluster
>>     > is up and
>>     >         > running and ZK is also good.
>>     >         >
>>     >         >
>>     >         >
>>     >         > *ERROR: An error occurred while trying to make a
>> connection to *
>>     >         >
>>     >         > *the database:  *
>>     >         >
>>     >         >
>>     >         >
>>     >         > *JDBC URL: *
>>     >         >
>>     >         > *jdbc:drill:zk=172.32.63.64:2181
>>     >         > <
>>     >
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__172.32.63.64-3A2181&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=GXRJhB4g1YFDJsrcglHwUA&m=BJqk_hazvoApEDyas3DwYGI3NAEtSjzIEex2DF5uhHk&s=-X33aklNalfpJDS18b6-wH5bkmY2QWJ4iba8p6pmxn4&e=
>>     > >,172.32.63.65:2181
>>     >         > <
>>     >
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__172.32.63.65-3A2181&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=GXRJhB4g1YFDJsrcglHwUA&m=BJqk_hazvoApEDyas3DwYGI3NAEtSjzIEex2DF5uhHk&s=fHrzLbqH4CpgspWDHoMyOMneXh2YP2HD7frqI4ITiUM&e=
>>     > >,172.32.63.67:2181/sidra-drillbit
>>     >         > <
>>     >
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__172.32.63.67-3A2181_sidra-2Ddrillbit&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=GXRJhB4g1YFDJsrcglHwUA&m=BJqk_hazvoApEDyas3DwYGI3NAEtSjzIEex2DF5uhHk&s=o9EFkEIaCa6F7My4l3JXFfeeZtFJFqytiFAxLxybbg4&e=
>> >
>>     > *
>>     >         >
>>     >         >
>>     >         >
>>     >         > *Failure in connecting to Drill: *
>>     >         >
>>     >         > *oadd.org.apache.drill.exec.rpc.RpcException: Failure
>> setting up
>>     > *
>>     >         >
>>     >         > *ZK for client.*
>>     >         >
>>     >         >
>>     >         >
>>     >         >
>>     >         >
>>     >         >
>>     >         >
>>     >         > [image: cid:image001.png@01D3B9E9.23323D90]
>>     >         >
>>     >         > *Tushar Bhalchandra Pathare*
>>     >         >
>>     >         > Bigdata,GPFS,CSXF – Research Department
>>     >         >
>>     >         > *t. *+974 4003 7443
>>     >         >
>>     >         > *m.* +974 74793547
>>     >         >
>>     >         > PO BOX 26999 Doha, Qatar
>>     >         >
>>     >         > sidra.org
>>     >         > <
>>     >
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.sidra.org_&d=DwMGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=H5JEl9vb-mBIjic10QAbDD2vkUUKAxjO6wZO322RtdI&m=xCohfm7_vub0ExT6cMTEbB4WbjdIEPLdaXqXAOANq4A&s=kqudpk5v3cRasIbaMG8kwLBXafZ87VEhutJj7vxwhS4&e=
>>     > >
>>     >         >
>>     >         >
>>     >         > Disclaimer: This email and its attachments may be
>> confidential
>>     > and are
>>     >         > intended solely for the use of the individual to whom it
>> is
>>     > addressed. If
>>     >         > you are not the intended recipient, any reading, printing,
>>     > storage,
>>     >         > disclosure, copying or any other action taken in respect
>> of this
>>     > e-mail is
>>     >         > prohibited and may be unlawful. If you are not the
>> intended
>>     > recipient,
>>     >         > please notify the sender immediately by using the reply
>> function
>>     > and then
>>     >         > permanently delete what you have received. Any views or
>> opinions
>>     > expressed
>>     >         > are solely those of the author and do not necessarily
>> represent
>>     > those of
>>     >         > Sidra Medical and Research Center.
>>     >         >
>>     >
>>     >
>>     >     Disclaimer: This email and its attachments may be confidential
>> and are
>>     > intended solely for the use of the individual to whom it is
>> addressed. If
>>     > you are not the intended recipient, any reading, printing, storage,
>>     > disclosure, copying or any other action taken in respect of this
>> e-mail is
>>     > prohibited and may be unlawful. If you are not the intended
>> recipient,
>>     > please notify the sender immediately by using the reply function
>> and then
>>     > permanently delete what you have received. Any views or opinions
>> expressed
>>     > are solely those of the author and do not necessarily represent
>> those of
>>     > Sidra Medical and Research Center.
>>     >
>>     >
>>     > Disclaimer: This email and its attachments may be confidential and
>> are
>>     > intended solely for the use of the individual to whom it is
>> addressed. If
>>     > you are not the intended recipient, any reading, printing, storage,
>>     > disclosure, copying or any other action taken in respect of this
>> e-mail is
>>     > prohibited and may be unlawful. If you are not the intended
>> recipient,
>>     > please notify the sender immediately by using the reply function
>> and then
>>     > permanently delete what you have received. Any views or opinions
>> expressed
>>     > are solely those of the author and do not necessarily represent
>> those of
>>     > Sidra Medical and Research Center.
>>     >
>>
>>
>> Disclaimer: This email and its attachments may be confidential and are
>> intended solely for the use of the individual to whom it is addressed. If
>> you are not the intended recipient, any reading, printing, storage,
>> disclosure, copying or any other action taken in respect of this e-mail is
>> prohibited and may be unlawful. If you are not the intended recipient,
>> please notify the sender immediately by using the reply function and then
>> permanently delete what you have received. Any views or opinions expressed
>> are solely those of the author and do not necessarily represent those of
>> Sidra Medical and Research Center.
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message