HDFS-11084. Add a regression test for sticky bit support of OIV ReverseXML processor. Contributed by Wei-Chiu Chuang.
This commit is contained in:
parent
1fa084c425
commit
0cf5993712
|
@ -69,6 +69,8 @@ import org.apache.hadoop.fs.FileStatus;
|
||||||
import org.apache.hadoop.fs.FileSystem;
|
import org.apache.hadoop.fs.FileSystem;
|
||||||
import org.apache.hadoop.fs.FileSystemTestHelper;
|
import org.apache.hadoop.fs.FileSystemTestHelper;
|
||||||
import org.apache.hadoop.fs.Path;
|
import org.apache.hadoop.fs.Path;
|
||||||
|
import org.apache.hadoop.fs.permission.FsAction;
|
||||||
|
import org.apache.hadoop.fs.permission.FsPermission;
|
||||||
import org.apache.hadoop.hdfs.DFSConfigKeys;
|
import org.apache.hadoop.hdfs.DFSConfigKeys;
|
||||||
import org.apache.hadoop.hdfs.DFSTestUtil;
|
import org.apache.hadoop.hdfs.DFSTestUtil;
|
||||||
import org.apache.hadoop.hdfs.DistributedFileSystem;
|
import org.apache.hadoop.hdfs.DistributedFileSystem;
|
||||||
|
@ -158,6 +160,15 @@ public class TestOfflineImageViewer {
|
||||||
hdfs.mkdirs(invalidXMLDir);
|
hdfs.mkdirs(invalidXMLDir);
|
||||||
dirCount++;
|
dirCount++;
|
||||||
|
|
||||||
|
//Create a directory with sticky bits
|
||||||
|
Path stickyBitDir = new Path("/stickyBit");
|
||||||
|
hdfs.mkdirs(stickyBitDir);
|
||||||
|
hdfs.setPermission(stickyBitDir, new FsPermission(FsAction.ALL,
|
||||||
|
FsAction.ALL, FsAction.ALL, true));
|
||||||
|
dirCount++;
|
||||||
|
writtenFiles.put(stickyBitDir.toString(),
|
||||||
|
hdfs.getFileStatus(stickyBitDir));
|
||||||
|
|
||||||
// Get delegation tokens so we log the delegation token op
|
// Get delegation tokens so we log the delegation token op
|
||||||
Token<?>[] delegationTokens = hdfs
|
Token<?>[] delegationTokens = hdfs
|
||||||
.addDelegationTokens(TEST_RENEWER, null);
|
.addDelegationTokens(TEST_RENEWER, null);
|
||||||
|
|
Loading…
Reference in New Issue