Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-6517 Snapshot support for Ozone
  3. HDDS-7835

Fix getKeyInfo API for snapshot paths.

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None
    • None

    Description

      HDDS-7230 introduced a new getKeyInfo API in OM code, however it doesn't take care of snapshot paths as it doesn't use OMMetadataReader abstraction and returns null as it searches for the snapshot path in the active DB . This in turn fails the getFileStatus code as it calls the getKeyInfoAPI

      RpcClient.java ~~ line 1913

      final OmKeyInfo keyInfo;
      if (omVersion.compareTo(OzoneManagerVersion.OPTIMIZED_GET_KEY_INFO) >= 0) {
        keyInfo = ozoneManagerClient.getKeyInfo(keyArgs, false)
            .getKeyInfo();
        if (!keyInfo.isFile()) {
          throw new OMException(keyName + " is not a file.",
              OMException.ResultCodes.NOT_A_FILE);
        }
      } else {
        keyInfo = ozoneManagerClient.lookupFile(keyArgs);
      } 

      Attachments

        Activity

          People

            georgeJahad George Jahad
            sadanand_shenoy Sadanand Shenoy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: