HDFS-4245. Include snapshot related operations in TestOfflineEditsViewer. Contributed by Jing Zhao
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/HDFS-2802@1432592 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ad1cd71b10
commit
bc0aff27a4
|
@ -97,3 +97,6 @@ Branch-2802 Snapshot (Unreleased)
|
||||||
via szetszwo)
|
via szetszwo)
|
||||||
|
|
||||||
HDFS-4244. Support snapshot deletion. (Jing Zhao via szetszwo)
|
HDFS-4244. Support snapshot deletion. (Jing Zhao via szetszwo)
|
||||||
|
|
||||||
|
HDFS-4245. Include snapshot related operations in TestOfflineEditsViewer.
|
||||||
|
(Jing Zhao via szetszwo)
|
||||||
|
|
|
@ -155,6 +155,19 @@ public class OfflineEditsViewerHelper {
|
||||||
// OP_MKDIR 3
|
// OP_MKDIR 3
|
||||||
Path pathDirectoryMkdir = new Path("/directory_mkdir");
|
Path pathDirectoryMkdir = new Path("/directory_mkdir");
|
||||||
dfs.mkdirs(pathDirectoryMkdir);
|
dfs.mkdirs(pathDirectoryMkdir);
|
||||||
|
// OP_ALLOW_SNAPSHOT 29
|
||||||
|
dfs.allowSnapshot(pathDirectoryMkdir.toString());
|
||||||
|
// OP_DISALLOW_SNAPSHOT 30
|
||||||
|
dfs.disallowSnapshot(pathDirectoryMkdir.toString());
|
||||||
|
// OP_CREATE_SNAPSHOT 26
|
||||||
|
String ssName = "snapshot1";
|
||||||
|
dfs.allowSnapshot(pathDirectoryMkdir.toString());
|
||||||
|
dfs.createSnapshot(pathDirectoryMkdir, ssName);
|
||||||
|
// OP_RENAME_SNAPSHOT 28
|
||||||
|
String ssNewName = "snapshot2";
|
||||||
|
dfs.renameSnapshot(pathDirectoryMkdir, ssName, ssNewName);
|
||||||
|
// OP_DELETE_SNAPSHOT 27
|
||||||
|
dfs.deleteSnapshot(pathDirectoryMkdir, ssNewName);
|
||||||
// OP_SET_REPLICATION 4
|
// OP_SET_REPLICATION 4
|
||||||
s = dfs.create(pathFileCreate);
|
s = dfs.create(pathFileCreate);
|
||||||
s.close();
|
s.close();
|
||||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue