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-28638: Refactor stats handling in StatsRecordingThreadPool #5557

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

Conversation

abstractdog
Copy link
Contributor

@abstractdog abstractdog commented Nov 24, 2024

What changes were proposed in this pull request?

Refactoring StatsRecordingThreadPool and creating a new class LlapThreadLocalStatistics.

Why are the changes needed?

Describe in jira.

Does this PR introduce any user-facing change?

No.

Is the change a dependency upgrade?

No.

How was this patch tested?

Unit tests were added for the new class LlapThreadLocalStatistics.

Tested on a cluster (using file + s3), before/after results were almost the same. Ignoring <1% difference between different runs.

E.g. without patch
1.

INFO  : File System Counters:
INFO  :    FILE_BYTES_READ: 0
INFO  :    FILE_BYTES_WRITTEN: 39544287
INFO  :    FILE_READ_OPS: 0
INFO  :    FILE_LARGE_READ_OPS: 0
INFO  :    FILE_WRITE_OPS: 0
INFO  :    S3A_BYTES_READ: 53568465091
INFO  :    S3A_BYTES_WRITTEN: 0
INFO  :    S3A_READ_OPS: 3553
INFO  :    S3A_LARGE_READ_OPS: 0
INFO  :    S3A_WRITE_OPS: 0
INFO  : org.apache.hadoop.hive.llap.daemon.impl.StatsRecordingThreadPool$WrappedCallable$LlapExecutorCounters:
INFO  :    EXECUTOR_CPU_NS: 8966273470486
INFO  :    EXECUTOR_USER_NS: 8663430000000
INFO  : File System Counters:
INFO  :    FILE_BYTES_READ: 0
INFO  :    FILE_BYTES_WRITTEN: 39544265
INFO  :    FILE_READ_OPS: 0
INFO  :    FILE_LARGE_READ_OPS: 0
INFO  :    FILE_WRITE_OPS: 0
INFO  :    S3A_BYTES_READ: 53568432323
INFO  :    S3A_BYTES_WRITTEN: 0
INFO  :    S3A_READ_OPS: 3549
INFO  :    S3A_LARGE_READ_OPS: 0
INFO  :    S3A_WRITE_OPS: 0
INFO  : org.apache.hadoop.hive.llap.daemon.impl.StatsRecordingThreadPool$WrappedCallable$LlapExecutorCounters:
INFO  :    EXECUTOR_CPU_NS: 9374354807466
INFO  :    EXECUTOR_USER_NS: 9058920000000

with patch:
1.

INFO  : File System Counters:
INFO  :    FILE_BYTES_READ: 0
INFO  :    FILE_BYTES_WRITTEN: 39544250
INFO  :    FILE_READ_OPS: 0
INFO  :    FILE_LARGE_READ_OPS: 0
INFO  :    FILE_WRITE_OPS: 0
INFO  :    S3A_BYTES_READ: 53568399555
INFO  :    S3A_BYTES_WRITTEN: 0
INFO  :    S3A_READ_OPS: 3545
INFO  :    S3A_LARGE_READ_OPS: 0
INFO  :    S3A_WRITE_OPS: 0
INFO  : org.apache.hadoop.hive.llap.LlapThreadLocalStatistics$LlapExecutorCounters:
INFO  :    EXECUTOR_CPU_NS: 9240866526570
INFO  :    EXECUTOR_USER_NS: 8923940000000
INFO  : File System Counters:
INFO  :    FILE_BYTES_READ: 0
INFO  :    FILE_BYTES_WRITTEN: 39544274
INFO  :    FILE_READ_OPS: 0
INFO  :    FILE_LARGE_READ_OPS: 0
INFO  :    FILE_WRITE_OPS: 0
INFO  :    S3A_BYTES_READ: 53568432323
INFO  :    S3A_BYTES_WRITTEN: 0
INFO  :    S3A_READ_OPS: 3549
INFO  :    S3A_LARGE_READ_OPS: 0
INFO  :    S3A_WRITE_OPS: 0
INFO  : org.apache.hadoop.hive.llap.LlapThreadLocalStatistics$LlapExecutorCounters:
INFO  :    EXECUTOR_CPU_NS: 9263414528077
INFO  :    EXECUTOR_USER_NS: 8946070000000

Copy link
Contributor

@zratkai zratkai left a comment

Choose a reason for hiding this comment

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

Please check my comments!

@abstractdog
Copy link
Contributor Author

Please check my comments!

thanks, responded to those, please let me know if a follow-up needed somewhere

Copy link
Contributor

@zratkai zratkai left a comment

Choose a reason for hiding this comment

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

Thanks for the answers!

Copy link

sonarcloud bot commented Nov 27, 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.

3 participants