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

HIVE-28623: Implement RuntimeContext to decouple runtime data from TezTask #5538

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abstractdog
Copy link
Contributor

@abstractdog abstractdog commented Nov 12, 2024

What changes were proposed in this pull request?

Encapsulate runtime related info to a separate class for later usage.

Why are the changes needed?

Code refactor.

Does this PR introduce any user-facing change?

No.

Is the change a dependency upgrade?

No.

How was this patch tested?

Easy refactor, precommit tests should pass.

@abstractdog
Copy link
Contributor Author

cc: @tanishq-chugh , @ayushtkn
this is the implementation which is brought from the WIP query history

Copy link

sonarcloud bot commented Nov 12, 2024

@@ -125,6 +130,12 @@ public QueryPlan getPlan() {

public void setPlan(QueryPlan plan) {
this.plan = plan;
TezTask task = Utilities.getFirstTezTask(plan.getRootTasks()).orElse(null);
Copy link
Contributor

Choose a reason for hiding this comment

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

@abstractdog After query run completes, when resources are being released by the driver, plan is being set to null and it is causing NullPointerException here, which is present as part of DEBUG logs.

Copy link
Contributor Author

@abstractdog abstractdog Nov 14, 2024

Choose a reason for hiding this comment

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

I see, can you point me to the logs that show this?
btw I made a slight refactor in this area after pushing the original, working version that I used in case of the query history...NPE looks weird as we obtain a reference to the RuntimeContext in setPlan...I guess there are calls when the passed plan is already null, need to null-check I guess

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure
temp.txt

Copy link
Contributor

Choose a reason for hiding this comment

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

this shouldn't cause any issue wrt query execution but just some noise in logs. a null check wrt plan should just be fine.. i guess the one test failure in precommit is as well linked to this ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants