Skip to content

Conversation

@abstractdog
Copy link
Contributor

@abstractdog abstractdog commented Nov 3, 2025

What changes were proposed in this pull request?

Encapsulate a wider code path in error-handling while opening a Tez session.

Why are the changes needed?

A scratch directory can leak if an exception is thrown after it’s created and resources have been placed into it.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Unit test added.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 4, 2025

@abstractdog
Copy link
Contributor Author

Quality Gate Passed Quality Gate passed

Issues 2 New issues 0 Accepted issues

Measures 0 Security Hotspots 0.0% Coverage on New Code 0.0% Duplication on New Code

See analysis details on SonarQube Cloud

not about to handle this:

[Either log this exception and handle it, or rethrow it with some contextual information.](https://sonarcloud.io/project/issues?pullRequest=6161&open=AZpLt4QCPQuC7unSj798&id=apache_hive)

no more useful contextual information can be added here than "hey, I caught this exception, cleaned up, and now re-throwing the session open failure exception"

@Aggarwal-Raghav
Copy link
Contributor

Changes makes sense to me, to cleanup scratch directory in case of exception before startSessionAndContainers() in openInternal() method

LGTM +1 (non-binding)

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