[
https://issues.apache.org/jira/browse/IMPALA-12535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17787326#comment-17787326
]
ASF subversion and git services commented on IMPALA-12535:
----------------------------------------------------------
Commit 79a971b282631eeedc0e822b7751679c41ba684a in impala's branch
refs/heads/master from stiga-huang
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=79a971b28 ]
IMPALA-12535: Fix misleading metric keys for the threadz page
The debug URL "/thread-group?all&json" returns metric keys as user_ns,
kernel_ns, and iowait_ns. However, the unit is second instead of
nanosecond. This fixes the misleading metric keys.
Tests:
- Add test in test_io_mgr_threads to verify the metric keys.
Change-Id: I15a8cf0a318bc7122d1f5df29f18d8e467249ef7
Reviewed-on: http://gerrit.cloudera.org:8080/20658
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
> Wrong unit of thread duration shown in the json result of
> /thread-group?all&json URL
> ------------------------------------------------------------------------------------
>
> Key: IMPALA-12535
> URL: https://issues.apache.org/jira/browse/IMPALA-12535
> Project: IMPALA
> Issue Type: Bug
> Components: Backend
> Reporter: Quanlong Huang
> Assignee: Quanlong Huang
> Priority: Major
> Attachments: Selection_098.png
>
>
> Impalad returns the JSON results of thread statistics for URL
> "/thread-group?all&json", e.g. for a thread:
> {code:json}
> {
> name: "StatestoreSubscriber-0",
> id: 43136,
> user_ns: 26.94,
> kernel_ns: 10.18,
> iowait_ns: 0.01
> },
> {code}
> However, the unit is not ns. Instead, it's seconds. The html page shows the
> correct unit.
> !Selection_098.png|width=876,height=156!
> Looking into the code, we actually divided the duration by 1e9 so the unit
> should be second.
> {code:cpp}
> val.AddMember("user_ns", static_cast<double>(stats.user_ns) / 1e9,
> document->GetAllocator());
> val.AddMember("kernel_ns", static_cast<double>(stats.kernel_ns) / 1e9,
> document->GetAllocator());
> val.AddMember("iowait_ns", static_cast<double>(stats.iowait_ns) / 1e9,
> document->GetAllocator());
> {code}
> [https://github.com/apache/impala/blob/39adf42a30765208e51e970339e950aae8544848/be/src/util/thread.cc#L283-L288]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]