-RE: Debugging Coprocessor code in Eclipse
Ramkrishna.S.Vasudevan 2012-10-15, 05:03
We also do a lot of stuff with coprocessors MasterObservers, RegionObservers
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
"$CLASSPATH" $CLASS "$@
Hope this helps.
> -----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
> some other coprocessor stuff. For testing this stuff, i have to deploy
> jar on the cluster and put in a lot of logging to understand the
> 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
> 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
> 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
> the HBase Standalone instance from a eclipse java project. Run
> Thanks & Regards,
> Anil Gupta