hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gera Shegalov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MAPREDUCE-6298) Job#toString throws an exception when not in state RUNNING
Date Mon, 11 May 2015 18:06:00 GMT

    [ https://issues.apache.org/jira/browse/MAPREDUCE-6298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14538309#comment-14538309

Gera Shegalov commented on MAPREDUCE-6298:

Thanks for the pointer, [~ozawa]! Thanks for the filing the JIRA and the patch, [~lars_francke]!

Having toString rely on RUNNING does not make sense, indeed. I believe the intent is to avoid
doing RPC's for jobs that are finished, or the {{cluster}} is reset. Note the conditions under
which ensureState throws exceptions. I suggest we do this in a more graceful manner. if the
job is known not to be running, simply skip the block with {{updateStatus}} for the conditions
above. However, if {{Job#status}} is already set we should just proceed. Otherwise, return
something to the tune of the patch. 

> Job#toString throws an exception when not in state RUNNING
> ----------------------------------------------------------
>                 Key: MAPREDUCE-6298
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-6298
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>            Reporter: Lars Francke
>            Assignee: Lars Francke
>            Priority: Minor
>              Labels: BB2015-05-TBR
>         Attachments: MAPREDUCE-6298.1.patch
> Job#toString calls {{ensureState(JobState.RUNNING);}} as the very first thing. That method
causes an Exception to be thrown which is not nice.
> One thing this breaks is usage of Job on the Scala (e.g. Spark) REPL as that calls toString
after every invocation and that fails every time.
> I'll attach a patch that checks state and if it's RUNNING prints the original message
and if not prints something else.

This message was sent by Atlassian JIRA

View raw message