You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Saumitra Shahapure <sa...@gmail.com> on 2014/09/10 16:09:12 UTC

Debugging Hive frontend in eclipse

Hello,

I am new to Hive dev community,

I am trying to debug Hive frontend (till semantic analysis) from eclipse. I
want to start from Main in CliDriver. I don't want to go debugging till
execution and don't care if it fails.

As described in
https://cwiki.apache.org/confluence/display/Hive/DeveloperGuide#DeveloperGuide-DebuggingHiveCode
, I am able to debug TestCliDriver from eclipse and several tests pass
showing that metastore is working fine.

The problem is that, when I start debugging from CliDriver, metastore is
not initialized properly. So semantic analysis fails at getMetadata call .

Is any additional setup required to get metadata work properly from eclipse
debugging?

-- Saumitra S. Shahapure

Re: Debugging Hive frontend in eclipse

Posted by Thejas Nair <th...@hortonworks.com>.
I have never seen that before. Maybe you have some env setting (hadoop
or hive) that is messing with it ?
Edit the shell script to print the 'java' command it is running and
see if you can figure out what is wrong.


On Wed, Sep 10, 2014 at 11:26 AM, Saumitra Shahapure
<sa...@gmail.com> wrote:
> Hey Thejas,
>
> It seems that hive --debug is also not smooth.
> I ran the script build/dist/bin/hive --debug after clean build
>
> It gives error
>
> ERROR: Cannot load this JVM TI agent twice, check your java command line
> for duplicate jdwp options.
> Error occurred during initialization of VM
> agent library failed to init: jdwp
>
> Am I missing something here?
>
> -- Saumitra S. Shahapure
>
> On Wed, Sep 10, 2014 at 10:49 PM, Thejas Nair <th...@hortonworks.com>
> wrote:
>
>> There have been some threads on how to get around the metastore
>> initialization issue.
>> But another easy way to work around this issue is to build hive, and
>> then run hive --debug . Hive will wait for the debugger to connect on
>> port 8000. You can configure eclipse debugging to connect to that
>> port.
>>
>>
>> On Wed, Sep 10, 2014 at 7:09 AM, Saumitra Shahapure
>> <sa...@gmail.com> wrote:
>> > Hello,
>> >
>> > I am new to Hive dev community,
>> >
>> > I am trying to debug Hive frontend (till semantic analysis) from
>> eclipse. I
>> > want to start from Main in CliDriver. I don't want to go debugging till
>> > execution and don't care if it fails.
>> >
>> > As described in
>> >
>> https://cwiki.apache.org/confluence/display/Hive/DeveloperGuide#DeveloperGuide-DebuggingHiveCode
>> > , I am able to debug TestCliDriver from eclipse and several tests pass
>> > showing that metastore is working fine.
>> >
>> > The problem is that, when I start debugging from CliDriver, metastore is
>> > not initialized properly. So semantic analysis fails at getMetadata call
>> .
>> >
>> > Is any additional setup required to get metadata work properly from
>> eclipse
>> > debugging?
>> >
>> > -- Saumitra S. Shahapure
>>
>> --
>> CONFIDENTIALITY NOTICE
>> NOTICE: This message is intended for the use of the individual or entity to
>> which it is addressed and may contain information that is confidential,
>> privileged and exempt from disclosure under applicable law. If the reader
>> of this message is not the intended recipient, you are hereby notified that
>> any printing, copying, dissemination, distribution, disclosure or
>> forwarding of this communication is strictly prohibited. If you have
>> received this communication in error, please contact the sender immediately
>> and delete it from your system. Thank You.
>>

-- 
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to 
which it is addressed and may contain information that is confidential, 
privileged and exempt from disclosure under applicable law. If the reader 
of this message is not the intended recipient, you are hereby notified that 
any printing, copying, dissemination, distribution, disclosure or 
forwarding of this communication is strictly prohibited. If you have 
received this communication in error, please contact the sender immediately 
and delete it from your system. Thank You.

