Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-13065 Add a new interface for retrieving FS and FC Statistics
  3. HADOOP-13368

DFSOpsCountStatistics$OpType#fromSymbol and s3a.Statistic#fromSymbol should be O(1) operation

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.8.0
    • 2.8.0, 3.0.0-alpha1
    • fs
    • None
    • Reviewed

    Description

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

      Attachments

        1. HADOOP-13368.001.patch
          4 kB
          Mingliang Liu
        2. HADOOP-13368.000.patch
          4 kB
          Mingliang Liu

        Activity

          People

            liuml07 Mingliang Liu
            liuml07 Mingliang Liu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: