Re: Drill connection using jdbc

2019-01-09 Thread Tushar 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"  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 
>>>> > 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"  wrote:
>>>> >
>>>> > Are you missing drill zk directory in connection url?
>>>> > By default, it's value is drill.
>>>> >
>>>> > jdbc:drill:zk=[:][,[:]...
>>>> > /;[schema=]
>>>> >
>>>> >
>>>> >
>>>> >
>>>> 
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,
>>>> >
>>>> >

Re: Drill connection using jdbc

2019-01-09 Thread Robert Hou
I had to restart drill after I changed drill-override.conf.

--Robert

On Wed, Jan 9, 2019 at 1:19 AM Robert Hou  wrote:

> I added zk.root to my drill-override.conf and it showed up in zookeeper,
> and I can connect to the new zk.root.  Since you don't have zk.root, then
> you should use "drill" in your connection URL.
>
> Thanks.
>
> --Robert
>
> On Wed, Jan 9, 2019 at 1:08 AM Robert Hou  wrote:
>
>> 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  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 
>>> 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"  wrote:
>>>>
>>>> I would suggest connecting with drillbit first, and if that works,
>>>> I would
>>>> use zookeeper.
>>>>
>>>>sqlline -u "jdbc:drill:drillbit="
>>>>
>>>> Please note the quotation marks.
>>>>
>>>> If that works, then try:
>>>>
>>>>sqlline -u "jdbc:drill:zk=:port/>>> drill>/"
>>>>
>>>> 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=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"  wrote:
>>>> >
>>>> > Yes. I believe its a necessary parameter if n

Re: Drill connection using jdbc

2019-01-09 Thread Robert Hou
I added zk.root to my drill-override.conf and it showed up in zookeeper,
and I can connect to the new zk.root.  Since you don't have zk.root, then
you should use "drill" in your connection URL.

Thanks.

--Robert

On Wed, Jan 9, 2019 at 1:08 AM Robert Hou  wrote:

> 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  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 
>> 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"  wrote:
>>>
>>> I would suggest connecting with drillbit first, and if that works, I
>>> would
>>> use zookeeper.
>>>
>>>sqlline -u "jdbc:drill:drillbit="
>>>
>>> Please note the quotation marks.
>>>
>>> If that works, then try:
>>>
>>>sqlline -u "jdbc:drill:zk=:port/>> drill>/"
>>>
>>> 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=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"  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=
>>> >

Re: Drill connection using jdbc

2019-01-09 Thread Robert Hou
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  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  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"  wrote:
>>
>> I would suggest connecting with drillbit first, and if that works, I
>> would
>> use zookeeper.
>>
>>sqlline -u "jdbc:drill:drillbit="
>>
>> Please note the quotation marks.
>>
>> If that works, then try:
>>
>>sqlline -u "jdbc:drill:zk=:port/> drill>/"
>>
>> 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=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"  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 
>> > 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 <
>> >
&

Re: Drill connection using jdbc

2019-01-09 Thread Robert Hou
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  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"  wrote:
>
> I would suggest connecting with drillbit first, and if that works, I
> would
> use zookeeper.
>
>sqlline -u "jdbc:drill:drillbit="
>
> Please note the quotation marks.
>
> If that works, then try:
>
>sqlline -u "jdbc:drill:zk=:port/ drill>/"
>
> 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=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"  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 
> > 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"  wrote:
> >
> > Are you missing drill zk directory in connection url?
> > By default, it's value is drill.
> >
> > jdbc:drill:zk=[:][,[:]...
> > /;[schema=]
> >
> >
> >
> >
> https://urldefense.proofpoint.com/v2/url?u=https-3A__drill.apache.org_docs_using-2Dthe-2D&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=GXRJhB4g1Y

Re: Drill connection using jdbc

2019-01-09 Thread Tushar Pathare
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 <http://www.sidra.org/>


On 1/9/19, 11:34 AM, "Robert Hou"  wrote:

I would suggest connecting with drillbit first, and if that works, I would
use zookeeper.

   sqlline -u "jdbc:drill:drillbit="

Please note the quotation marks.

If that works, then try:

   sqlline -u "jdbc:drill:zk=: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=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"  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 
> 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"  wrote:
>
> Are you missing drill zk directory in connection url?
> By default, it's value is drill.
>
> jdbc:drill:zk=[:][,[:]...
> /;[schema=]
>
>
>
> 
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-X633jjZFcolbBVC8

Re: Drill connection using jdbc

2019-01-09 Thread Robert Hou
I would suggest connecting with drillbit first, and if that works, I would
use zookeeper.

   sqlline -u "jdbc:drill:drillbit="

Please note the quotation marks.

If that works, then try:

   sqlline -u "jdbc:drill:zk=: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=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"  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 
> 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"  wrote:
>
> Are you missing drill zk directory in connection url?
> By default, it's value is drill.
>
> jdbc:drill:zk=[:][,[:]...
> /;[schema=]
>
>
>
> 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 
> 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

Re: Drill connection using jdbc

2019-01-09 Thread Tushar Pathare
Hello Arjun,
Please find the error below

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?


Thanks


Tushar Bhalchandra Pathare
Bigdata,GPFS,CSXF – Research Department
t. +974 4003 7443
m. +974 74793547
PO BOX 26999 Doha, Qatar
sidra.org <http://www.sidra.org/>


On 1/9/19, 11:02 AM, "Arjun kr"  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://aka.ms/ghei36>


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 cluster ID


Tushar Bhalchandra Pathare
Bigdata,GPFS,CSXF – Research Department
t. +974 4003 7443
m. +974 74793547
PO BOX 26999 Doha, Qatar
sidra.org <http://www.sidra.org/>


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=[:][,[:]...
/;[schema=]



https://drill.apache.org/docs/using-the-<https://drill.apache.org/docs/using-the-jdbc-driver/>jdbc<https://drill.apache.org/docs/using-the-jdbc-driver/>-driver/<https://drill.apache.org/docs/using-the-jdbc-driver/>

Thanks,

Arjun

Get Outlook for Android<https://aka.ms/ghei36>


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 = 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  
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: *

Re: Drill connection using jdbc

2019-01-09 Thread Arjun Rajan
Try this URL jdbc:drill:zk=172.32.63.64:2181/drill/sidra-drillbit
<http://172.32.63.64:2181/opt/apache-drill/sidra-drillbit>

It is expecting znode path in zookeeper used by Drill.

Thanks,

Arjun

On Wed, Jan 9, 2019, 12:13 AM Tushar Pathare  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=G5PLuEcQc-XMZcqmyuPQrA&m=oxHW4S7DFVwVvsZaHH0XgZnhhmGkh8Gaj5N91x0ZNNU&s=ahdl771nVvakDoiIMxP3CwNThb1gfs0C1FnbsHe5MoI&e=
> >
>
>
> On 1/9/19, 11:02 AM, "Arjun kr"  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=G5PLuEcQc-XMZcqmyuPQrA&m=oxHW4S7DFVwVvsZaHH0XgZnhhmGkh8Gaj5N91x0ZNNU&s=sAuQzJT3xlBvr0R3la2Lx8ou1y9ua1oECbvGmEn1IGc&e=
> >
>
>     ____
> 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 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=G5PLuEcQc-XMZcqmyuPQrA&m=oxHW4S7DFVwVvsZaHH0XgZnhhmGkh8Gaj5N91x0ZNNU&s=ahdl771nVvakDoiIMxP3CwNThb1gfs0C1FnbsHe5MoI&e=
> >
>
>
> 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=[:][,[:]...
> /;[schema=]
>
>
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__drill.apache.org_docs_using-2Dthe-2D&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=G5PLuEcQc-XMZcqmyuPQrA&m=oxHW4S7DFVwVvsZaHH0XgZnhhmGkh8Gaj5N91x0ZNNU&s=Gl1RnwVHObkF6idCyKaf7qJgDWUvOWUbaMmKK_G6r_s&e=
> <
> https://urldefense.proofpoint.com/v2/url?u=https-3A__drill.apache.org_docs_using-2Dthe-2Djdbc-2Ddriver_&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=G5PLuEcQc-XMZcqmyuPQrA&m=oxHW4S7DFVwVvsZaHH0XgZnhhmGkh8Gaj5N91x0ZNNU&s=g41X-zx9wRcnMql53jhfYV9kI47XWBhqNWD5BWazeBc&e=
> >jdbc<
> https://urldefense.proofpoint.com/v2/url?u=https-3A__drill.apache.org_docs_using-2Dthe-2Djdbc-2Ddriver_&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=G5PLuEcQc-XMZcqmyuPQrA&m=oxHW4S7DFVwVvsZaHH0XgZnhhmGkh8Gaj5N91x0ZNNU&s=g41X-zx9wRcnMql53jhfYV9kI47XWBhqNWD5BWazeBc&e=
> >-driver/<
> https://urldefense.proofpoint.com/v2/url?u=https-3A__drill.apache.org_docs_using-2Dthe-2Djdbc-2Ddriver_&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=G5PLuEcQc-XMZcqmyuPQrA&m=oxHW4S7DFVwVvsZaHH0XgZnhhmGkh8Gaj5N91x0ZNNU&s=g41X-zx9wRcnMql53jhfYV9kI47XWBhqNWD5BWazeBc&e=
> >
>
> Thanks,
>
>     Arjun
>
>     Get Outlook for Android<
> https://urldefense.proofpoint.com/v2/url?u=https-3A__aka.ms_ghei36&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=G5PLuEcQc-XMZcqmyuPQrA&m=oxHW4S7DFVwVvsZaHH0XgZnhhmGkh8Gaj5N91x0ZNNU&s=sAuQzJT3xlBvr0R3la2Lx8ou1y9ua1oECbvGmEn1IGc&e=
> >
>
> 
> 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.*;
> imp

Re: Drill connection using jdbc

2019-01-09 Thread Tushar Pathare
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 <http://www.sidra.org/>


On 1/9/19, 11:02 AM, "Arjun kr"  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://aka.ms/ghei36>


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 cluster ID


Tushar Bhalchandra Pathare
Bigdata,GPFS,CSXF – Research Department
t. +974 4003 7443
m. +974 74793547
PO BOX 26999 Doha, Qatar
sidra.org <http://www.sidra.org/>


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=[:][,[:]...
/;[schema=]



https://drill.apache.org/docs/using-the-<https://drill.apache.org/docs/using-the-jdbc-driver/>jdbc<https://drill.apache.org/docs/using-the-jdbc-driver/>-driver/<https://drill.apache.org/docs/using-the-jdbc-driver/>

Thanks,

Arjun

Get Outlook for Android<https://aka.ms/ghei36>


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 = 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  
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: *
>

Re: Drill connection using jdbc

2019-01-09 Thread Tushar Pathare
Hello Arjun,
   This below example you have given for direct connection to 
drillbit.Could you help me connect to zk cluster using the same example

Thanks


Tushar Bhalchandra Pathare
Bigdata,GPFS,CSXF – Research Department
t. +974 4003 7443
m. +974 74793547
PO BOX 26999 Doha, Qatar
sidra.org <http://www.sidra.org/>


On 1/9/19, 11:02 AM, "Arjun kr"  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://aka.ms/ghei36>


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 cluster ID


Tushar Bhalchandra Pathare
Bigdata,GPFS,CSXF – Research Department
t. +974 4003 7443
m. +974 74793547
PO BOX 26999 Doha, Qatar
sidra.org <http://www.sidra.org/>


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=[:][,[:]...
/;[schema=]



https://drill.apache.org/docs/using-the-<https://drill.apache.org/docs/using-the-jdbc-driver/>jdbc<https://drill.apache.org/docs/using-the-jdbc-driver/>-driver/<https://drill.apache.org/docs/using-the-jdbc-driver/>

Thanks,

Arjun

Get Outlook for Android<https://aka.ms/ghei36>


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 = 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  
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
> <http://172.32.63.64:2181>,172.32.63.65:2181
> <http://172.32.63.65:2181>,172.32.

Re: Drill connection using jdbc

2019-01-09 Thread Arjun kr
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://aka.ms/ghei36>


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 cluster ID


Tushar Bhalchandra Pathare
Bigdata,GPFS,CSXF – Research Department
t. +974 4003 7443
m. +974 74793547
PO BOX 26999 Doha, Qatar
sidra.org <http://www.sidra.org/>


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=[:][,[:]...
/;[schema=]



https://drill.apache.org/docs/using-the-<https://drill.apache.org/docs/using-the-jdbc-driver/>jdbc<https://drill.apache.org/docs/using-the-jdbc-driver/>-driver/<https://drill.apache.org/docs/using-the-jdbc-driver/>

Thanks,

Arjun

Get Outlook for Android<https://aka.ms/ghei36>


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 = 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  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
> <http://172.32.63.64:2181>,172.32.63.65:2181
> <http://172.32.63.65:2181>,172.32.63.67:2181/sidra-drillbit
> <http://172.32.63.67:2181/sidra-drillbit> *
>
>
>
> *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_vub0ExT6cMTEbB4Wbjd

Re: Drill connection using jdbc

2019-01-08 Thread Tushar Pathare
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 <http://www.sidra.org/>


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=[:][,[:]...
/;[schema=]



https://drill.apache.org/docs/using-the-<https://drill.apache.org/docs/using-the-jdbc-driver/>jdbc<https://drill.apache.org/docs/using-the-jdbc-driver/>-driver/<https://drill.apache.org/docs/using-the-jdbc-driver/>

Thanks,

Arjun

Get Outlook for Android<https://aka.ms/ghei36>


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 = 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  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
> <http://172.32.63.64:2181>,172.32.63.65:2181
> <http://172.32.63.65:2181>,172.32.63.67:2181/sidra-drillbit
> <http://172.32.63.67:2181/sidra-drillbit> *
>
>
>
> *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 ac

Re: Drill connection using jdbc

2019-01-08 Thread Arjun kr
Are you missing drill zk directory in connection url?
By default, it's value is drill.

jdbc:drill:zk=[:][,[:]...
/;[schema=]


https://drill.apache.org/docs/using-the-<https://drill.apache.org/docs/using-the-jdbc-driver/>jdbc<https://drill.apache.org/docs/using-the-jdbc-driver/>-driver/<https://drill.apache.org/docs/using-the-jdbc-driver/>

Thanks,

Arjun

Get Outlook for Android<https://aka.ms/ghei36>


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 = 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  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
> <http://172.32.63.64:2181>,172.32.63.65:2181
> <http://172.32.63.65:2181>,172.32.63.67:2181/sidra-drillbit
> <http://172.32.63.67:2181/sidra-drillbit> *
>
>
>
> *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.
>


Re: Drill connection using jdbc

2019-01-08 Thread Tushar Pathare
Hello Team,
 Please find the log data.

Thanks

Tushar Bhalchandra Pathare
Bigdata,GPFS,CSXF – Research Department
t. +974 4003 7443
m. +974 74793547
PO BOX 26999 Doha, Qatar
sidra.org 


On 1/9/19, 10:24 AM, "Kunal Khatua"  wrote:

There must be a stack trace in the logs.could you share that?

On Tue, Jan 8, 2019, 11:10 PM Tushar Pathare  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
> ,172.32.63.65:2181
> ,172.32.63.67:2181/sidra-drillbit
>  *
>
>
>
> *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 
>
>
> 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.


Re: Drill connection using jdbc

2019-01-08 Thread Khurram Faraaz
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  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
> ,172.32.63.65:2181
> ,172.32.63.67:2181/sidra-drillbit
>  *
>
>
>
> *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
> 
>
>
> 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.
>


Re: Drill connection using jdbc

2019-01-08 Thread Kunal Khatua
There must be a stack trace in the logs.could you share that?

On Tue, Jan 8, 2019, 11:10 PM Tushar Pathare  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
> ,172.32.63.65:2181
> ,172.32.63.67:2181/sidra-drillbit
>  *
>
>
>
> *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 
>
>
> 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.
>


Drill connection using jdbc

2019-01-08 Thread Tushar Pathare
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,172.32.63.65:2181,172.32.63.67:2181/sidra-drillbit

Failure in connecting to Drill:
oadd.org.apache.drill.exec.rpc.RpcException: Failure setting up
ZK for client.



[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


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.