Re: Debugging Hive frontend in eclipse

Posted by Saumitra Shahapure <sa...@gmail.com>.
Hey Thejas,

It seems that hive --debug is also not smooth.
I ran the script build/dist/bin/hive --debug after clean build

It gives error

ERROR: Cannot load this JVM TI agent twice, check your java command line
for duplicate jdwp options.
Error occurred during initialization of VM
agent library failed to init: jdwp

Am I missing something here?

-- Saumitra S. Shahapure

On Wed, Sep 10, 2014 at 10:49 PM, Thejas Nair <th...@hortonworks.com>
wrote:

> There have been some threads on how to get around the metastore
> initialization issue.
> But another easy way to work around this issue is to build hive, and
> then run hive --debug . Hive will wait for the debugger to connect on
> port 8000. You can configure eclipse debugging to connect to that
> port.
>
>
> On Wed, Sep 10, 2014 at 7:09 AM, Saumitra Shahapure
> <sa...@gmail.com> wrote:
> > Hello,
> >
> > I am new to Hive dev community,
> >
> > I am trying to debug Hive frontend (till semantic analysis) from
> eclipse. I
> > want to start from Main in CliDriver. I don't want to go debugging till
> > execution and don't care if it fails.
> >
> > As described in
> >
> https://cwiki.apache.org/confluence/display/Hive/DeveloperGuide#DeveloperGuide-DebuggingHiveCode
> > , I am able to debug TestCliDriver from eclipse and several tests pass
> > showing that metastore is working fine.
> >
> > The problem is that, when I start debugging from CliDriver, metastore is
> > not initialized properly. So semantic analysis fails at getMetadata call
> .
> >
> > Is any additional setup required to get metadata work properly from
> eclipse
> > debugging?
> >
> > -- Saumitra S. Shahapure
>
> --
> CONFIDENTIALITY NOTICE
> NOTICE: This message is intended for the use of the individual or entity to
> which it is addressed and may contain information that is confidential,
> privileged and exempt from disclosure under applicable law. If the reader
> of this message is not the intended recipient, you are hereby notified that
> any printing, copying, dissemination, distribution, disclosure or
> forwarding of this communication is strictly prohibited. If you have
> received this communication in error, please contact the sender immediately
> and delete it from your system. Thank You.
>

Re: Debugging Hive frontend in eclipse

Posted by Thejas Nair <th...@hortonworks.com>.
There have been some threads on how to get around the metastore
initialization issue.
But another easy way to work around this issue is to build hive, and
then run hive --debug . Hive will wait for the debugger to connect on
port 8000. You can configure eclipse debugging to connect to that
port.


On Wed, Sep 10, 2014 at 7:09 AM, Saumitra Shahapure
<sa...@gmail.com> wrote:
> Hello,
>
> I am new to Hive dev community,
>
> I am trying to debug Hive frontend (till semantic analysis) from eclipse. I
> want to start from Main in CliDriver. I don't want to go debugging till
> execution and don't care if it fails.
>
> As described in
> https://cwiki.apache.org/confluence/display/Hive/DeveloperGuide#DeveloperGuide-DebuggingHiveCode
> , I am able to debug TestCliDriver from eclipse and several tests pass
> showing that metastore is working fine.
>
> The problem is that, when I start debugging from CliDriver, metastore is
> not initialized properly. So semantic analysis fails at getMetadata call .
>
> Is any additional setup required to get metadata work properly from eclipse
> debugging?
>
> -- Saumitra S. Shahapure

-- 
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to 
which it is addressed and may contain information that is confidential, 
privileged and exempt from disclosure under applicable law. If the reader 
of this message is not the intended recipient, you are hereby notified that 
any printing, copying, dissemination, distribution, disclosure or 
forwarding of this communication is strictly prohibited. If you have 
received this communication in error, please contact the sender immediately 
and delete it from your system. Thank You.