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

AMBARI-25882 Fix clusterId NPE error on service operation execution #3655

Merged
merged 1 commit into from Mar 6, 2023

Conversation

JiaLiangC
Copy link
Contributor

@JiaLiangC JiaLiangC commented Mar 2, 2023

What changes were proposed in this pull request?

AgentCommandsPublisher can't get clusterId from execution command, cause it's not set in addGenericExecutionCommand( Stage.java) method.

Why did the action succeed in the end after throw a NPE error? Because it finally reload it from database if find cluster id is not set properlly.

how to fix:
all the Stage construction method include the cluster id ,so just set in the addGenericExecutionCommand

How was this patch tested?

before fixed,if you try to restart spark or any other components ,NPE error in log
image

after fixed,
image

(Please explain how this patch was tested. Ex: unit tests, manual tests)
(If this patch involves UI changes, please attach a screen-shot; otherwise, remove this)

Please review Ambari Contributing Guide before opening a pull request.

@smallyao
Copy link
Contributor

smallyao commented Mar 6, 2023

Thanks @JiaLiangC

@smallyao smallyao merged commit d81000f into apache:trunk Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants