Remote debugging Flume's custom source and logging

517 views Asked by At

I have a custom source for my Flume (version 1.5.0) agent and I want to debug it. It's actually custom Twitter source, from Cloudera's example here. I have a number of questions:

(1) Is it possible to remote debug the Flume source (written in Java) when I run the Flume agent?

In addition, when I run the agent, I have this option

-Dflume.root.logger=DEBUG,console

but it seems that the logger.debugs that I have in the Java source are not appearing in the terminal. (2) How do I make my logs appear? What's missing in my Flume or logging configuration?

(3) If I'm able to make the logs appear, how do I print to the file the console output of my Flume source logger.debugs only, excluding Flume agent's own logs?

Thanks.

1

There are 1 answers

0
Tinkaal Gogoi On

Use following arguments for the JVM running flume agent as specified in the link http://stackoverflow.com/a/22631355/1660002 .

EX- For newer JDK(for me 1.8) :

-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=6006

And you can connect to that remote port in the address field using IntelliJ or any other IDE remote debugging