You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2020/08/31 08:30:46 UTC

[GitHub] [incubator-yunikorn-k8shim] kingamarton commented on a change in pull request #185: [YUNIKORN-386] Passed spark appID in annotation

kingamarton commented on a change in pull request #185:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/185#discussion_r479977842



##########
File path: pkg/common/utils/utils.go
##########
@@ -82,24 +82,30 @@ func GetQueueNameFromPod(pod *v1.Pod) string {
 }
 
 func GetApplicationIDFromPod(pod *v1.Pod) (string, error) {
-	for name, value := range pod.Labels {
-		// if a pod for spark already provided appID, reuse it
-		if name == constants.SparkLabelAppID {
+	// application ID can be defined in annotations
+	for name, value := range pod.Annotations {
+		if name == constants.LabelApplicationID {
+			return value, nil
+		}

Review comment:
       Is not the same. Here we check the annotations and in lines 89-100 we check the labels




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org