|
|
-
Debugging Coprocessor code in Eclipse
anil gupta 2012-10-14, 23:58
Hi All,
I am using HBase0.92.1 and currently working on HBase RegionObserver and some other coprocessor stuff. For testing this stuff, i have to deploy my jar on the cluster and put in a lot of logging to understand the problems, if any. Is there a way to debug my region observer within eclipse. Please share your experiences/suggestions on debugging co-processors.
I am able to debug filters and other client side code from eclipse by remotely connecting to cluster. But, i am unable to find a way to debug the code which runs within RegionServers.
Here is my random thought: I think i would be able to debug the co-processor code if i run the Stand-alone HBase instance from a eclipse java project which contains the java source code of HBase0.92.1 and my Region Observer.
If the above seems like a feasible idea, then please let me know how to run the HBase Standalone instance from a eclipse java project. Run Configurations?Jars?
-- Thanks & Regards, Anil Gupta
+
anil gupta 2012-10-14, 23:58
-
RE: Debugging Coprocessor code in Eclipse
Ramkrishna.S.Vasudevan 2012-10-15, 05:03
Hi Anil
We also do a lot of stuff with coprocessors MasterObservers, RegionObservers and WALObservers. Just start your master and RS in debug mode and connect remotely from eclipse. This should be fine. Whenever the code goes to the RegionObserver or any observers automatically you will be able to debug. Only thing is ensure that the JAR that is running remotely and your current source code are in sync. Otherwise you may not go thro the exact lines.
You can add debug mode to your JAVA_OPTS like this exec "$JAVA" $JAVA_HEAP_MAX $HBASE_OPTS -Xrunjdwp:transport=dt_socket,address=4530,server=y,suspend=n -classpath "$CLASSPATH" $CLASS "$@
Hope this helps.
Regards Ram > -----Original Message----- > From: anil gupta [mailto:[EMAIL PROTECTED]] > Sent: Monday, October 15, 2012 5:29 AM > To: [EMAIL PROTECTED] > Subject: Debugging Coprocessor code in Eclipse > > Hi All, > > I am using HBase0.92.1 and currently working on HBase RegionObserver > and > some other coprocessor stuff. For testing this stuff, i have to deploy > my > jar on the cluster and put in a lot of logging to understand the > problems, > if any. > Is there a way to debug my region observer within eclipse. Please share > your experiences/suggestions on debugging co-processors. > > I am able to debug filters and other client side code from eclipse by > remotely connecting to cluster. But, i am unable to find a way to debug > the > code which runs within RegionServers. > > Here is my random thought: > I think i would be able to debug the co-processor code if i run the > Stand-alone HBase instance from a eclipse java project which contains > the > java source code of HBase0.92.1 and my Region Observer. > > If the above seems like a feasible idea, then please let me know how to > run > the HBase Standalone instance from a eclipse java project. Run > Configurations?Jars? > > -- > Thanks & Regards, > Anil Gupta
+
Ramkrishna.S.Vasudevan 2012-10-15, 05:03
-
Re: Debugging Coprocessor code in Eclipse
anil gupta 2012-10-16, 16:46
Hi Ram,
Thanks for your reply. I'll be trying your suggestions soon with the my local standalone installation of HBase and update this thread.
Thanks, Anil Gupta
On Mon, Oct 15, 2012 at 12:03 AM, Ramkrishna.S.Vasudevan < [EMAIL PROTECTED]> wrote:
> Hi Anil > > We also do a lot of stuff with coprocessors MasterObservers, > RegionObservers > and WALObservers. > Just start your master and RS in debug mode and connect remotely from > eclipse. This should be fine. Whenever the code goes to the > RegionObserver > or any observers automatically you will be able to debug. Only thing is > ensure that the JAR that is running remotely and your current source code > are in sync. Otherwise you may not go thro the exact lines. > > You can add debug mode to your JAVA_OPTS like this > exec "$JAVA" $JAVA_HEAP_MAX $HBASE_OPTS > -Xrunjdwp:transport=dt_socket,address=4530,server=y,suspend=n -classpath > "$CLASSPATH" $CLASS "$@ > > Hope this helps. > > Regards > Ram > > > > -----Original Message----- > > From: anil gupta [mailto:[EMAIL PROTECTED]] > > Sent: Monday, October 15, 2012 5:29 AM > > To: [EMAIL PROTECTED] > > Subject: Debugging Coprocessor code in Eclipse > > > > Hi All, > > > > I am using HBase0.92.1 and currently working on HBase RegionObserver > > and > > some other coprocessor stuff. For testing this stuff, i have to deploy > > my > > jar on the cluster and put in a lot of logging to understand the > > problems, > > if any. > > Is there a way to debug my region observer within eclipse. Please share > > your experiences/suggestions on debugging co-processors. > > > > I am able to debug filters and other client side code from eclipse by > > remotely connecting to cluster. But, i am unable to find a way to debug > > the > > code which runs within RegionServers. > > > > Here is my random thought: > > I think i would be able to debug the co-processor code if i run the > > Stand-alone HBase instance from a eclipse java project which contains > > the > > java source code of HBase0.92.1 and my Region Observer. > > > > If the above seems like a feasible idea, then please let me know how to > > run > > the HBase Standalone instance from a eclipse java project. Run > > Configurations?Jars? > > > > -- > > Thanks & Regards, > > Anil Gupta > > -- Thanks & Regards, Anil Gupta
+
anil gupta 2012-10-16, 16:46
-
Re: Debugging Coprocessor code in Eclipse
Eugeny Morozov 2012-10-16, 20:17
Anil,
you could've also get some benefit from using HBaseTestingUtility. It is able to run HBase cluster in standalone mode all-in-one JVM. Of course it requires to have some code to create tables, assign coprocessor to table and populate it with data. And then run client code against it.
All of that could be done using Unit tests framework, which will give you ability to test the whole server.
It also possible that HBase will be crashed by itself due to timeouts, but having this kind of preparation would allow you to restart it in a matter of seconds to continue debuggind.
Hope this helps.
On Tue, Oct 16, 2012 at 8:46 PM, anil gupta <[EMAIL PROTECTED]> wrote:
> Hi Ram, > > Thanks for your reply. I'll be trying your suggestions soon with the my > local standalone installation of HBase and update this thread. > > Thanks, > Anil Gupta > > On Mon, Oct 15, 2012 at 12:03 AM, Ramkrishna.S.Vasudevan < > [EMAIL PROTECTED]> wrote: > > > Hi Anil > > > > We also do a lot of stuff with coprocessors MasterObservers, > > RegionObservers > > and WALObservers. > > Just start your master and RS in debug mode and connect remotely from > > eclipse. This should be fine. Whenever the code goes to the > > RegionObserver > > or any observers automatically you will be able to debug. Only thing is > > ensure that the JAR that is running remotely and your current source code > > are in sync. Otherwise you may not go thro the exact lines. > > > > You can add debug mode to your JAVA_OPTS like this > > exec "$JAVA" $JAVA_HEAP_MAX $HBASE_OPTS > > -Xrunjdwp:transport=dt_socket,address=4530,server=y,suspend=n -classpath > > "$CLASSPATH" $CLASS "$@ > > > > Hope this helps. > > > > Regards > > Ram > > > > > > > -----Original Message----- > > > From: anil gupta [mailto:[EMAIL PROTECTED]] > > > Sent: Monday, October 15, 2012 5:29 AM > > > To: [EMAIL PROTECTED] > > > Subject: Debugging Coprocessor code in Eclipse > > > > > > Hi All, > > > > > > I am using HBase0.92.1 and currently working on HBase RegionObserver > > > and > > > some other coprocessor stuff. For testing this stuff, i have to deploy > > > my > > > jar on the cluster and put in a lot of logging to understand the > > > problems, > > > if any. > > > Is there a way to debug my region observer within eclipse. Please share > > > your experiences/suggestions on debugging co-processors. > > > > > > I am able to debug filters and other client side code from eclipse by > > > remotely connecting to cluster. But, i am unable to find a way to debug > > > the > > > code which runs within RegionServers. > > > > > > Here is my random thought: > > > I think i would be able to debug the co-processor code if i run the > > > Stand-alone HBase instance from a eclipse java project which contains > > > the > > > java source code of HBase0.92.1 and my Region Observer. > > > > > > If the above seems like a feasible idea, then please let me know how to > > > run > > > the HBase Standalone instance from a eclipse java project. Run > > > Configurations?Jars? > > > > > > -- > > > Thanks & Regards, > > > Anil Gupta > > > > > > > -- > Thanks & Regards, > Anil Gupta >
-- Evgeny Morozov Developer Grid Dynamics Skype: morozov.evgeny www.griddynamics.com [EMAIL PROTECTED]
+
Eugeny Morozov 2012-10-16, 20:17
-
Re: Debugging Coprocessor code in Eclipse
anil gupta 2012-10-16, 20:52
Hi Eugeny,
Thanks for another nice suggestion.
Thanks, Anil
On Tue, Oct 16, 2012 at 1:17 PM, Eugeny Morozov <[EMAIL PROTECTED]>wrote:
> Anil, > > you could've also get some benefit from using HBaseTestingUtility. It is > able to run HBase cluster in standalone mode all-in-one JVM. Of course it > requires to have some code to create tables, assign coprocessor to table > and populate it with data. And then run client code against it. > > All of that could be done using Unit tests framework, which will give you > ability to test the whole server. > > It also possible that HBase will be crashed by itself due to timeouts, but > having this kind of preparation would allow you to restart it in a matter > of seconds to continue debuggind. > > Hope this helps. > > On Tue, Oct 16, 2012 at 8:46 PM, anil gupta <[EMAIL PROTECTED]> wrote: > > > Hi Ram, > > > > Thanks for your reply. I'll be trying your suggestions soon with the my > > local standalone installation of HBase and update this thread. > > > > Thanks, > > Anil Gupta > > > > On Mon, Oct 15, 2012 at 12:03 AM, Ramkrishna.S.Vasudevan < > > [EMAIL PROTECTED]> wrote: > > > > > Hi Anil > > > > > > We also do a lot of stuff with coprocessors MasterObservers, > > > RegionObservers > > > and WALObservers. > > > Just start your master and RS in debug mode and connect remotely from > > > eclipse. This should be fine. Whenever the code goes to the > > > RegionObserver > > > or any observers automatically you will be able to debug. Only thing > is > > > ensure that the JAR that is running remotely and your current source > code > > > are in sync. Otherwise you may not go thro the exact lines. > > > > > > You can add debug mode to your JAVA_OPTS like this > > > exec "$JAVA" $JAVA_HEAP_MAX $HBASE_OPTS > > > -Xrunjdwp:transport=dt_socket,address=4530,server=y,suspend=n > -classpath > > > "$CLASSPATH" $CLASS "$@ > > > > > > Hope this helps. > > > > > > Regards > > > Ram > > > > > > > > > > -----Original Message----- > > > > From: anil gupta [mailto:[EMAIL PROTECTED]] > > > > Sent: Monday, October 15, 2012 5:29 AM > > > > To: [EMAIL PROTECTED] > > > > Subject: Debugging Coprocessor code in Eclipse > > > > > > > > Hi All, > > > > > > > > I am using HBase0.92.1 and currently working on HBase RegionObserver > > > > and > > > > some other coprocessor stuff. For testing this stuff, i have to > deploy > > > > my > > > > jar on the cluster and put in a lot of logging to understand the > > > > problems, > > > > if any. > > > > Is there a way to debug my region observer within eclipse. Please > share > > > > your experiences/suggestions on debugging co-processors. > > > > > > > > I am able to debug filters and other client side code from eclipse by > > > > remotely connecting to cluster. But, i am unable to find a way to > debug > > > > the > > > > code which runs within RegionServers. > > > > > > > > Here is my random thought: > > > > I think i would be able to debug the co-processor code if i run the > > > > Stand-alone HBase instance from a eclipse java project which contains > > > > the > > > > java source code of HBase0.92.1 and my Region Observer. > > > > > > > > If the above seems like a feasible idea, then please let me know how > to > > > > run > > > > the HBase Standalone instance from a eclipse java project. Run > > > > Configurations?Jars? > > > > > > > > -- > > > > Thanks & Regards, > > > > Anil Gupta > > > > > > > > > > > > -- > > Thanks & Regards, > > Anil Gupta > > > > > > -- > Evgeny Morozov > Developer Grid Dynamics > Skype: morozov.evgeny > www.griddynamics.com > [EMAIL PROTECTED] >
-- Thanks & Regards, Anil Gupta
+
anil gupta 2012-10-16, 20:52
-
RE: Debugging Coprocessor code in Eclipse
Ramkrishna.S.Vasudevan 2012-10-17, 04:09
Just adding on to Eugeny Do you have the HBase code? There are quite a few testcases that adds coprocessors. May be if you go thro them and run them in debug mode in eclipse will help you too.
Regards Ram
> -----Original Message----- > From: anil gupta [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 17, 2012 2:23 AM > To: [EMAIL PROTECTED] > Subject: Re: Debugging Coprocessor code in Eclipse > > Hi Eugeny, > > Thanks for another nice suggestion. > > Thanks, > Anil > > On Tue, Oct 16, 2012 at 1:17 PM, Eugeny Morozov > <[EMAIL PROTECTED]>wrote: > > > Anil, > > > > you could've also get some benefit from using HBaseTestingUtility. It > is > > able to run HBase cluster in standalone mode all-in-one JVM. Of > course it > > requires to have some code to create tables, assign coprocessor to > table > > and populate it with data. And then run client code against it. > > > > All of that could be done using Unit tests framework, which will give > you > > ability to test the whole server. > > > > It also possible that HBase will be crashed by itself due to > timeouts, but > > having this kind of preparation would allow you to restart it in a > matter > > of seconds to continue debuggind. > > > > Hope this helps. > > > > On Tue, Oct 16, 2012 at 8:46 PM, anil gupta <[EMAIL PROTECTED]> > wrote: > > > > > Hi Ram, > > > > > > Thanks for your reply. I'll be trying your suggestions soon with > the my > > > local standalone installation of HBase and update this thread. > > > > > > Thanks, > > > Anil Gupta > > > > > > On Mon, Oct 15, 2012 at 12:03 AM, Ramkrishna.S.Vasudevan < > > > [EMAIL PROTECTED]> wrote: > > > > > > > Hi Anil > > > > > > > > We also do a lot of stuff with coprocessors MasterObservers, > > > > RegionObservers > > > > and WALObservers. > > > > Just start your master and RS in debug mode and connect remotely > from > > > > eclipse. This should be fine. Whenever the code goes to the > > > > RegionObserver > > > > or any observers automatically you will be able to debug. Only > thing > > is > > > > ensure that the JAR that is running remotely and your current > source > > code > > > > are in sync. Otherwise you may not go thro the exact lines. > > > > > > > > You can add debug mode to your JAVA_OPTS like this > > > > exec "$JAVA" $JAVA_HEAP_MAX $HBASE_OPTS > > > > -Xrunjdwp:transport=dt_socket,address=4530,server=y,suspend=n > > -classpath > > > > "$CLASSPATH" $CLASS "$@ > > > > > > > > Hope this helps. > > > > > > > > Regards > > > > Ram > > > > > > > > > > > > > -----Original Message----- > > > > > From: anil gupta [mailto:[EMAIL PROTECTED]] > > > > > Sent: Monday, October 15, 2012 5:29 AM > > > > > To: [EMAIL PROTECTED] > > > > > Subject: Debugging Coprocessor code in Eclipse > > > > > > > > > > Hi All, > > > > > > > > > > I am using HBase0.92.1 and currently working on HBase > RegionObserver > > > > > and > > > > > some other coprocessor stuff. For testing this stuff, i have to > > deploy > > > > > my > > > > > jar on the cluster and put in a lot of logging to understand > the > > > > > problems, > > > > > if any. > > > > > Is there a way to debug my region observer within eclipse. > Please > > share > > > > > your experiences/suggestions on debugging co-processors. > > > > > > > > > > I am able to debug filters and other client side code from > eclipse by > > > > > remotely connecting to cluster. But, i am unable to find a way > to > > debug > > > > > the > > > > > code which runs within RegionServers. > > > > > > > > > > Here is my random thought: > > > > > I think i would be able to debug the co-processor code if i run > the > > > > > Stand-alone HBase instance from a eclipse java project which > contains > > > > > the > > > > > java source code of HBase0.92.1 and my Region Observer. > > > > > > > > > > If the above seems like a feasible idea, then please let me > know how > > to > > > > > run > > > > > the HBase Standalone instance from a eclipse java project. Run
+
Ramkrishna.S.Vasudevan 2012-10-17, 04:09
-
Re: Debugging Coprocessor code in Eclipse
yuling 2012-10-17, 00:58
Hi,
I'm new to HBase and also using coprocessor...just wondering how to start HBase server in debug mode?(I'm using single node mode)... so that I can attach a remote debugger from eclipse?
Thanks,
YuLing
+
yuling 2012-10-17, 00:58
|
|