[
https://issues.apache.org/jira/browse/SAMZA-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13841876#comment-13841876
]
Chris Riccomini commented on SAMZA-90:
--------------------------------------
{code}
override def toString() = "TaskInstance for topic %s and partition %s."
format (task.getClass.getName , partition)
{code}
I think "topic" should be "class" here.
{code}
def toDetailedString() = "TaskInstance is windowable task %s with last window
time of %d and last commit at %d.\nThis task is Closeable %s with envelope size
of %d" format (isWindowableTask, lastWindowMs, lastCommitMs, isClosableTask,
collector.envelopes.size)
{code}
I kind of prefer a more succinct style. Something like:
{noformat}
TaskInstance [windowable=%s, window_time=%s, commit_time=%s, closable=%s,
collector_size=%s]
{noformat}
What do you guys think?
Also, prefer %s to %d, because Scala throws exceptions if a string is
accidentally put into a %d.
> 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, SAMZA-90.1.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)