You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafodion.apache.org by Eric Owhadi <er...@esgyn.com> on 2015/07/15 22:26:16 UTC

Learning the code, help would be appreciated

I am getting familiar with the Trafodion code. In particular, I am
interested to see the hbase interfaces. So I installed the dev environment,
added Eclipse with the CDT pluggin to be able to debug both C++ and java
code.

I was hoping to set a breakpoint at:
ExHBaseSelect.cpp, line 68, where I would have guessed
case SCAN_OPEN:
would be hit when I do from sqlci:
select * from trafodion.usr.t3;

I set dbg on all mx* processes.

No success, the code won't breat on the break point.

Any clue would be greatly appreciated :-),
Regards,
Eric Owhadi

Re: Learning the code, help would be appreciated

Posted by Dave Birdsall <da...@esgyn.com>.
Thanks, Anoop!

On Wed, Jul 15, 2015 at 1:40 PM, Anoop Sharma <an...@esgyn.com>
wrote:

> Had sent Eric a response, copying it here.
>
> Breakpoint need to be in method ExHbaseScanSQTaskTcb::work
> for traf tables.
> Other ::work method in that file are for native hbase tables,
> and other specialized scan access.
>
> anoop
>
> -----Original Message-----
> From: Dave Birdsall [mailto:dave.birdsall@esgyn.com]
> Sent: Wednesday, July 15, 2015 1:38 PM
> To: dev@trafodion.incubator.apache.org
> Subject: Re: Learning the code, help would be appreciated
>
> Hi Eric,
>
> The file name is ExHbaseSelect.cpp (note the lower case 'b'), so perhaps
> that's the problem. You could equally well try putting a breakpoint at
> ExHbaseScanTaskTcb::work. The work method is called at least once each time
> the statement is executed.
>
> A simple way to get started is to test using sqlci on platform. You can
> just "gdb sqlci", then "start" then "b ExHbaseScanTaskTcb::work". For
> simple serial plans you should get a hit in the sqlci process itself. (If
> you have a parallel plan, then this method would get hit in the ESPs
> instead.)
>
> Dave
>
> On Wed, Jul 15, 2015 at 1:26 PM, Eric Owhadi <er...@esgyn.com>
> wrote:
>
> > I am getting familiar with the Trafodion code. In particular, I am
> > interested to see the hbase interfaces. So I installed the dev
> > environment, added Eclipse with the CDT pluggin to be able to debug
> > both C++ and java code.
> >
> > I was hoping to set a breakpoint at:
> > ExHBaseSelect.cpp, line 68, where I would have guessed case SCAN_OPEN:
> > would be hit when I do from sqlci:
> > select * from trafodion.usr.t3;
> >
> > I set dbg on all mx* processes.
> >
> > No success, the code won't breat on the break point.
> >
> > Any clue would be greatly appreciated :-), Regards, Eric Owhadi
> >
>
>

RE: Learning the code, help would be appreciated

Posted by Anoop Sharma <an...@esgyn.com>.
Had sent Eric a response, copying it here.

Breakpoint need to be in method ExHbaseScanSQTaskTcb::work
for traf tables.
Other ::work method in that file are for native hbase tables,
and other specialized scan access.

anoop

-----Original Message-----
From: Dave Birdsall [mailto:dave.birdsall@esgyn.com] 
Sent: Wednesday, July 15, 2015 1:38 PM
To: dev@trafodion.incubator.apache.org
Subject: Re: Learning the code, help would be appreciated

Hi Eric,

The file name is ExHbaseSelect.cpp (note the lower case 'b'), so perhaps that's the problem. You could equally well try putting a breakpoint at ExHbaseScanTaskTcb::work. The work method is called at least once each time the statement is executed.

A simple way to get started is to test using sqlci on platform. You can just "gdb sqlci", then "start" then "b ExHbaseScanTaskTcb::work". For simple serial plans you should get a hit in the sqlci process itself. (If you have a parallel plan, then this method would get hit in the ESPs
instead.)

Dave

On Wed, Jul 15, 2015 at 1:26 PM, Eric Owhadi <er...@esgyn.com> wrote:

> I am getting familiar with the Trafodion code. In particular, I am 
> interested to see the hbase interfaces. So I installed the dev 
> environment, added Eclipse with the CDT pluggin to be able to debug 
> both C++ and java code.
>
> I was hoping to set a breakpoint at:
> ExHBaseSelect.cpp, line 68, where I would have guessed case SCAN_OPEN:
> would be hit when I do from sqlci:
> select * from trafodion.usr.t3;
>
> I set dbg on all mx* processes.
>
> No success, the code won't breat on the break point.
>
> Any clue would be greatly appreciated :-), Regards, Eric Owhadi
>


Re: Learning the code, help would be appreciated

