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

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.8.0
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: fs
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      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.000.patch
          4 kB
          Mingliang Liu
        2. HADOOP-13368.001.patch
          4 kB
          Mingliang Liu

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: