You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Eric Hanson (SQL SERVER)" <Er...@microsoft.com> on 2013/11/14 01:58:17 UTC

debugging into unit tests with the new mvn build setup

Hi,

How do you attach the debugger in eclipse to debug into a single unit test now, with the new mvn build setup? If somebody could add instructions for this into the Hive Developer FAQ<https://cwiki.apache.org/confluence/display/Hive/HiveDeveloperFAQ>, that would be great.

Thanks,
Eric

RE: debugging into unit tests with the new mvn build setup

Posted by "Eric Hanson (SQL SERVER)" <Er...@microsoft.com>.
Thanks Brock! I updated the wiki to put in instructions on how to do this. 

Eric

-----Original Message-----
From: Brock Noland [mailto:brock@cloudera.com] 
Sent: Thursday, November 14, 2013 2:23 PM
To: dev@hive.apache.org
Cc: hive-dev@hadoop.apache.org
Subject: Re: debugging into unit tests with the new mvn build setup

Perfect, that is a true unit test.  With the class open and the method you want to test highlighted you should be able to go to run -> debug.  I set a breakpoint the class and verified this work for me. See this, here is an image of it working just a few seconds ago:  http://i.imgur.com/eYi6ud6.png


On Thu, Nov 14, 2013 at 4:15 PM, Eric Hanson (SQL SERVER) < Eric.N.Hanson@microsoft.com> wrote:

> Hi Brock,
>
> I wanted to attach the debugger in eclipse to execution of a junit 
> test in org.apache.hadoop.hive.ql.exec.vector.TestVectorizationContext.
>
> Eric
>
> -----Original Message-----
> From: Brock Noland [mailto:brock@cloudera.com]
> Sent: Wednesday, November 13, 2013 7:02 PM
> To: dev@hive.apache.org
> Cc: hive-dev@hadoop.apache.org
> Subject: Re: debugging into unit tests with the new mvn build setup
>
> Hi,
>
> Specifically which test are you referring to?
>
> A true unit test is debuggable via the debug menu without any 
> additional work (e.g. the new UDF tests or TestMacroSemanticAnalyzer).  
> The so called "unit" tests that submit MR jobs might be a little more 
> work, but are you looking to debug the parent process or the child process?
>
> Brock
>
>
> On Wed, Nov 13, 2013 at 6:58 PM, Eric Hanson (SQL SERVER) < 
> Eric.N.Hanson@microsoft.com> wrote:
>
> > Hi,
> >
> > How do you attach the debugger in eclipse to debug into a single 
> > unit test now, with the new mvn build setup? If somebody could add 
> > instructions for this into the Hive Developer FAQ< 
> > https://cwiki.apache.org/confluence/display/Hive/HiveDeveloperFAQ>,
> > that would be great.
> >
> > Thanks,
> > Eric
> >
>
>
>
> --
> Apache MRUnit - Unit testing MapReduce - http://mrunit.apache.org
>



--
Apache MRUnit - Unit testing MapReduce - http://mrunit.apache.org

Re: debugging into unit tests with the new mvn build setup

Posted by Brock Noland <br...@cloudera.com>.
Perfect, that is a true unit test.  With the class open and the method you
want to test highlighted you should be able to go to run -> debug.  I set a
breakpoint the class and verified this work for me. See this, here is an
image of it working just a few seconds ago:  http://i.imgur.com/eYi6ud6.png


On Thu, Nov 14, 2013 at 4:15 PM, Eric Hanson (SQL SERVER) <
Eric.N.Hanson@microsoft.com> wrote:

> Hi Brock,
>
> I wanted to attach the debugger in eclipse to execution of a junit test in
> org.apache.hadoop.hive.ql.exec.vector.TestVectorizationContext.
>
> Eric
>
> -----Original Message-----
> From: Brock Noland [mailto:brock@cloudera.com]
> Sent: Wednesday, November 13, 2013 7:02 PM
> To: dev@hive.apache.org
> Cc: hive-dev@hadoop.apache.org
> Subject: Re: debugging into unit tests with the new mvn build setup
>
> Hi,
>
> Specifically which test are you referring to?
>
> A true unit test is debuggable via the debug menu without any additional
> work (e.g. the new UDF tests or TestMacroSemanticAnalyzer).  The so called
> "unit" tests that submit MR jobs might be a little more work, but are you
> looking to debug the parent process or the child process?
>
> Brock
>
>
> On Wed, Nov 13, 2013 at 6:58 PM, Eric Hanson (SQL SERVER) <
> Eric.N.Hanson@microsoft.com> wrote:
>
> > Hi,
> >
> > How do you attach the debugger in eclipse to debug into a single unit
> > test now, with the new mvn build setup? If somebody could add
> > instructions for this into the Hive Developer FAQ<
> > https://cwiki.apache.org/confluence/display/Hive/HiveDeveloperFAQ>,
> > that would be great.
> >
> > Thanks,
> > Eric
> >
>
>
>
> --
> Apache MRUnit - Unit testing MapReduce - http://mrunit.apache.org
>



-- 
Apache MRUnit - Unit testing MapReduce - http://mrunit.apache.org

RE: debugging into unit tests with the new mvn build setup

Posted by "Eric Hanson (SQL SERVER)" <Er...@microsoft.com>.
Hi Brock,

I wanted to attach the debugger in eclipse to execution of a junit test in org.apache.hadoop.hive.ql.exec.vector.TestVectorizationContext.

Eric

-----Original Message-----
From: Brock Noland [mailto:brock@cloudera.com] 
Sent: Wednesday, November 13, 2013 7:02 PM
To: dev@hive.apache.org
Cc: hive-dev@hadoop.apache.org
Subject: Re: debugging into unit tests with the new mvn build setup

Hi,

Specifically which test are you referring to?

A true unit test is debuggable via the debug menu without any additional work (e.g. the new UDF tests or TestMacroSemanticAnalyzer).  The so called "unit" tests that submit MR jobs might be a little more work, but are you looking to debug the parent process or the child process?

Brock


On Wed, Nov 13, 2013 at 6:58 PM, Eric Hanson (SQL SERVER) < Eric.N.Hanson@microsoft.com> wrote:

> Hi,
>
> How do you attach the debugger in eclipse to debug into a single unit 
> test now, with the new mvn build setup? If somebody could add 
> instructions for this into the Hive Developer FAQ< 
> https://cwiki.apache.org/confluence/display/Hive/HiveDeveloperFAQ>, 
> that would be great.
>
> Thanks,
> Eric
>



--
Apache MRUnit - Unit testing MapReduce - http://mrunit.apache.org

Re: debugging into unit tests with the new mvn build setup

Posted by Brock Noland <br...@cloudera.com>.
Hi,

Specifically which test are you referring to?

A true unit test is debuggable via the debug menu without any additional
work (e.g. the new UDF tests or TestMacroSemanticAnalyzer).  The so called
"unit" tests that submit MR jobs might be a little more work, but are you
looking to debug the parent process or the child process?

Brock


On Wed, Nov 13, 2013 at 6:58 PM, Eric Hanson (SQL SERVER) <
Eric.N.Hanson@microsoft.com> wrote:

> Hi,
>
> How do you attach the debugger in eclipse to debug into a single unit test
> now, with the new mvn build setup? If somebody could add instructions for
> this into the Hive Developer FAQ<
> https://cwiki.apache.org/confluence/display/Hive/HiveDeveloperFAQ>, that
> would be great.
>
> Thanks,
> Eric
>



-- 
Apache MRUnit - Unit testing MapReduce - http://mrunit.apache.org