Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-4391

UnixPath.toUri() is expensive

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.0
    • 1.1.0
    • Ozone Manager
    • None

    Description

      OM makes call this API to look up a key.

      This call accounts for 20% (give or take) of OM request handler overhead. Would be great if we can get rid of this call.

      OMClientRequest.java

      @SuppressFBWarnings("DMI_HARDCODED_ABSOLUTE_FILENAME")
      public static String validateAndNormalizeKey(String keyName)
          throws OMException {
        String normalizedKeyName;
        if (keyName.startsWith(OM_KEY_PREFIX)) {
          normalizedKeyName = Paths.get(keyName).toUri().normalize().getPath();
        } else {
          normalizedKeyName = Paths.get(OM_KEY_PREFIX, keyName).toUri()
              .normalize().getPath();
        } 

      Attachments

        1. Screen Shot 2020-10-29 at 5.47.59 PM.png
          199 kB
          Wei-Chiu Chuang
        2. Screen Shot 2020-10-20 at 4.15.59 PM.png
          239 kB
          Wei-Chiu Chuang
        3. Screen Shot 2020-10-20 at 12.34.52 PM.png
          1.54 MB
          Wei-Chiu Chuang

        Activity

          People

            bharat Bharat Viswanadham
            weichiu Wei-Chiu Chuang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: