From user-return-10034-apmail-drill-user-archive=drill.apache.org@drill.apache.org Wed Jan 9 08:33:43 2019 Return-Path: X-Original-To: apmail-drill-user-archive@www.apache.org Delivered-To: apmail-drill-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F199E18F6F for ; Wed, 9 Jan 2019 08:33:42 +0000 (UTC) Received: (qmail 88315 invoked by uid 500); 9 Jan 2019 08:33:42 -0000 Delivered-To: apmail-drill-user-archive@drill.apache.org Received: (qmail 88219 invoked by uid 500); 9 Jan 2019 08:33:42 -0000 Mailing-List: contact user-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@drill.apache.org Delivered-To: mailing list user@drill.apache.org Received: (qmail 88199 invoked by uid 99); 9 Jan 2019 08:33:41 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jan 2019 08:33:41 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id EF264C1F3D for ; Wed, 9 Jan 2019 08:33:40 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.859 X-Spam-Level: *** X-Spam-Status: No, score=3.859 tagged_above=-999 required=6.31 tests=[DKIMWL_WL_MED=-0.142, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, KAM_BADIPHTTP=2, NORMAL_HTTP_TO_IP=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, WEIRD_PORT=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=mapr-com.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id wljNYZ9AV3HH for ; Wed, 9 Jan 2019 08:33:37 +0000 (UTC) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 2F6766106A for ; Wed, 9 Jan 2019 08:33:37 +0000 (UTC) Received: by mail-lf1-f50.google.com with SMTP id l10so4970437lfh.9 for ; Wed, 09 Jan 2019 00:33:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mapr-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=qHdZuCSXLy6OQR2C3/1wjsMzshQx9XLYFHzIqDgoZRI=; b=mF3fLaIUVPEirtV8JxddadzESZMh6U8G9dWE1BeQsXhoCoF4BOjET6384zqfE0vZH+ 5FpJnWdA3OtC0VKFvVqTNFXObL44NIURI25ED6mKK/Dz9G9poa48BHSt6A2k2EDE+xWT tSm+Pz7UxcIkI3QrdiMQi+nImJ5A69KlTXCcLKb7vcBer7n7TC6UwYmY9daKmhn+nw0B 8EV/P4vO9klRQE+bgX5b+CX6ArWby/38iLWXuaxGp+OBbq/JDgRN7/Aln7FTTCpPhd9e EbR0tvQ25Bqf6o5K/Qn8dyQeJmPpY55iyH7izwq9YWNcgHVJrB0JMIxbFIs7oUMSBzDS itNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=qHdZuCSXLy6OQR2C3/1wjsMzshQx9XLYFHzIqDgoZRI=; b=kKojPhONSFSCNMpqyfAafAD5XN+3ftaodWyzeM5kq00oER+9daQrDhstebUj0lioTj QMi4DmC50SPRnn6pVCW1WaeZHE5TTXGvf3YO2qpEQm89zhjp1lzL4TVJNWSeUBNLyj18 xcz95DSbe7bkOGHYJ5zvg8c5Q+2tVyj1S/nLiFkPXmYcHhZcR9D48MZ1YO2p0++TUCkV w+Hp8WdYknG8o7VC6HE6LQtaptsUSaTGNytM8zuJxzbqYnEGpT+x3e0wdXNadhk5Apl8 6vORkUYZ+WYVSGfwcsl0D7pr1GEdjTflCTBHfkAKy9SAKQAzZHFZrYc5OGWafSED7KKP RyeA== X-Gm-Message-State: AJcUukdqCuN/a9wamwxnKcSYmOwe8Rq0ORkoMX77R9dYb+TqywFZKwON XhEgT0ggUtJDDLA9F9z4RpDt5S1gsI8qWrr/QkVjC1upcQ8= X-Google-Smtp-Source: ALg8bN5+h5oaGrjNfujYINMrOFxeg0/i7lk80BFGyxkRY1hxMvkXW0gIQt/xzBF5XVrJSCw9yMYuDYCQGUoxX6bDHuQ= X-Received: by 2002:a19:1019:: with SMTP id f25mr2821877lfi.54.1547022816174; Wed, 09 Jan 2019 00:33:36 -0800 (PST) MIME-Version: 1.0 References: <86A7D7CA-A4FA-4F59-AC0B-C76440B2CE3C@sidra.org> In-Reply-To: <86A7D7CA-A4FA-4F59-AC0B-C76440B2CE3C@sidra.org> From: Robert Hou Date: Wed, 9 Jan 2019 00:33:25 -0800 Message-ID: Subject: Re: Drill connection using jdbc To: "user@drill.apache.org" Content-Type: multipart/alternative; boundary="0000000000006b0316057f0251f1" --0000000000006b0316057f0251f1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I would suggest connecting with drillbit first, and if that works, I would use zookeeper. sqlline -u "jdbc:drill:drillbit=3D" Please note the quotation marks. If that works, then try: sqlline -u "jdbc:drill:zk=3D:port//" 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 wrote: > Hello Team, > Same issue. > > > ERROR: An error occurred while trying to make a connection to > the database: > > JDBC URL: > jdbc:drill:zk=3D172.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 =E2=80=93 Research Department > t. +974 4003 7443 > m. +974 74793547 > PO BOX 26999 Doha, Qatar > sidra.org < > https://urldefense.proofpoint.com/v2/url?u=3Dhttp-3A__www.sidra.org_&d=3D= DwIGaQ&c=3DcskdkSMqhcnjZxdQVpwTXg&r=3DGXRJhB4g1YFDJsrcglHwUA&m=3DBJqk_hazvo= ApEDyas3DwYGI3NAEtSjzIEex2DF5uhHk&s=3D9M5Aak1SIn-KuFJWfpDiUyALzAKZWCwQUnD_m= -SQvtA&e=3D > > > > > =EF=BB=BFOn 1/9/19, 11:02 AM, "Arjun kr" wrote: > > Yes. I believe its a necessary parameter if non default cluster I'd i= s > 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=3Dhttps-3A__aka.ms_ghei36&d=3D= DwIGaQ&c=3DcskdkSMqhcnjZxdQVpwTXg&r=3DGXRJhB4g1YFDJsrcglHwUA&m=3DBJqk_hazvo= ApEDyas3DwYGI3NAEtSjzIEex2DF5uhHk&s=3DPq7kuN1t4H6e-BdtFBP7VVnFqhNMVVXBHX8qI= QMq9B0&e=3D > > > > ________________________________ > From: Tushar Pathare > 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 cluste= r > ID > > > Tushar Bhalchandra Pathare > Bigdata,GPFS,CSXF =E2=80=93 Research Department > t. +974 4003 7443 > m. +974 74793547 > PO BOX 26999 Doha, Qatar > sidra.org < > https://urldefense.proofpoint.com/v2/url?u=3Dhttp-3A__www.sidra.org_&d=3D= DwIGaQ&c=3DcskdkSMqhcnjZxdQVpwTXg&r=3DGXRJhB4g1YFDJsrcglHwUA&m=3DBJqk_hazvo= ApEDyas3DwYGI3NAEtSjzIEex2DF5uhHk&s=3D9M5Aak1SIn-KuFJWfpDiUyALzAKZWCwQUnD_m= -SQvtA&e=3D > > > > > On 1/9/19, 10:39 AM, "Arjun kr" wrote: > > Are you missing drill zk directory in connection url? > By default, it's value is drill. > > jdbc:drill:zk=3D[:][,[:]... > /;[schema=3D] > > > > https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__drill.apache.org_d= ocs_using-2Dthe-2D&d=3DDwIGaQ&c=3DcskdkSMqhcnjZxdQVpwTXg&r=3DGXRJhB4g1YFDJs= rcglHwUA&m=3DBJqk_hazvoApEDyas3DwYGI3NAEtSjzIEex2DF5uhHk&s=3DOkoCdG1xe3BPsJ= 45-qJ9Z7ewXUUgGpz3w54SuZXNr9U&e=3D > < > https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__drill.apache.org_d= ocs_using-2Dthe-2Djdbc-2Ddriver_&d=3DDwIGaQ&c=3DcskdkSMqhcnjZxdQVpwTXg&r=3D= GXRJhB4g1YFDJsrcglHwUA&m=3DBJqk_hazvoApEDyas3DwYGI3NAEtSjzIEex2DF5uhHk&s=3D= YuYqrYaD7-X633jjZFcolbBVC82m74rKASSB0u87LTo&e=3D > >jdbc< > https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__drill.apache.org_d= ocs_using-2Dthe-2Djdbc-2Ddriver_&d=3DDwIGaQ&c=3DcskdkSMqhcnjZxdQVpwTXg&r=3D= GXRJhB4g1YFDJsrcglHwUA&m=3DBJqk_hazvoApEDyas3DwYGI3NAEtSjzIEex2DF5uhHk&s=3D= YuYqrYaD7-X633jjZFcolbBVC82m74rKASSB0u87LTo&e=3D > >-driver/< > https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__drill.apache.org_d= ocs_using-2Dthe-2Djdbc-2Ddriver_&d=3DDwIGaQ&c=3DcskdkSMqhcnjZxdQVpwTXg&r=3D= GXRJhB4g1YFDJsrcglHwUA&m=3DBJqk_hazvoApEDyas3DwYGI3NAEtSjzIEex2DF5uhHk&s=3D= YuYqrYaD7-X633jjZFcolbBVC82m74rKASSB0u87LTo&e=3D > > > > Thanks, > > Arjun > > Get Outlook for Android< > https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__aka.ms_ghei36&d=3D= DwIGaQ&c=3DcskdkSMqhcnjZxdQVpwTXg&r=3DGXRJhB4g1YFDJsrcglHwUA&m=3DBJqk_hazvo= ApEDyas3DwYGI3NAEtSjzIEex2DF5uhHk&s=3DPq7kuN1t4H6e-BdtFBP7VVnFqhNMVVXBHX8qI= QMq9B0&e=3D > > > > ________________________________ > From: Khurram Faraaz > 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 =3D null; > PreparedStatement prdstmnt =3D null; > try { > // Please replace test1302-145 with your hostname, > name of host > where Drillbit is up and running > final String URL_STRING =3D > "jdbc:drill:schema=3Ddfs.tmp;drillbit=3Dtest1302-145"; > > Class.forName("org.apache.drill.jdbc.Driver").newInstance(); > > // Please replace username and password with your > username and > password > conn =3D > DriverManager.getConnection(URL_STRING,"mapr","mapr"); > prdstmnt =3D conn.prepareStatement("SELECT * FROM > cp.`employee.json`"); > prdstmnt.executeQuery(); > prdstmnt.close(); > } catch (Exception e) { > System.out.println(e.getMessage()); > e.printStackTrace(); > } finally { > if(conn !=3D null) > try { conn.close(); } catch(SQLException sqlexcpn){ > sqlexcpn.printStackTrace(); } > if(prdstmnt !=3D null) > try { prdstmnt.close(); } catch(SQLException sqlexcpn= ){ > sqlexcpn.printStackTrace(); } > } > } > } > > Regards, > Khurram > > On Tue, Jan 8, 2019 at 11:10 PM Tushar Pathare > wrote: > > > Hello Team, > > > > We have installed drill 1.12.0 and trying t= o > 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=3D172.32.63.64:2181,172.32.63.65:21= 81, > > 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=3D172.32.63.64:2181 > > < > https://urldefense.proofpoint.com/v2/url?u=3Dhttp-3A__172.32.63.64-3A2181= &d=3DDwIGaQ&c=3DcskdkSMqhcnjZxdQVpwTXg&r=3DGXRJhB4g1YFDJsrcglHwUA&m=3DBJqk_= hazvoApEDyas3DwYGI3NAEtSjzIEex2DF5uhHk&s=3D-X33aklNalfpJDS18b6-wH5bkmY2QWJ4= iba8p6pmxn4&e=3D > >,172.32.63.65:2181 > > < > https://urldefense.proofpoint.com/v2/url?u=3Dhttp-3A__172.32.63.65-3A2181= &d=3DDwIGaQ&c=3DcskdkSMqhcnjZxdQVpwTXg&r=3DGXRJhB4g1YFDJsrcglHwUA&m=3DBJqk_= hazvoApEDyas3DwYGI3NAEtSjzIEex2DF5uhHk&s=3DfHrzLbqH4CpgspWDHoMyOMneXh2YP2HD= 7frqI4ITiUM&e=3D > >,172.32.63.67:2181/sidra-drillbit > > < > https://urldefense.proofpoint.com/v2/url?u=3Dhttp-3A__172.32.63.67-3A2181= _sidra-2Ddrillbit&d=3DDwIGaQ&c=3DcskdkSMqhcnjZxdQVpwTXg&r=3DGXRJhB4g1YFDJsr= cglHwUA&m=3DBJqk_hazvoApEDyas3DwYGI3NAEtSjzIEex2DF5uhHk&s=3Do9EFkEIaCa6F7My= 4l3JXFfeeZtFJFqytiFAxLxybbg4&e=3D> > * > > > > > > > > *Failure in connecting to Drill: * > > > > *oadd.org.apache.drill.exec.rpc.RpcException: Failure setting u= p > * > > > > *ZK for client.* > > > > > > > > > > > > > > > > [image: cid:image001.png@01D3B9E9.23323D90] > > > > *Tushar Bhalchandra Pathare* > > > > Bigdata,GPFS,CSXF =E2=80=93 Research Department > > > > *t. *+974 4003 7443 > > > > *m.* +974 74793547 > > > > PO BOX 26999 Doha, Qatar > > > > sidra.org > > < > https://urldefense.proofpoint.com/v2/url?u=3Dhttp-3A__www.sidra.org_&d=3D= DwMGaQ&c=3DcskdkSMqhcnjZxdQVpwTXg&r=3DH5JEl9vb-mBIjic10QAbDD2vkUUKAxjO6wZO3= 22RtdI&m=3DxCohfm7_vub0ExT6cMTEbB4WbjdIEPLdaXqXAOANq4A&s=3Dkqudpk5v3cRasIba= MG8kwLBXafZ87VEhutJj7vxwhS4&e=3D > > > > > > > > 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 thi= s > e-mail is > > prohibited and may be unlawful. If you are not the intended > recipient, > > please notify the sender immediately by using the reply functio= n > and then > > permanently delete what you have received. Any views or opinion= s > 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 ar= e > 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 i= s > 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 expresse= d > 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 i= s > 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 expresse= d > are solely those of the author and do not necessarily represent those of > Sidra Medical and Research Center. > --0000000000006b0316057f0251f1--