hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mingliang Liu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HADOOP-13368) DFSOpsCountStatistics$OpType#fromSymbol and s3a.Statistic#fromSymbol should be O(1) operation
Date Tue, 12 Jul 2016 22:18:20 GMT
Mingliang Liu created HADOOP-13368:
--------------------------------------

             Summary: DFSOpsCountStatistics$OpType#fromSymbol and s3a.Statistic#fromSymbol
should be O(1) operation
                 Key: HADOOP-13368
                 URL: https://issues.apache.org/jira/browse/HADOOP-13368
             Project: Hadoop Common
          Issue Type: Sub-task
    Affects Versions: 2.8.0
            Reporter: Mingliang Liu
            Assignee: Mingliang Liu


To lookup, {{DFSOpsCountStatistics$OpType#fromSymbol}} and {{s3a.Statistic#fromSymbol}} iterates
all the enums to get the entry by its symbol. Usages of {{fromSymbol()}} include {{isTracked()}}
and {{getLong()}}. 

As there are dozens of enum entries, it merits to make these two similar operations O(1) complexity.
This point is especially true if downstream app probes a dozen of stats in an outer loop (see
[TEZ-3331]).



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

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


Mime
View raw message