[ 
https://issues.apache.org/jira/browse/SAMZA-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13837013#comment-13837013
 ] 

Chris Riccomini commented on SAMZA-90:
--------------------------------------

Yea, head.getStream is probably not the best idea for the reason Jakob 
mentioned. Also, I generally prefer a headOption(throw new 
SamzaException("....")) style, that way we get good error messages, instead of 
the typical head is None exception.

I'm cool with toString just being the task instance class name, and partition. 
The rest can be in toDetailedString.

Also, I don't think putting the input streams in the toString or 
toDetailedString makes much sense since we already get it from the config log 
line in the SamzaContainer. Everything on my list is dynamic, and not part of 
static config.

> Provide meaningful toString for task instances
> ----------------------------------------------
>
>                 Key: SAMZA-90
>                 URL: https://issues.apache.org/jira/browse/SAMZA-90
>             Project: Samza
>          Issue Type: Improvement
>          Components: container
>    Affects Versions: 0.6.0
>            Reporter: Jakob Homan
>            Assignee: Rekha Joshi
>              Labels: newbie
>             Fix For: 0.7.0
>
>         Attachments: SAMZA-90.0.patch
>
>
> Right now if one logs from within a StreamTask, the toString looks a little 
> something like this:
> {noformat}
> 2013-11-25 23:34:33 AssembleCallGraph [INFO] In window: 
> com.linkedin.samsa.jobs.AssembleCallGraph@5782b9b5{noformat}
> This is less than useful when a container is responsible for more than one 
> task instance.  
> When creating the task instance we should override toString with the topics 
> and partition it is reponsible for, to make it easier to grok during logging.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to