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 "Íñigo Goiri (Jira)" <ji...@apache.org> on 2021/01/22 22:49:01 UTC

[jira] [Assigned] (HDFS-15786) Minor improvement use isEmpty

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

Íñigo Goiri reassigned HDFS-15786:
----------------------------------

    Assignee: Arturo Bernal

> Minor improvement use isEmpty
> -----------------------------
>
>                 Key: HDFS-15786
>                 URL: https://issues.apache.org/jira/browse/HDFS-15786
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Arturo Bernal
>            Assignee: Arturo Bernal
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Use isEmpty instead size() > o.
>  
> {{size()}} can be *O(1)* or *O(N)*, depending on the {{data structure}}; {{.isEmpty()}} is never *O(N)*.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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