You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/06/10 02:48:06 UTC
[GitHub] [hadoop] zhangxiping1 opened a new pull request, #4424: HDFS-16628 RBF: kerbose user remove Non-default namespace data failed.
zhangxiping1 opened a new pull request, #4424:
URL: https://github.com/apache/hadoop/pull/4424
HDFS-16628 RBF: kerbose user remove Non-default namespace data failed
--
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: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
[GitHub] [hadoop] zhangxiping1 commented on pull request #4424: HDFS-16628 RBF: kerberos user remove Non-default namespace data failed.
Posted by GitBox <gi...@apache.org>.
zhangxiping1 commented on PR #4424:
URL: https://github.com/apache/hadoop/pull/4424#issuecomment-1153583733
cc @Hexiaoqiao It has been modified. Please help to merge it. Thank you very much
--
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: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
[GitHub] [hadoop] zhangxiping1 commented on a diff in pull request #4424: HDFS-16628 RBF: kerbose user remove Non-default namespace data failed.
Posted by GitBox <gi...@apache.org>.
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/dev@HADOOP.COM";
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/dev@HADOOP.COM";
+ 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.
--
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: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
[GitHub] [hadoop] hadoop-yetus commented on pull request #4424: HDFS-16628 RBF: kerberos user remove Non-default namespace data failed.
Posted by GitBox <gi...@apache.org>.
hadoop-yetus commented on PR #4424:
URL: https://github.com/apache/hadoop/pull/4424#issuecomment-1153443356
:confetti_ball: **+1 overall**
| Vote | Subsystem | Runtime | Logfile | Comment |
|:----:|----------:|--------:|:--------:|:-------:|
| +0 :ok: | reexec | 1m 22s | | Docker mode activated. |
|||| _ Prechecks _ |
| +1 :green_heart: | dupname | 0m 0s | | No case conflicting files found. |
| +0 :ok: | codespell | 0m 0s | | codespell was not available. |
| +0 :ok: | detsecrets | 0m 0s | | detect-secrets was not available. |
| +1 :green_heart: | @author | 0m 0s | | The patch does not contain any @author tags. |
| +1 :green_heart: | test4tests | 0m 0s | | The patch appears to include 1 new or modified test files. |
|||| _ trunk Compile Tests _ |
| +1 :green_heart: | mvninstall | 40m 7s | | trunk passed |
| +1 :green_heart: | compile | 0m 59s | | trunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1 |
| +1 :green_heart: | compile | 0m 56s | | trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
| +1 :green_heart: | checkstyle | 0m 49s | | trunk passed |
| +1 :green_heart: | mvnsite | 0m 59s | | trunk passed |
| +1 :green_heart: | javadoc | 1m 4s | | trunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1 |
| +1 :green_heart: | javadoc | 1m 7s | | trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
| +1 :green_heart: | spotbugs | 1m 53s | | trunk passed |
| +1 :green_heart: | shadedclient | 22m 39s | | branch has no errors when building and testing our client artifacts. |
|||| _ Patch Compile Tests _ |
| +1 :green_heart: | mvninstall | 0m 43s | | the patch passed |
| +1 :green_heart: | compile | 0m 44s | | the patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1 |
| +1 :green_heart: | javac | 0m 44s | | the patch passed |
| +1 :green_heart: | compile | 0m 41s | | the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
| +1 :green_heart: | javac | 0m 41s | | the patch passed |
| +1 :green_heart: | blanks | 0m 0s | | The patch has no blanks issues. |
| +1 :green_heart: | checkstyle | 0m 26s | | the patch passed |
| +1 :green_heart: | mvnsite | 0m 44s | | the patch passed |
| +1 :green_heart: | javadoc | 0m 43s | | the patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1 |
| +1 :green_heart: | javadoc | 1m 0s | | the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
| +1 :green_heart: | spotbugs | 1m 34s | | the patch passed |
| +1 :green_heart: | shadedclient | 22m 58s | | patch has no errors when building and testing our client artifacts. |
|||| _ Other Tests _ |
| +1 :green_heart: | unit | 38m 48s | | hadoop-hdfs-rbf in the patch passed. |
| +1 :green_heart: | asflicense | 0m 51s | | The patch does not generate ASF License warnings. |
| | | 143m 2s | | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4424/2/artifact/out/Dockerfile |
| GITHUB PR | https://github.com/apache/hadoop/pull/4424 |
| Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets |
| uname | Linux f24d6d7524f0 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/bin/hadoop.sh |
| git revision | trunk / 70ad0e0a082afcb30afcc3f0fd9c260a19600f4c |
| Default Java | Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
| Multi-JDK versions | /usr/lib/jvm/java-11-openjdk-amd64:Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
| Test Results | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4424/2/testReport/ |
| Max. process+thread count | 2729 (vs. ulimit of 5500) |
| modules | C: hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project/hadoop-hdfs-rbf |
| Console output | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4424/2/console |
| versions | git=2.25.1 maven=3.6.3 spotbugs=4.2.2 |
| Powered by | Apache Yetus 0.14.0 https://yetus.apache.org |
This message was automatically generated.
--
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: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
[GitHub] [hadoop] zhangxiping1 commented on a diff in pull request #4424: HDFS-16628 RBF: kerbose user remove Non-default namespace data failed.
Posted by GitBox <gi...@apache.org>.
zhangxiping1 commented on code in PR #4424:
URL: https://github.com/apache/hadoop/pull/4424#discussion_r894367700
##########
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,
Review Comment:
for a , yes
--
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: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
[GitHub] [hadoop] Hexiaoqiao commented on pull request #4424: HDFS-16628 RBF: Correct target directory when move to trash for kerberos login user.
Posted by GitBox <gi...@apache.org>.
Hexiaoqiao commented on PR #4424:
URL: https://github.com/apache/hadoop/pull/4424#issuecomment-1156461060
Committed to trunk. Thanks @zhangxiping1 for your report and contribution.
--
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: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
[GitHub] [hadoop] zhangxiping1 commented on pull request #4424: HDFS-16628 RBF: kerberos user remove Non-default namespace data failed.
Posted by GitBox <gi...@apache.org>.
zhangxiping1 commented on PR #4424:
URL: https://github.com/apache/hadoop/pull/4424#issuecomment-1155887366
Ok, thank you @Hexiaoqiao
--
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: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
[GitHub] [hadoop] hadoop-yetus commented on pull request #4424: HDFS-16628 RBF: kerbose user remove Non-default namespace data failed.
Posted by GitBox <gi...@apache.org>.
hadoop-yetus commented on PR #4424:
URL: https://github.com/apache/hadoop/pull/4424#issuecomment-1151935757
:confetti_ball: **+1 overall**
| Vote | Subsystem | Runtime | Logfile | Comment |
|:----:|----------:|--------:|:--------:|:-------:|
| +0 :ok: | reexec | 0m 41s | | Docker mode activated. |
|||| _ Prechecks _ |
| +1 :green_heart: | dupname | 0m 0s | | No case conflicting files found. |
| +0 :ok: | codespell | 0m 1s | | codespell was not available. |
| +0 :ok: | detsecrets | 0m 1s | | detect-secrets was not available. |
| +1 :green_heart: | @author | 0m 0s | | The patch does not contain any @author tags. |
| +1 :green_heart: | test4tests | 0m 0s | | The patch appears to include 1 new or modified test files. |
|||| _ trunk Compile Tests _ |
| +1 :green_heart: | mvninstall | 37m 30s | | trunk passed |
| +1 :green_heart: | compile | 1m 1s | | trunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1 |
| +1 :green_heart: | compile | 0m 57s | | trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
| +1 :green_heart: | checkstyle | 0m 53s | | trunk passed |
| +1 :green_heart: | mvnsite | 1m 2s | | trunk passed |
| +1 :green_heart: | javadoc | 1m 7s | | trunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1 |
| +1 :green_heart: | javadoc | 1m 19s | | trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
| +1 :green_heart: | spotbugs | 1m 48s | | trunk passed |
| +1 :green_heart: | shadedclient | 21m 5s | | branch has no errors when building and testing our client artifacts. |
|||| _ Patch Compile Tests _ |
| +1 :green_heart: | mvninstall | 0m 41s | | the patch passed |
| +1 :green_heart: | compile | 0m 44s | | the patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1 |
| +1 :green_heart: | javac | 0m 44s | | the patch passed |
| +1 :green_heart: | compile | 0m 40s | | the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
| +1 :green_heart: | javac | 0m 40s | | the patch passed |
| +1 :green_heart: | blanks | 0m 0s | | The patch has no blanks issues. |
| +1 :green_heart: | checkstyle | 0m 27s | | the patch passed |
| +1 :green_heart: | mvnsite | 0m 41s | | the patch passed |
| +1 :green_heart: | javadoc | 0m 42s | | the patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1 |
| +1 :green_heart: | javadoc | 0m 57s | | the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
| +1 :green_heart: | spotbugs | 1m 28s | | the patch passed |
| +1 :green_heart: | shadedclient | 20m 32s | | patch has no errors when building and testing our client artifacts. |
|||| _ Other Tests _ |
| +1 :green_heart: | unit | 21m 41s | | hadoop-hdfs-rbf in the patch passed. |
| +1 :green_heart: | asflicense | 0m 54s | | The patch does not generate ASF License warnings. |
| | | 118m 57s | | |
| Subsystem | Report/Notes |
|----------:|:-------------|
| Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4424/1/artifact/out/Dockerfile |
| GITHUB PR | https://github.com/apache/hadoop/pull/4424 |
| Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets |
| uname | Linux a003555ec08e 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/bin/hadoop.sh |
| git revision | trunk / 61dbbdce1617dedabd4e5d9e8b35009ed13c0152 |
| Default Java | Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
| Multi-JDK versions | /usr/lib/jvm/java-11-openjdk-amd64:Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
| Test Results | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4424/1/testReport/ |
| Max. process+thread count | 2752 (vs. ulimit of 5500) |
| modules | C: hadoop-hdfs-project/hadoop-hdfs-rbf U: hadoop-hdfs-project/hadoop-hdfs-rbf |
| Console output | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4424/1/console |
| versions | git=2.25.1 maven=3.6.3 spotbugs=4.2.2 |
| Powered by | Apache Yetus 0.14.0 https://yetus.apache.org |
This message was automatically generated.
--
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: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
[GitHub] [hadoop] zhangxiping1 commented on a diff in pull request #4424: HDFS-16628 RBF: kerbose user remove Non-default namespace data failed.
Posted by GitBox <gi...@apache.org>.
zhangxiping1 commented on code in PR #4424:
URL: https://github.com/apache/hadoop/pull/4424#discussion_r894365791
##########
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,
Review Comment:
OK, thank you for your correction.
--
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: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
[GitHub] [hadoop] Hexiaoqiao commented on a diff in pull request #4424: HDFS-16628 RBF: kerbose user remove Non-default namespace data failed.
Posted by GitBox <gi...@apache.org>.
Hexiaoqiao commented on code in PR #4424:
URL: https://github.com/apache/hadoop/pull/4424#discussion_r894348979
##########
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,
Review Comment:
testMoveToTrashNoMountPointWithKerBoersUser -> testMoveToTrasWithKerberosUser?
a. IMO, this case is not related with `NoMountPoint` or not, right?
b. KerBoers -> Kerberos.
##########
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/dev@HADOOP.COM";
Review Comment:
Suggest to correct `KerBoers` to `Kerberos`. Both of the following spell issues.
##########
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/dev@HADOOP.COM";
+ 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:
If only one DFSClient and NamenodeContext is enough for this unit test?
##########
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/dev@HADOOP.COM";
+ 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());
+
+ // test user client
+ DFSClient testUserClientNs1 = nn1Context.getClient(ugi);
+ testUserClientNs1.mkdirs(MOUNT_POINT, new FsPermission("777"), true);
+ assertTrue(testUserClientNs1.exists(MOUNT_POINT));
+ // create test file
+ testUserClientNs1.create(FILE, true);
+ Path filePath = new Path(FILE);
+
+ FileStatus[] fileStatuses = routerFs.listStatus(filePath);
+ assertEquals(1, fileStatuses.length);
+ assertEquals(ugi.getShortUserName(), fileStatuses[0].getOwner());
+ // move to Trash
+ Configuration routerConf = routerContext.getConf();
+ FileSystem fs = DFSTestUtil.getFileSystemAs(ugi, routerConf);
+ Trash trash = new Trash(fs, routerConf);
+ assertTrue(trash.moveToTrash(filePath));
Review Comment:
Suggest to check if the final trash directory entries are expected: `/user/randomUser/.Trash/`?
--
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: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org
[GitHub] [hadoop] Hexiaoqiao merged pull request #4424: HDFS-16628 RBF: Correct target directory when move to trash for kerberos login user.
Posted by GitBox <gi...@apache.org>.
Hexiaoqiao merged PR #4424:
URL: https://github.com/apache/hadoop/pull/4424
--
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: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org