Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spark k8s operator task Added status acquisition #4889

Merged
merged 3 commits into from
Sep 1, 2023

Conversation

ChengJie1053
Copy link
Member

Spark k8s operator task Added status acquisition

@@ -230,4 +230,16 @@ public static SparkApplication getSparkApplication(String sparkOperatorName, Str
sparkApplication.setMetadata(metadata);
return sparkApplication;
}

Copy link
Member

Choose a reason for hiding this comment

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

  1. Modify getSparkApplicationClient return value type to MixedOperation<SparkApplication, SparkApplicationList, Resource<SparkApplication>>
  2. Suggest using the following method to monitor status
getSparkApplicationClient(client).inNamespace(this.sparkConfig.getK8sNamespace()).withName(this.sparkConfig.getAppName()).watch(new Watcher<SparkApplication>() {
      @Override
      public void eventReceived(Action action, SparkApplication sparkApplication) {
        // todo get status
      }

      @Override
      public void onClose(WatcherException e) {

      }
    });

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, thanks for reviewing the code

Copy link
Member

@rarexixi rarexixi left a comment

Choose a reason for hiding this comment

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

LGTM.

@rarexixi rarexixi merged commit 4169e70 into apache:master Sep 1, 2023
12 checks passed
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.

2 participants