hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "BELUGA BEHR (JIRA)" <j...@apache.org>
Subject [jira] [Moved] (HADOOP-15830) Server.java Prefer ArrayList
Date Mon, 08 Oct 2018 18:23:00 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-15830?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

BELUGA BEHR moved HDFS-13969 to HADOOP-15830:
---------------------------------------------

    Affects Version/s:     (was: 3.2.0)
                       3.2.0
          Component/s:     (was: ipc)
                       ipc
                  Key: HADOOP-15830  (was: HDFS-13969)
              Project: Hadoop Common  (was: Hadoop HDFS)

> Server.java Prefer ArrayList
> ----------------------------
>
>                 Key: HADOOP-15830
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15830
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: ipc
>    Affects Versions: 3.2.0
>            Reporter: BELUGA BEHR
>            Assignee: BELUGA BEHR
>            Priority: Minor
>         Attachments: HDFS-13969.1.patch
>
>
> *  Prefer ArrayDeque over LinkedList (faster, less memory overhead)
> * Address this code:
> {code}
>     //
>     // Remove calls that have been pending in the responseQueue 
>     // for a long time.
>     //
>     private void doPurge(RpcCall call, long now) {
>       LinkedList<RpcCall> responseQueue = call.connection.responseQueue;
>       synchronized (responseQueue) {
>         Iterator<RpcCall> iter = responseQueue.listIterator(0);
>         while (iter.hasNext()) {
>           call = iter.next();
>           if (now > call.timestamp + PURGE_INTERVAL) {
>             closeConnection(call.connection);
>             break;
>           }
>         }
>       }
>     }
> {code}
> It says "Remove calls" (plural) but only one call will be removed because of the 'break'
statement.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
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