-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HDFS-16791. Add getEnclosingRoot() API to filesystem interface and implementations #6198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -193,34 +193,34 @@ Path getTrashRootInFallBackFS() throws IOException { | |
| @Test | ||
| public void testTrashRootsAfterEncryptionZoneDeletion() throws Exception { | ||
| try { | ||
| final Path zone = new Path("/EZ"); | ||
| fsTarget.mkdirs(zone); | ||
| final Path zone1 = new Path("/EZ/zone1"); | ||
| fsTarget.mkdirs(zone1); | ||
|
|
||
| DFSTestUtil.createKey("test_key", cluster, CONF); | ||
| HdfsAdmin hdfsAdmin = new HdfsAdmin(cluster.getURI(0), CONF); | ||
| final EnumSet<CreateEncryptionZoneFlag> provisionTrash = | ||
| EnumSet.of(CreateEncryptionZoneFlag.PROVISION_TRASH); | ||
| hdfsAdmin.createEncryptionZone(zone1, "test_key", provisionTrash); | ||
|
|
||
| final Path encFile = new Path(zone1, "encFile"); | ||
| DFSTestUtil.createFile(fsTarget, encFile, 10240, (short) 1, 0xFEED); | ||
|
|
||
| Configuration clientConf = new Configuration(CONF); | ||
| clientConf.setLong(FS_TRASH_INTERVAL_KEY, 1); | ||
| clientConf.set("fs.default.name", fsTarget.getUri().toString()); | ||
| FsShell shell = new FsShell(clientConf); | ||
|
|
||
| //Verify file deletion within EZ | ||
| DFSTestUtil.verifyDelete(shell, fsTarget, encFile, true); | ||
| assertTrue("ViewFileSystem trash roots should include EZ file trash", | ||
| (fsView.getTrashRoots(true).size() == 1)); | ||
|
|
||
| //Verify deletion of EZ | ||
| DFSTestUtil.verifyDelete(shell, fsTarget, zone, true); | ||
| assertTrue("ViewFileSystem trash roots should include EZ zone trash", | ||
| (fsView.getTrashRoots(true).size() == 2)); | ||
| final Path zone = new Path("/EZ"); | ||
| fsTarget.mkdirs(zone); | ||
| final Path zone1 = new Path("/EZ/zone1"); | ||
| fsTarget.mkdirs(zone1); | ||
|
|
||
| DFSTestUtil.createKey("test_key", cluster, CONF); | ||
| HdfsAdmin hdfsAdmin = new HdfsAdmin(cluster.getURI(0), CONF); | ||
| final EnumSet<CreateEncryptionZoneFlag> provisionTrash = | ||
| EnumSet.of(CreateEncryptionZoneFlag.PROVISION_TRASH); | ||
| hdfsAdmin.createEncryptionZone(zone1, "test_key", provisionTrash); | ||
|
|
||
| final Path encFile = new Path(zone1, "encFile"); | ||
| DFSTestUtil.createFile(fsTarget, encFile, 10240, (short) 1, 0xFEED); | ||
|
|
||
| Configuration clientConf = new Configuration(CONF); | ||
| clientConf.setLong(FS_TRASH_INTERVAL_KEY, 1); | ||
| clientConf.set("fs.default.name", fsTarget.getUri().toString()); | ||
| FsShell shell = new FsShell(clientConf); | ||
|
|
||
| //Verify file deletion within EZ | ||
| DFSTestUtil.verifyDelete(shell, fsTarget, encFile, true); | ||
| assertTrue("ViewFileSystem trash roots should include EZ file trash", | ||
| (fsView.getTrashRoots(true).size() == 1)); | ||
|
|
||
| //Verify deletion of EZ | ||
| DFSTestUtil.verifyDelete(shell, fsTarget, zone, true); | ||
| assertTrue("ViewFileSystem trash roots should include EZ zone trash", | ||
| (fsView.getTrashRoots(true).size() == 2)); | ||
| } finally { | ||
| DFSTestUtil.deleteKey("test_key", cluster); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we do this in a separate JIRA?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If i recall correctly I needed to add this because a test was failing. My new tests also use test keys, and i don't think this cleanup is correct between tests. |
||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.