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-28626: Display MoveTask/StatsTask duration on the query summary #5544

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

abstractdog
Copy link
Contributor

@abstractdog abstractdog commented Nov 15, 2024

What changes were proposed in this pull request?

Display MoveTask's and StatsTask's duration on the console.

Why are the changes needed?

Better observability.

Does this PR introduce any user-facing change?

Yes, query output on the console slightly changes.

Is the change a dependency upgrade?

No.

How was this patch tested?

On cluster. Unfortunately, due to HIVE-28627, the console message is broken, works only intermittently, but in the logs, the very same messages appear.

Copy link
Contributor

Choose a reason for hiding this comment

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

Leftover

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, for me, an empty starting line is not expected in case of any methods, that's why I simply removed :)

@@ -569,7 +569,8 @@ public int execute() {
}
releaseLocks(tbd);
}

long moveFilesDuration = perfLogger.getDuration(PerfLogger.FILE_MOVES);
Copy link
Contributor

Choose a reason for hiding this comment

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

Two questions about this:

1.: This method already contains a perfLogEnd call:

      // if _blob_files_kept is present, use it to move the files. Else fall back to normal case.
      if (moveFilesUsingManifestFile(fs, sourcePath, targetPath)) {
        perfLogger.perfLogEnd("MoveTask", PerfLogger.FILE_MOVES);
        return;
      }

Does it stops the perfLogger? If yes, how that change will behave in that case?

2: perfLogEnd is already called at line 196. Can it affect the output of this getDuration call?

Copy link
Contributor Author

@abstractdog abstractdog Nov 15, 2024

Choose a reason for hiding this comment

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

  1. it doesn't stop, just registers and endTime for the duration of FILE_MOVES
  2. yeah, depending on the outcome, the ending time should still be registered anyways

possible refactoring is to fully encapsulate the whole movetask behavior to have a single begin + end call

Copy link
Contributor

@InvisibleProgrammer InvisibleProgrammer left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@ayushtkn ayushtkn left a comment

Choose a reason for hiding this comment

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

Thanx Laszlo for the PR, minor nits, rest LGTM

Copy link

sonarcloud bot commented Nov 25, 2024

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.

5 participants