Yelp / pyleus

Pyleus is a Python framework for developing and launching Storm topologies.
Apache License 2.0
404 stars 113 forks source link

logging example: time gets truncated #68

Closed johanneshk closed 9 years ago

johanneshk commented 9 years ago

Hi, I'm quite new to pyleus and GitHub, so I hope what I do and write here makes sense...

log = logging.getLogger("logging_example.line_spout")
2014-11-13 18:58:55,514 logging_example.line_spout INFO Emitted:   1415901535.511
2014-11-13 18:58:55,516 logging_example.logger_bolt INFO Received: 1415901568.0
2014-11-13 18:59:00,583 logging_example.line_spout INFO Emitted:   1415901540.582474
2014-11-13 18:59:00,583 logging_example.logger_bolt INFO Received: 1415901568.0

Debug output looks as follows:

21558 [Thread-9-line-spout] INFO  backtype.storm.daemon.task - Emitting: line-spout default [1.41590157E9]
21559 [Thread-11-logger-bolt] INFO  backtype.storm.daemon.executor - Processing received message source: line-spout:2, stream: default, id: {}, [1.41590157E9]

As you can see received timestamps differ from emitted timestamps. It gets truncated in a strange way and all those numbers don't fit together.

A simple workaround is to encapsulate the time using json. Is something going wrong when communicating the values between storm and python or am I on the wrong track!?

patricklucas commented 9 years ago

I believe this issue was fixed in #53, which is unreleased but will be included in v0.2.3. I'll try to coordinate that release in the next few days.

Thanks for the input!

patricklucas commented 9 years ago

@smoy fixed the logging issue in #69.

johanneshk commented 9 years ago

Thanks!