[ 
https://issues.apache.org/jira/browse/SPARK-37461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

angerszhu updated SPARK-37461:
------------------------------
    Description: 
In yarn-client mode, *Client.appId* variable is not assigned, it is always 
{*}null{*}, in cluster mode, this variable will be assigned to the true value. 
In this patch, we assign true application id to `appId` too.

For client mode, it directly call submitApplication and return appId to 
YarnClientSchedulerBackend.buildtoYarn(). So for client mode, we only can 
assign ApplicationId to appId in submitApplication. Then since this value is 
assigned. so We don't need to add a new variable appId in 
`createContainerLaunchContext()`. and don need assign `this.appId` in `run()`.

  was:
In yarn-client mode, *Client.appId* variable is not assigned, it is always 
`null`, in cluster mode, this variable will be assigned to the true value. In 
this patch, we assign true application id to `appId` too.

For client mode, it directly call submitApplication and return appId to 
YarnClientSchedulerBackend.buildtoYarn(). So for client mode, we only can 
assign ApplicationId to appId in submitApplication. Then since this value is 
assigned. so We don't need to add a new variable appId in 
`createContainerLaunchContext()`. and don need assign `this.appId` in `run()`.


> yarn-client mode client's appid value is null
> ---------------------------------------------
>
>                 Key: SPARK-37461
>                 URL: https://issues.apache.org/jira/browse/SPARK-37461
>             Project: Spark
>          Issue Type: Task
>          Components: YARN
>    Affects Versions: 3.2.0
>            Reporter: angerszhu
>            Assignee: angerszhu
>            Priority: Minor
>             Fix For: 3.3.0
>
>
> In yarn-client mode, *Client.appId* variable is not assigned, it is always 
> {*}null{*}, in cluster mode, this variable will be assigned to the true 
> value. In this patch, we assign true application id to `appId` too.
> For client mode, it directly call submitApplication and return appId to 
> YarnClientSchedulerBackend.buildtoYarn(). So for client mode, we only can 
> assign ApplicationId to appId in submitApplication. Then since this value is 
> assigned. so We don't need to add a new variable appId in 
> `createContainerLaunchContext()`. and don need assign `this.appId` in `run()`.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to