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

Mayank Bansal commented on MAPREDUCE-4367:
------------------------------------------

Hi Vinod,

Thanks for the review.

Let me explain why I did the changes the way it is in the patch.

In CLI.java, Kill job code path calls this

Job job = cluster.getJob(JobID.forName(jobid));

Which actually result in to the client.getstatus.

When we create the client object it checks if the history server is
configured and if yes then it creates the proxy. Once the client is
created it gets cached in the client cache which is been used for all
the calls.

Now, for any call we use this client object from the cache and in kill
command we use that as well and thats when all the calls are
transferred to History server.

What we are trying to do here is for kill only we dont want to go to
History server so we can not use the same client object from the cache
otherwise it will go to HS. However we need client object which
has History server references for all other calls because think about
the situation when client get the job status with HS which returns
counters etc in this case if we replace client object (without HS)
then client code will start failing (Thanks to Sid pointing this case
out to me).

So for kill command we need client object without HS.

As you suggested ClientServiceDelegate.getProxy() should take some
parameter however it can not be done as actually the call is not kill it
is getjobstatus.

For minimrcluster I think we can not get the History server handle
directly and tharts the reason I made that change. 

Let me do the change for KillTask.

Let me know your thoughts.

Thanks,
Mayank
                
> mapred job -kill tries to connect to history server
> ---------------------------------------------------
>
>                 Key: MAPREDUCE-4367
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4367
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: client, mrv2
>    Affects Versions: 0.23.3
>            Reporter: Jason Lowe
>            Assignee: Mayank Bansal
>            Priority: Minor
>         Attachments: MAPREDUCE-4367-trunk-v1.patch, 
> MAPREDUCE-4367-trunk-v2.patch
>
>
> The {{mapred job -kill}} command attempts to connect to the history server, 
> even though it is unrelated to the process of killing a job.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to