Skip to content

[K8S] Update Comment for k8s applicationId#24791

Closed
zhangmeng0426 wants to merge 3 commits intoapache:masterfrom
zhangmeng0426:master
Closed

[K8S] Update Comment for k8s applicationId#24791
zhangmeng0426 wants to merge 3 commits intoapache:masterfrom
zhangmeng0426:master

Conversation

@zhangmeng0426
Copy link

What changes were proposed in this pull request?

  update comment of applicationid, add case of k8s.

(Please fill in changes proposed in this fix)

How was this patch tested?

(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)

Please review https://spark.apache.org/contributing.html before opening a pull request.

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

* in case of local spark app something like 'local-1433865536131'
* in case of YARN something like 'application_1433865536131_34483'
* in case of MESOS something like 'driver-20170926223339-0001'
* in case of Kubernetes something like 'spark-application-1559610575898'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skonto is this correct?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srowen This is not true for cluster mode. In cluster mode application_id is set here in the Spark Context and this value is retrieved from here. But it does not default to:

  private val appId = "spark-application-" + System.currentTimeMillis

as it is overridden in here:

  override def applicationId(): String = backend.applicationId()

The K8s backend will set that value here:

 conf.getOption("spark.app.id").map(_.toString).getOrElse(super.applicationId)

For cluster mode the spark.app.id is always set here to be:

val kubernetesAppId = s"spark-${UUID.randomUUID().toString.replaceAll("-", "")}"

An example: Spark Application Id: spark-3d4ef94a42e1428c9658f13573abfa38

@skonto
Copy link
Contributor

skonto commented Jun 7, 2019

@zhangmeng0426 pls update the PR title to include the related jira ticket that addresses this issue and also add related component eg. [SPARK-XXXXX][K8s]

@zhangmeng0426 zhangmeng0426 changed the title update Comment for k8s applicationId update Comment for k8s applicationId [spark-24791][k8s] Jun 10, 2019
@dongjoon-hyun dongjoon-hyun changed the title update Comment for k8s applicationId [spark-24791][k8s] [SPARK-24791][K8S] Update Comment for k8s applicationId Jun 13, 2019
@dongjoon-hyun dongjoon-hyun changed the title [SPARK-24791][K8S] Update Comment for k8s applicationId [K8S] Update Comment for k8s applicationId Jun 13, 2019
@dongjoon-hyun
Copy link
Member

dongjoon-hyun commented Jun 13, 2019

@zhangjiajin . This is not spark-24791. Did you create a JIRA ID? You need to use your JIRA id for this.

@srowen
Copy link
Member

srowen commented Jun 13, 2019

Per #24791 (comment) this looks incorrect anyway.

@srowen srowen closed this Jun 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants