You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Ayush Saxena (Jira)" <ji...@apache.org> on 2023/06/19 09:21:00 UTC

[jira] [Resolved] (HDFS-17053) Optimize method BlockInfoStriped#findSlot to reduce time complexity.

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

Ayush Saxena resolved HDFS-17053.
---------------------------------
    Fix Version/s: 3.4.0
     Hadoop Flags: Reviewed
       Resolution: Fixed

> Optimize method BlockInfoStriped#findSlot to reduce time complexity.
> --------------------------------------------------------------------
>
>                 Key: HDFS-17053
>                 URL: https://issues.apache.org/jira/browse/HDFS-17053
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: farmmamba
>            Assignee: farmmamba
>            Priority: Trivial
>              Labels: pull-request-available
>             Fix For: 3.4.0
>
>
> Currently, in method findSlot. there exists codes snippet below:
> {code:java}
> for (; i < getCapacity(); i++) {
>   if (getStorageInfo(i) == null) {
>     return i;
>   }
> } {code}
> it will compute (triplets.length / 3;) every iteration, I think this can be optimized.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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