You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/07/19 17:20:54 UTC

[GitHub] [ozone] kerneltime commented on a change in pull request #2431: HDDS-5450. For S3 Head avoid refresh pipeline to improve perf.

kerneltime commented on a change in pull request #2431:
URL: https://github.com/apache/ozone/pull/2431#discussion_r672486208



##########
File path: hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java
##########
@@ -1450,4 +1450,27 @@ public OzoneManagerProtocol getOzoneManagerClient() {
   public Cache<URI, KeyProvider> getKeyProviderCache() {
     return keyProviderCache;
   }
+
+  @Override
+  public OzoneKey headObject(String volumeName, String bucketName,
+      String keyName) throws IOException {
+    Preconditions.checkNotNull(volumeName);
+    Preconditions.checkNotNull(bucketName);
+    Preconditions.checkNotNull(keyName);
+    OmKeyArgs keyArgs = new OmKeyArgs.Builder()
+        .setVolumeName(volumeName)
+        .setBucketName(bucketName)
+        .setKeyName(keyName)
+        .setRefreshPipeline(false)
+        .setSortDatanodesInPipeline(false)

Review comment:
       This should be a no-op as we skip it in OM if `headOp` flag is set, we can skip it here?

##########
File path: hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneBucket.java
##########
@@ -529,6 +529,21 @@ public OzoneKeyDetails getKey(String key) throws IOException {
     return proxy.getKeyDetails(volumeName, name, key);
   }
 
+  /**
+   *
+   * Return basic information about the key.
+   *
+   * If Key exists, return basic information about the key.
+   * If Key does not exist, throws an exception with error code KEY_NOT_FOUND
+   *
+   * @param key
+   * @return OzoneKey which gives basic information about the key.
+   * @throws IOException
+   */

Review comment:
       ```suggestion
     /**
      *
      * Returns ObjectKey that contains the application generated/visible metadata for an Ozone Object.
      *
      * If Key exists, returns ObjectKey.
      * If Key does not exist, throws an exception with error code KEY_NOT_FOUND
      *
      * @param key
      * @return OzoneKey which gives basic information about the key.
      * @throws IOException
      */
   ```

##########
File path: hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/protocol/ClientProtocol.java
##########
@@ -736,4 +736,20 @@ OzoneOutputStream createFile(String volumeName, String bucketName,
    */
   void setBucketQuota(String volumeName, String bucketName,
       long quotaInNamespace, long quotaInBytes) throws IOException;
+
+  /**
+   *
+   * Return basic information about the key.
+   *
+   * If Key exists, return basic information about the key.
+   * If Key does not exist, throws an exception with error code KEY_NOT_FOUND
+   *
+   * @param volumeName
+   * @param bucketName
+   * @param keyName
+   * @return OzoneKey which gives basic information about the key.
+   * @throws IOException
+   */

Review comment:
       ```suggestion
   
     /**
      *
      * Returns ObjectKey that contains the application generate/visible metadata for an Object
      *
      * If Key exists, return basic information about the key.
      * If Key does not exist, throws an exception with error code KEY_NOT_FOUND
      *
      * @param volumeName
      * @param bucketName
      * @param keyName
      * @return OzoneKey which gives basic information about the key.
      * @throws IOException
      */
   ```

##########
File path: hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneBucket.java
##########
@@ -529,6 +529,21 @@ public OzoneKeyDetails getKey(String key) throws IOException {
     return proxy.getKeyDetails(volumeName, name, key);
   }
 
+  /**
+   *
+   * Return basic information about the key.
+   *
+   * If Key exists, return basic information about the key.
+   * If Key does not exist, throws an exception with error code KEY_NOT_FOUND
+   *
+   * @param key
+   * @return OzoneKey which gives basic information about the key.
+   * @throws IOException
+   */
+  public OzoneKey headObject(String key) throws IOException {

Review comment:
       Rename to `getOzoneKeyMetadata`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org