diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java index 174f973fecb..96e50dfb553 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java @@ -1079,6 +1079,8 @@ public class DFSTestUtil { FSDataOutputStream s = filesystem.create(pathFileCreate); // OP_CLOSE 9 s.close(); + // OP_SET_STORAGE_POLICY 45 + filesystem.setStoragePolicy(pathFileCreate, "HOT"); // OP_RENAME_OLD 1 final Path pathFileMoved = new Path("/file_moved"); filesystem.rename(pathFileCreate, pathFileMoved); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/editsStored b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/editsStored index e69de29bb2d..3b66d43e8d0 100644 Binary files a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/editsStored and b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/editsStored differ diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/editsStored.xml b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/editsStored.xml index e69de29bb2d..c8eecc30006 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/editsStored.xml +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/editsStored.xml @@ -0,0 +1,1033 @@ + + + -59 + + OP_START_LOG_SEGMENT + + 1 + + + + OP_UPDATE_MASTER_KEY + + 2 + + 1 + 1410634509611 + 201e2572e03d089c + + + + + OP_UPDATE_MASTER_KEY + + 3 + + 2 + 1410634509614 + ef4542e27fb38301 + + + + + OP_ADD + + 4 + 0 + 16386 + /file_create + 1 + 1409943310217 + 1409943310217 + 512 + DFSClient_NONMAPREDUCE_588677218_1 + 127.0.0.1 + true + + jing + supergroup + 420 + + e33c0cc9-12b1-49a2-80eb-4d35d3b79960 + 5 + + + + OP_CLOSE + + 5 + 0 + 0 + /file_create + 1 + 1409943310240 + 1409943310217 + 512 + + + false + + jing + supergroup + 420 + + + + + OP_SET_STORAGE_POLICY + + 6 + /file_create + 12 + + + + OP_RENAME_OLD + + 7 + 0 + /file_create + /file_moved + 1409943310247 + e33c0cc9-12b1-49a2-80eb-4d35d3b79960 + 8 + + + + OP_DELETE + + 8 + 0 + /file_moved + 1409943310253 + e33c0cc9-12b1-49a2-80eb-4d35d3b79960 + 9 + + + + OP_MKDIR + + 9 + 0 + 16387 + /directory_mkdir + 1409943310260 + + jing + supergroup + 493 + + + + + OP_ALLOW_SNAPSHOT + + 10 + /directory_mkdir + + + + OP_DISALLOW_SNAPSHOT + + 11 + /directory_mkdir + + + + OP_ALLOW_SNAPSHOT + + 12 + /directory_mkdir + + + + OP_CREATE_SNAPSHOT + + 13 + /directory_mkdir + snapshot1 + e33c0cc9-12b1-49a2-80eb-4d35d3b79960 + 14 + + + + OP_RENAME_SNAPSHOT + + 14 + /directory_mkdir + snapshot1 + snapshot2 + e33c0cc9-12b1-49a2-80eb-4d35d3b79960 + 15 + + + + OP_DELETE_SNAPSHOT + + 15 + /directory_mkdir + snapshot2 + e33c0cc9-12b1-49a2-80eb-4d35d3b79960 + 16 + + + + OP_ADD + + 16 + 0 + 16388 + /file_create + 1 + 1409943310284 + 1409943310284 + 512 + DFSClient_NONMAPREDUCE_588677218_1 + 127.0.0.1 + true + + jing + supergroup + 420 + + e33c0cc9-12b1-49a2-80eb-4d35d3b79960 + 17 + + + + OP_CLOSE + + 17 + 0 + 0 + /file_create + 1 + 1409943310286 + 1409943310284 + 512 + + + false + + jing + supergroup + 420 + + + + + OP_SET_REPLICATION + + 18 + /file_create + 1 + + + + OP_SET_PERMISSIONS + + 19 + /file_create + 511 + + + + OP_SET_OWNER + + 20 + /file_create + newOwner + + + + OP_TIMES + + 21 + 0 + /file_create + 1285195527000 + 1285195527000 + + + + OP_SET_QUOTA + + 22 + /directory_mkdir + 1000 + -1 + + + + OP_RENAME + + 23 + 0 + /file_create + /file_moved + 1409943310302 + NONE + e33c0cc9-12b1-49a2-80eb-4d35d3b79960 + 24 + + + + OP_ADD + + 24 + 0 + 16389 + /file_concat_target + 1 + 1409943310306 + 1409943310306 + 512 + DFSClient_NONMAPREDUCE_588677218_1 + 127.0.0.1 + true + + jing + supergroup + 420 + + e33c0cc9-12b1-49a2-80eb-4d35d3b79960 + 26 + + + + OP_ALLOCATE_BLOCK_ID + + 25 + 1073741825 + + + + OP_SET_GENSTAMP_V2 + + 26 + 1001 + + + + OP_ADD_BLOCK + + 27 + /file_concat_target + + 1073741825 + 0 + 1001 + + + -2 + + + + OP_ALLOCATE_BLOCK_ID + + 28 + 1073741826 + + + + OP_SET_GENSTAMP_V2 + + 29 + 1002 + + + + OP_ADD_BLOCK + + 30 + /file_concat_target + + 1073741825 + 512 + 1001 + + + 1073741826 + 0 + 1002 + + + -2 + + + + OP_ALLOCATE_BLOCK_ID + + 31 + 1073741827 + + + + OP_SET_GENSTAMP_V2 + + 32 + 1003 + + + + OP_ADD_BLOCK + + 33 + /file_concat_target + + 1073741826 + 512 + 1002 + + + 1073741827 + 0 + 1003 + + + -2 + + + + OP_CLOSE + + 34 + 0 + 0 + /file_concat_target + 1 + 1409943310402 + 1409943310306 + 512 + + + false + + 1073741825 + 512 + 1001 + + + 1073741826 + 512 + 1002 + + + 1073741827 + 512 + 1003 + + + jing + supergroup + 420 + + + + + OP_ADD + + 35 + 0 + 16390 + /file_concat_0 + 1 + 1409943310407 + 1409943310407 + 512 + DFSClient_NONMAPREDUCE_588677218_1 + 127.0.0.1 + true + + jing + supergroup + 420 + + e33c0cc9-12b1-49a2-80eb-4d35d3b79960 + 39 + + + + OP_ALLOCATE_BLOCK_ID + + 36 + 1073741828 + + + + OP_SET_GENSTAMP_V2 + + 37 + 1004 + + + + OP_ADD_BLOCK + + 38 + /file_concat_0 + + 1073741828 + 0 + 1004 + + + -2 + + + + OP_ALLOCATE_BLOCK_ID + + 39 + 1073741829 + + + + OP_SET_GENSTAMP_V2 + + 40 + 1005 + + + + OP_ADD_BLOCK + + 41 + /file_concat_0 + + 1073741828 + 512 + 1004 + + + 1073741829 + 0 + 1005 + + + -2 + + + + OP_ALLOCATE_BLOCK_ID + + 42 + 1073741830 + + + + OP_SET_GENSTAMP_V2 + + 43 + 1006 + + + + OP_ADD_BLOCK + + 44 + /file_concat_0 + + 1073741829 + 512 + 1005 + + + 1073741830 + 0 + 1006 + + + -2 + + + + OP_CLOSE + + 45 + 0 + 0 + /file_concat_0 + 1 + 1409943310430 + 1409943310407 + 512 + + + false + + 1073741828 + 512 + 1004 + + + 1073741829 + 512 + 1005 + + + 1073741830 + 512 + 1006 + + + jing + supergroup + 420 + + + + + OP_ADD + + 46 + 0 + 16391 + /file_concat_1 + 1 + 1409943310434 + 1409943310434 + 512 + DFSClient_NONMAPREDUCE_588677218_1 + 127.0.0.1 + true + + jing + supergroup + 420 + + e33c0cc9-12b1-49a2-80eb-4d35d3b79960 + 51 + + + + OP_ALLOCATE_BLOCK_ID + + 47 + 1073741831 + + + + OP_SET_GENSTAMP_V2 + + 48 + 1007 + + + + OP_ADD_BLOCK + + 49 + /file_concat_1 + + 1073741831 + 0 + 1007 + + + -2 + + + + OP_ALLOCATE_BLOCK_ID + + 50 + 1073741832 + + + + OP_SET_GENSTAMP_V2 + + 51 + 1008 + + + + OP_ADD_BLOCK + + 52 + /file_concat_1 + + 1073741831 + 512 + 1007 + + + 1073741832 + 0 + 1008 + + + -2 + + + + OP_ALLOCATE_BLOCK_ID + + 53 + 1073741833 + + + + OP_SET_GENSTAMP_V2 + + 54 + 1009 + + + + OP_ADD_BLOCK + + 55 + /file_concat_1 + + 1073741832 + 512 + 1008 + + + 1073741833 + 0 + 1009 + + + -2 + + + + OP_CLOSE + + 56 + 0 + 0 + /file_concat_1 + 1 + 1409943310457 + 1409943310434 + 512 + + + false + + 1073741831 + 512 + 1007 + + + 1073741832 + 512 + 1008 + + + 1073741833 + 512 + 1009 + + + jing + supergroup + 420 + + + + + OP_CONCAT_DELETE + + 57 + 0 + /file_concat_target + 1409943310460 + + /file_concat_0 + /file_concat_1 + + e33c0cc9-12b1-49a2-80eb-4d35d3b79960 + 62 + + + + OP_SYMLINK + + 58 + 0 + 16392 + /file_symlink + /file_concat_target + 1409943310463 + 1409943310463 + + jing + supergroup + 511 + + e33c0cc9-12b1-49a2-80eb-4d35d3b79960 + 63 + + + + OP_ADD + + 59 + 0 + 16393 + /hard-lease-recovery-test + 1 + 1409943310466 + 1409943310466 + 512 + DFSClient_NONMAPREDUCE_588677218_1 + 127.0.0.1 + true + + jing + supergroup + 420 + + e33c0cc9-12b1-49a2-80eb-4d35d3b79960 + 64 + + + + OP_ALLOCATE_BLOCK_ID + + 60 + 1073741834 + + + + OP_SET_GENSTAMP_V2 + + 61 + 1010 + + + + OP_ADD_BLOCK + + 62 + /hard-lease-recovery-test + + 1073741834 + 0 + 1010 + + + -2 + + + + OP_UPDATE_BLOCKS + + 63 + /hard-lease-recovery-test + + 1073741834 + 11 + 1010 + + + -2 + + + + OP_SET_GENSTAMP_V2 + + 64 + 1011 + + + + OP_REASSIGN_LEASE + + 65 + DFSClient_NONMAPREDUCE_588677218_1 + /hard-lease-recovery-test + HDFS_NameNode + + + + OP_CLOSE + + 66 + 0 + 0 + /hard-lease-recovery-test + 1 + 1409943313176 + 1409943310466 + 512 + + + false + + 1073741834 + 11 + 1011 + + + jing + supergroup + 420 + + + + + OP_ADD_CACHE_POOL + + 67 + pool1 + jing + staff + 493 + 9223372036854775807 + 2305843009213693951 + e33c0cc9-12b1-49a2-80eb-4d35d3b79960 + 71 + + + + OP_MODIFY_CACHE_POOL + + 68 + pool1 + 99 + e33c0cc9-12b1-49a2-80eb-4d35d3b79960 + 72 + + + + OP_ADD_CACHE_DIRECTIVE + + 69 + 1 + /path + 1 + pool1 + 2305844419157007447 + e33c0cc9-12b1-49a2-80eb-4d35d3b79960 + 73 + + + + OP_MODIFY_CACHE_DIRECTIVE + + 70 + 1 + 2 + e33c0cc9-12b1-49a2-80eb-4d35d3b79960 + 74 + + + + OP_REMOVE_CACHE_DIRECTIVE + + 71 + 1 + e33c0cc9-12b1-49a2-80eb-4d35d3b79960 + 75 + + + + OP_REMOVE_CACHE_POOL + + 72 + pool1 + e33c0cc9-12b1-49a2-80eb-4d35d3b79960 + 76 + + + + OP_SET_ACL + + 73 + /file_concat_target + + ACCESS + USER + rw- + + + ACCESS + USER + user + rw- + + + ACCESS + GROUP + -w- + + + ACCESS + MASK + rw- + + + ACCESS + OTHER + --- + + + + + OP_SET_XATTR + + 74 + /file_concat_target + + USER + a1 + 0x313233 + + e33c0cc9-12b1-49a2-80eb-4d35d3b79960 + 78 + + + + OP_SET_XATTR + + 75 + /file_concat_target + + USER + a2 + 0x373839 + + e33c0cc9-12b1-49a2-80eb-4d35d3b79960 + 79 + + + + OP_REMOVE_XATTR + + 76 + /file_concat_target + + USER + a2 + + e33c0cc9-12b1-49a2-80eb-4d35d3b79960 + 80 + + + + OP_ROLLING_UPGRADE_START + + 77 + 1409943313537 + + + + OP_ROLLING_UPGRADE_FINALIZE + + 78 + 1409943313537 + + + + OP_END_LOG_SEGMENT + + 79 + + +