bharatviswa504 commented on a change in pull request #1398:
URL: https://github.com/apache/hadoop-ozone/pull/1398#discussion_r487178258



##########
File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
##########
@@ -3523,6 +3533,47 @@ public ResolvedBucket resolveBucketLink(Pair<String, 
String> requested)
         visited);
   }
 
+  /**
+   * Resolves bucket symlinks. Read permission is required for following links.
+   *
+   * @param volumeAndBucket the bucket to be resolved (if it is a link)
+   * @param {@link OMClientRequest}  which has information required to check
+   * permission.
+   * @param visited collects link buckets visited during the resolution to
+   *   avoid infinite loops
+   * @return bucket location possibly updated with its actual volume and bucket
+   *   after following bucket links
+   * @throws IOException (most likely OMException) if ACL check fails, bucket 
is
+   *   not found, loop is detected in the links, etc.
+   */
+  private Pair<String, String> resolveBucketLink(
+      Pair<String, String> volumeAndBucket,
+      Set<Pair<String, String>> visited,
+      OMClientRequest omClientRequest) throws IOException {

Review comment:
       Made few changes to not to duplicate code.

##########
File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHAWithData.java
##########
@@ -69,6 +70,38 @@ public void testAllOMNodesRunning() throws Exception {
     createKeyTest(true);
   }
 
+  @Test
+  public void testBucketLinkOps() throws Exception {

Review comment:
       Thanks for the tip. Enabled docker-compose tests.

##########
File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
##########
@@ -3523,6 +3533,47 @@ public ResolvedBucket resolveBucketLink(Pair<String, 
String> requested)
         visited);
   }
 
+  /**
+   * Resolves bucket symlinks. Read permission is required for following links.
+   *
+   * @param volumeAndBucket the bucket to be resolved (if it is a link)
+   * @param {@link OMClientRequest}  which has information required to check
+   * permission.
+   * @param visited collects link buckets visited during the resolution to
+   *   avoid infinite loops
+   * @return bucket location possibly updated with its actual volume and bucket
+   *   after following bucket links
+   * @throws IOException (most likely OMException) if ACL check fails, bucket 
is
+   *   not found, loop is detected in the links, etc.
+   */
+  private Pair<String, String> resolveBucketLink(
+      Pair<String, String> volumeAndBucket,
+      Set<Pair<String, String>> visited,
+      OMClientRequest omClientRequest) throws IOException {

Review comment:
       Made few changes to not to duplicate code.

##########
File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHAWithData.java
##########
@@ -69,6 +70,38 @@ public void testAllOMNodesRunning() throws Exception {
     createKeyTest(true);
   }
 
+  @Test
+  public void testBucketLinkOps() throws Exception {

Review comment:
       Thanks for the tip. Enabled docker-compose tests.

##########
File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
##########
@@ -3523,6 +3533,47 @@ public ResolvedBucket resolveBucketLink(Pair<String, 
String> requested)
         visited);
   }
 
+  /**
+   * Resolves bucket symlinks. Read permission is required for following links.
+   *
+   * @param volumeAndBucket the bucket to be resolved (if it is a link)
+   * @param {@link OMClientRequest}  which has information required to check
+   * permission.
+   * @param visited collects link buckets visited during the resolution to
+   *   avoid infinite loops
+   * @return bucket location possibly updated with its actual volume and bucket
+   *   after following bucket links
+   * @throws IOException (most likely OMException) if ACL check fails, bucket 
is
+   *   not found, loop is detected in the links, etc.
+   */
+  private Pair<String, String> resolveBucketLink(
+      Pair<String, String> volumeAndBucket,
+      Set<Pair<String, String>> visited,
+      OMClientRequest omClientRequest) throws IOException {

Review comment:
       Made few changes to not to duplicate code.

##########
File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHAWithData.java
##########
@@ -69,6 +70,38 @@ public void testAllOMNodesRunning() throws Exception {
     createKeyTest(true);
   }
 
+  @Test
+  public void testBucketLinkOps() throws Exception {

Review comment:
       Thanks for the tip. Enabled docker-compose tests.

##########
File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
##########
@@ -3523,6 +3533,47 @@ public ResolvedBucket resolveBucketLink(Pair<String, 
String> requested)
         visited);
   }
 
