hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brahma Reddy Battula (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-13742) Expose "NumOpenConnectionsPerUser" as a metric
Date Sat, 29 Oct 2016 07:09:58 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-13742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15617613#comment-15617613
] 

Brahma Reddy Battula commented on HADOOP-13742:
-----------------------------------------------

[~kihwal] thanks for taking a look into this issue. thinking like following, let me know your
opinion.

{code}
void incrUserConnections(String user) {
      AtomicInteger count = userVsConnectionsMap.get(user);
      if (count == null) {
        count = new AtomicInteger(1);
        count = userVsConnectionsMap.putIfAbsent(user, count);
        if (count != null) {
          count.getAndIncrement();
        }
      } else {
        count.getAndIncrement();
      }
    }

 void decrUserConnections(String user) {
      AtomicInteger count = userVsConnectionsMap.get(user);
      if (count == null) {
        return;
      } else {
        if (count.decrementAndGet() == 0) {
          userVsConnectionsMap.remove(user);
        }
      }
    }
{code}

> Expose "NumOpenConnectionsPerUser" as a metric
> ----------------------------------------------
>
>                 Key: HADOOP-13742
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13742
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Brahma Reddy Battula
>            Assignee: Brahma Reddy Battula
>         Attachments: HADOOP-13742-002.patch, HADOOP-13742.patch
>
>
> To track user level connections( How many connections for each user) in busy cluster
where so many connections to server.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message