[
https://issues.apache.org/jira/browse/HIVE-12987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15136395#comment-15136395
]
Jimmy Xiang commented on HIVE-12987:
------------------------------------
Sure, I can make Operation::setMetrics private and use onNewState() callback so
that we can avoid the new prevState field. However, the SQLOperation needs to
emit similar metrics as Operation. We still need to move the shared code in the
original setMetrics to a method that can be used by SQLOpertation, so that we
don't duplicate code, right?
As to the state of SQLOperation, it is accessed from the normal HS2 handler
thread and the async pooled processing thread. It is safer to be volatile,
isn't it?
> Add metrics for HS2 active users and SQL operations
> ---------------------------------------------------
>
> Key: HIVE-12987
> URL: https://issues.apache.org/jira/browse/HIVE-12987
> Project: Hive
> Issue Type: Task
> Reporter: Jimmy Xiang
> Assignee: Jimmy Xiang
> Attachments: HIVE-12987.1.patch, HIVE-12987.2.patch,
> HIVE-12987.2.patch, HIVE-12987.3.patch, HIVE-12987.3.patch
>
>
> HIVE-12271 added metrics for all HS2 operations. Sometimes, users are also
> interested in metrics just for SQL operations.
> It is useful to track active user count as well.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)