Skip to content

HIVE-28081: Code refine on ClearDanglingScratchDir::removeLocalTmpFiles#5090

Merged
zhangbutao merged 1 commit into
apache:masterfrom
zhangbutao:HIVE-28081
Feb 21, 2024
Merged

HIVE-28081: Code refine on ClearDanglingScratchDir::removeLocalTmpFiles#5090
zhangbutao merged 1 commit into
apache:masterfrom
zhangbutao:HIVE-28081

Conversation

@zhangbutao

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Why are the changes needed?

Code refine. Make code more readable.

Does this PR introduce any user-facing change?

No

Is the change a dependency upgrade?

No

How was this patch tested?

Existing UT.

if (file.canWrite() && file.delete()) {
consoleMessage("While removing '" + sessionName + "' dangling scratch dir from HDFS, "
+ "local tmp session file '" + file.getPath() + "' has been cleaned as well.");
} else if (file.getName().startsWith(sessionName)) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

See Line 254, file in here is already startsWith(sessionName), so no need check this again.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
2 New issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@zabetak zabetak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@zhangbutao zhangbutao merged commit eb79f40 into apache:master Feb 21, 2024
dengzhhu653 pushed a commit to dengzhhu653/hive that referenced this pull request Mar 7, 2024
…es (apache#5090)(Butao Zhang, reviewed by okumin, Stamatis Zampetakis)
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.

4 participants