+  /**
+   * Resolves bucket symlinks. Read permission is required for following links.
+   *
+   * @param volumeAndBucket the bucket to be resolved (if it is a link)
+   * @param {@link OMClientRequest}  which has information required to check
+   * permission.
+   * @param visited collects link buckets visited during the resolution to
+   *   avoid infinite loops
+   * @return bucket location possibly updated with its actual volume and bucket
+   *   after following bucket links
+   * @throws IOException (most likely OMException) if ACL check fails, bucket 
is
+   *   not found, loop is detected in the links, etc.
+   */
+  private Pair<String, String> resolveBucketLink(
+      Pair<String, String> volumeAndBucket,
+      Set<Pair<String, String>> visited,
+      OMClientRequest omClientRequest) throws IOException {

Review comment:
       Made few changes to not to duplicate code.

##########
File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHAWithData.java
##########
@@ -69,6 +70,38 @@ public void testAllOMNodesRunning() throws Exception {
     createKeyTest(true);
   }
 
+  @Test
+  public void testBucketLinkOps() throws Exception {

Review comment:
       Thanks for the tip. Enabled docker-compose tests.

##########
File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
##########
@@ -3523,6 +3533,47 @@ public ResolvedBucket resolveBucketLink(Pair<String, 
String> requested)
         visited);
   }
 
+  /**
+   * Resolves bucket symlinks. Read permission is required for following links.
+   *
+   * @param volumeAndBucket the bucket to be resolved (if it is a link)
+   * @param {@link OMClientRequest}  which has information required to check
+   * permission.
+   * @param visited collects link buckets visited during the resolution to
+   *   avoid infinite loops
+   * @return bucket location possibly updated with its actual volume and bucket
+   *   after following bucket links
+   * @throws IOException (most likely OMException) if ACL check fails, bucket 
is
+   *   not found, loop is detected in the links, etc.
+   */
+  private Pair<String, String> resolveBucketLink(
+      Pair<String, String> volumeAndBucket,
+      Set<Pair<String, String>> visited,
+      OMClientRequest omClientRequest) throws IOException {

Review comment:
       Made few changes to not to duplicate code.

##########
File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHAWithData.java
##########
@@ -69,6 +70,38 @@ public void testAllOMNodesRunning() throws Exception {
     createKeyTest(true);
   }
 
+  @Test
+  public void testBucketLinkOps() throws Exception {

Review comment:
       Thanks for the tip. Enabled docker-compose tests.

##########
File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
##########
@@ -3523,6 +3533,47 @@ public ResolvedBucket resolveBucketLink(Pair<String, 
String> requested)
         visited);
   }
 
+  /**
+   * Resolves bucket symlinks. Read permission is required for following links.
+   *
+   * @param volumeAndBucket the bucket to be resolved (if it is a link)
+   * @param {@link OMClientRequest}  which has information required to check
+   * permission.
+   * @param visited collects link buckets visited during the resolution to
+   *   avoid infinite loops
+   * @return bucket location possibly updated with its actual volume and bucket
+   *   after following bucket links
+   * @throws IOException (most likely OMException) if ACL check fails, bucket 
is
+   *   not found, loop is detected in the links, etc.
+   */
+  private Pair<String, String> resolveBucketLink(
+      Pair<String, String> volumeAndBucket,
+      Set<Pair<String, String>> visited,
+      OMClientRequest omClientRequest) throws IOException {

Review comment:
       Made few changes to not to duplicate code.

##########
File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHAWithData.java
##########
@@ -69,6 +70,38 @@ public void testAllOMNodesRunning() throws Exception {
     createKeyTest(true);
   }
 
+  @Test
+  public void testBucketLinkOps() throws Exception {

Review comment:
       Thanks for the tip. Enabled docker-compose tests.

##########
File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
##########
@@ -3523,6 +3533,47 @@ public ResolvedBucket resolveBucketLink(Pair<String, 
String> requested)
         visited);
   }
 
+  /**
+   * Resolves bucket symlinks. Read permission is required for following links.
+   *
+   * @param volumeAndBucket the bucket to be resolved (if it is a link)
+   * @param {@link OMClientRequest}  which has information required to check
+   * permission.
+   * @param visited collects link buckets visited during the resolution to
+   *   avoid infinite loops
+   * @return bucket location possibly updated with its actual volume and bucket
+   *   after following bucket links
+   * @throws IOException (most likely OMException) if ACL check fails, bucket 
is
+   *   not found, loop is detected in the links, etc.
+   */
+  private Pair<String, String> resolveBucketLink(
+      Pair<String, String> volumeAndBucket,
+      Set<Pair<String, String>> visited,
+      OMClientRequest omClientRequest) throws IOException {

Review comment:
       Made few changes to not to duplicate code.

##########
File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHAWithData.java
##########
@@ -69,6 +70,38 @@ public void testAllOMNodesRunning() throws Exception {
     createKeyTest(true);
   }
 
+  @Test
+  public void testBucketLinkOps() throws Exception {

Review comment:
       Thanks for the tip. Enabled docker-compose tests.




----------------------------------------------------------------
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.

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



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

Reply via email to