@Override
  public MessageInfo findKey(StoreKey key) throws StoreException {
    try {
      // If we are here, the key must exist
      CloudBlobMetadata cloudBlobMetadata = cloudDestination.getCloudBlobMetadata((BlobId) key);
      return new MessageInfo(key, cloudBlobMetadata.getSize(), cloudBlobMetadata.isDeleted(),
          cloudBlobMetadata.isTtlUpdated(), cloudBlobMetadata.isUndeleted(), cloudBlobMetadata.getExpirationTime(),
          null, (short) cloudBlobMetadata.getAccountId(), (short) cloudBlobMetadata.getContainerId(),
          cloudBlobMetadata.getLastUpdateTime(), cloudBlobMetadata.getLifeVersion());
    } catch (CloudStorageException e) {
      switch (e.getStatusCode()) {
        case HttpStatus.SC_NOT_FOUND:
          throw new StoreException(e.getMessage(), StoreErrorCodes.IDNotFound);
        default:
          throw new StoreException(e.getMessage(), StoreErrorCodes.IOError);
      }
    } catch (Throwable e) {
      throw new StoreException(e.getMessage(), StoreErrorCodes.IOError);
    }
  }
Find key metadata
@param key The key of which blob to return {@link MessageInfo}.
@return
@throws StoreException
ambry-cloud/src/main/java/com/github/ambry/cloud/CloudBlobStore.java