2
votes

I have a very simple Storm bolt that takes input from a Kafka spout and should just write to standard output. It extends BaseRichBolt. The two pertinent methods are:

  public void prepare(Map stormConfig,
                      TopologyContext context,
                      OutputCollector collector)
    {
    collector_ = collector;
    logger_.info("TestEchoBolt prepared.");
    System.out.println("TestEchoBolt prepared.");
    }

  public void execute(Tuple input)
    {
    logger_.info(input.getFields().toString());
    System.out.println(input.getFields().toString());
    collector_.ack(input);
    }

It's wired up like this:

    builder_ = new TopologyBuilder();
    builder_.setSpout("kafka-spout",kafkaSpout,1);
    builder_.setBolt("echo-bolt",echoBolt)
            .shuffleGrouping("kafka-spout");

I see output from the constructor when I submit the topology to a cluster running on my local machine, but I never see any output from the bolt. The Storm UI shows tuples being emitted, executed, and acked, with no errors.

Where's my output?

(This is Storm 0.9.5 and Kafka 0.8.2.1.)

1
System.out should be redirected to the worker log files. - Matthias J. Sax
storm.local.dir is set to "/tmp/storm", but I don't see any log files in the worker directory. - Patrick
Log files are located in $STORM_HOME/logs (storm.local.dir is for internal execution stuff) - Matthias J. Sax
That was it. I needed to set storm.log.dir to get them where I want. Thanks! - Patrick
How about leaving self answer and accept it so that others can have a great reference? - Jungtaek Lim

1 Answers

1
votes

Matthias had the correct answer in the comments. All output goes to $STORM_HOME/logs unless the storm.log.dir property is set in $STORM_HOME/conf/storm.yaml.

The output will be in the .../logs/worker-*.log files.