hadoop-hdfs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vinayakumar B <vinayakum...@apache.org>
Subject Re: Eclipse debug HDFS server side code
Date Tue, 19 Apr 2016 16:21:48 GMT
Hi Kun Ren,

You can follow the below steps.
1. configure HADOOP_NAMENODE_OPTS="-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=3988" in
2. Start Namenode
3. Now Namenode will start debug port in 3988.
4. Configure Remote debug application to connect to <namenode_host>:3988 in
5. Now add a breakpoint in NameNodeRpcServer.java's any method you want to
debug. NameNodeRpcServer.java is the gateway between NameNode and IPC
Server Layer.
6. Now you can do step-by-step execution to observe the detailed executions.

Happy Debugging ;)


On Tue, Apr 19, 2016 at 8:46 PM, Kun Ren <ren.hdfs@gmail.com> wrote:

> Hi All,
> Currently I used eclipse to compile/debug the source code, and I
> configured the "remote Java application" to debug the source code in
> eclipse, for example, I can debug the  client side code when I run the
> command "./bin/hdfs dfs -mkdir test", it goes through "FsShell--->
> DistributedFileSystem---->DFSClient ....->send request to the server side.
> Then it finish debugging, but I can not see how the server side handle the
> request.
> However, I want to debug and see how the server side(HDFS) handle the
> request? Do you know how I can do this?  Thanks so much. Also when I try to
> add some debug information(such as print out something), but I can not see
> anything printed out in eclipse, I don't know why. Thanks again.
> Best,
> Kun

View raw message