[ 
https://issues.apache.org/jira/browse/HDFS-16628?focusedWorklogId=780269&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-780269
 ]

ASF GitHub Bot logged work on HDFS-16628:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Jun/22 10:05
            Start Date: 10/Jun/22 10:05
    Worklog Time Spent: 10m 
      Work Description: zhangxiping1 commented on code in PR #4424:
URL: https://github.com/apache/hadoop/pull/4424#discussion_r894367932


##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterTrash.java:
##########
@@ -189,6 +189,41 @@ public void testMoveToTrashNoMountPoint() throws 
IOException,
     assertEquals(2, fileStatuses.length);
   }
 
+  @Test
+  public void testMoveToTrashNoMountPointWithKerBoersUser() throws IOException,
+      URISyntaxException, InterruptedException {
+    //Constructs the structure of the KerBoers user name
+    String kerBoersUser = "randomUser/[email protected]";

Review Comment:
   Haha, ok 



##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterTrash.java:
##########
@@ -189,6 +189,41 @@ public void testMoveToTrashNoMountPoint() throws 
IOException,
     assertEquals(2, fileStatuses.length);
   }
 
+  @Test
+  public void testMoveToTrashNoMountPointWithKerBoersUser() throws IOException,
+      URISyntaxException, InterruptedException {
+    //Constructs the structure of the KerBoers user name
+    String kerBoersUser = "randomUser/[email protected]";
+    UserGroupInformation ugi = 
UserGroupInformation.createRemoteUser(kerBoersUser);
+    MountTable addEntry = MountTable.newInstance(MOUNT_POINT,
+        Collections.singletonMap(ns1, MOUNT_POINT));
+    assertTrue(addMountTable(addEntry));
+    // current user client
+    MiniRouterDFSCluster.NamenodeContext nn1Context = cluster.getNamenode(ns1, 
null);
+    DFSClient currentUserClientNs0 = nnContext.getClient();
+    DFSClient currentUserClientNs1 = nn1Context.getClient();
+
+    currentUserClientNs0.setOwner("/", ugi.getShortUserName(), 
ugi.getShortUserName());
+    currentUserClientNs1.setOwner("/", ugi.getShortUserName(), 
ugi.getShortUserName());

Review Comment:
   It is a good idea to set the test user permissions for both subsets. Give 
test users permission to create both subCluster Trash directories, otherwise 
there may be some false positives.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 780269)
    Time Spent: 1h  (was: 50m)

> RBF: kerbose user remove Non-default namespace data failed
> ----------------------------------------------------------
>
>                 Key: HDFS-16628
>                 URL: https://issues.apache.org/jira/browse/HDFS-16628
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: rbf
>    Affects Versions: 3.4.0
>            Reporter: Xiping Zhang
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.4.0
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> remove data from the router will fail using such a user 
> username/[email protected]



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to