Posted by Eric Owhadi <er...@esgyn.com>.
Thanks all, Anoop's answer worked, I can step into the code :-),
Thanks,
Eric

On Wed, Jul 15, 2015 at 3:37 PM, Dave Birdsall <da...@esgyn.com>
wrote:

> Hi Eric,
>
> The file name is ExHbaseSelect.cpp (note the lower case 'b'), so perhaps
> that's the problem. You could equally well try putting a breakpoint at
> ExHbaseScanTaskTcb::work. The work method is called at least once each time
> the statement is executed.
>
> A simple way to get started is to test using sqlci on platform. You can
> just "gdb sqlci", then "start" then "b ExHbaseScanTaskTcb::work". For
> simple serial plans you should get a hit in the sqlci process itself. (If
> you have a parallel plan, then this method would get hit in the ESPs
> instead.)
>
> Dave
>
> On Wed, Jul 15, 2015 at 1:26 PM, Eric Owhadi <er...@esgyn.com>
> wrote:
>
> > I am getting familiar with the Trafodion code. In particular, I am
> > interested to see the hbase interfaces. So I installed the dev
> environment,
> > added Eclipse with the CDT pluggin to be able to debug both C++ and java
> > code.
> >
> > I was hoping to set a breakpoint at:
> > ExHBaseSelect.cpp, line 68, where I would have guessed
> > case SCAN_OPEN:
> > would be hit when I do from sqlci:
> > select * from trafodion.usr.t3;
> >
> > I set dbg on all mx* processes.
> >
> > No success, the code won't breat on the break point.
> >
> > Any clue would be greatly appreciated :-),
> > Regards,
> > Eric Owhadi
> >
>

Re: Learning the code, help would be appreciated

Posted by Dave Birdsall <da...@esgyn.com>.
Hi Eric,

The file name is ExHbaseSelect.cpp (note the lower case 'b'), so perhaps
that's the problem. You could equally well try putting a breakpoint at
ExHbaseScanTaskTcb::work. The work method is called at least once each time
the statement is executed.

A simple way to get started is to test using sqlci on platform. You can
just "gdb sqlci", then "start" then "b ExHbaseScanTaskTcb::work". For
simple serial plans you should get a hit in the sqlci process itself. (If
you have a parallel plan, then this method would get hit in the ESPs
instead.)

Dave

On Wed, Jul 15, 2015 at 1:26 PM, Eric Owhadi <er...@esgyn.com> wrote:

> I am getting familiar with the Trafodion code. In particular, I am
> interested to see the hbase interfaces. So I installed the dev environment,
> added Eclipse with the CDT pluggin to be able to debug both C++ and java
> code.
>
> I was hoping to set a breakpoint at:
> ExHBaseSelect.cpp, line 68, where I would have guessed
> case SCAN_OPEN:
> would be hit when I do from sqlci:
> select * from trafodion.usr.t3;
>
> I set dbg on all mx* processes.
>
> No success, the code won't breat on the break point.
>
> Any clue would be greatly appreciated :-),
> Regards,
> Eric Owhadi
>

Re: Learning the code, help would be appreciated

Posted by Selva Govindarajan <se...@esgyn.com>.
Hi Eric,

Here is brief summary of the Trafodion execution engine code structure. I
hope this would help you to set the breakpoint.

cli directory contains the implementation of Call level Interfaces from the
application like sqlci, mxosrvr.
executor directory contains the implementation for all theTask Control
Blocks (TCBs). These Tcbs tasks are scheduled by the scheduler
(ExScheduler.cpp) to execute the given query.
exp directory contains the implementation of the all the expressions that
are evaluated as part of the executing above the tasks.

In case of Hbase, the executor tasks implementation are in
ExHBaseSelect.cpp ExHBaseAccess.cpp and ExHbaseIUD.cpp

These tasks issue hbase API by transitioning from JNI to java. JNI portion
of the code is HBaseClient_JNI.cpp and all the related java files are in
the same directory.

Try putting a breakpoint in the above JNI and java files.

Selva

On Wed, Jul 15, 2015 at 1:26 PM, Eric Owhadi <er...@esgyn.com> wrote:

> I am getting familiar with the Trafodion code. In particular, I am
> interested to see the hbase interfaces. So I installed the dev environment,
> added Eclipse with the CDT pluggin to be able to debug both C++ and java
> code.
>
> I was hoping to set a breakpoint at:
> ExHBaseSelect.cpp, line 68, where I would have guessed
> case SCAN_OPEN:
> would be hit when I do from sqlci:
> select * from trafodion.usr.t3;
>
> I set dbg on all mx* processes.
>
> No success, the code won't breat on the break point.
>
> Any clue would be greatly appreciated :-),
> Regards,
> Eric Owhadi
>