diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 40891bfc519..393bb000ac0 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -537,6 +537,9 @@ Release 2.6.0 - UNRELEASED HDFS-6779. Add missing version subcommand for hdfs. (Sasaki Toru via wheat9) + HDFS-7153. Add storagePolicy to NN edit log during file creation. + (Arpit Agarwal) + OPTIMIZATIONS HDFS-6690. Deduplicate xattr names in memory. (wang) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java index ed8523dda2f..0d999e31a26 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java @@ -279,9 +279,8 @@ public class FSDirectory implements Closeable { private static INodeFile newINodeFile(long id, PermissionStatus permissions, long mtime, long atime, short replication, long preferredBlockSize) { - return new INodeFile(id, null, permissions, mtime, atime, - BlockInfo.EMPTY_ARRAY, replication, preferredBlockSize, - (byte) 0); + return newINodeFile(id, permissions, mtime, atime, replication, preferredBlockSize, + (byte)0); } private static INodeFile newINodeFile(long id, PermissionStatus permissions, diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/editsStored b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/editsStored index ecfbb9f5fca..08607ebb520 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 56c435d59fd..5e1d7186ed4 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/editsStored.xml +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/editsStored.xml @@ -13,8 +13,8 @@ 2 1 - 1411947941261 - 8d8d1ef3d703885f + 1412805665311 + c1cad1109e33ae77 @@ -24,8 +24,8 @@ 3 2 - 1411947941264 - f9e15cfbecdc6579 + 1412805665314 + 0632068587d6574c @@ -37,11 +37,10 @@ 16386 /file_create 1 - 1411256743112 - 1411256743112 + 1412114467969 + 1412114467969 512 - false - DFSClient_NONMAPREDUCE_486984878_1 + DFSClient_NONMAPREDUCE_1474796918_1 127.0.0.1 true @@ -49,8 +48,8 @@ supergroup 420 - 1cfaa904-5f61-4cfa-87de-ce569d334c0b - 7 + 0a28b871-f75a-46a4-80e0-fe41cbb6b034 + 13 @@ -61,10 +60,9 @@ 0 /file_create 1 - 1411256743162 - 1411256743112 + 1412114468019 + 1412114467969 512 - false false @@ -90,9 +88,9 @@ 0 /file_create /file_moved - 1411256743174 - 1cfaa904-5f61-4cfa-87de-ce569d334c0b - 10 + 1412114468027 + 0a28b871-f75a-46a4-80e0-fe41cbb6b034 + 16 @@ -101,9 +99,9 @@ 8 0 /file_moved - 1411256743184 - 1cfaa904-5f61-4cfa-87de-ce569d334c0b - 11 + 1412114468034 + 0a28b871-f75a-46a4-80e0-fe41cbb6b034 + 17 @@ -113,7 +111,7 @@ 0 16387 /directory_mkdir - 1411256743193 + 1412114468041 aagarwal supergroup @@ -148,8 +146,8 @@ 13 /directory_mkdir snapshot1 - 1cfaa904-5f61-4cfa-87de-ce569d334c0b - 16 + 0a28b871-f75a-46a4-80e0-fe41cbb6b034 + 22 @@ -159,8 +157,8 @@ /directory_mkdir snapshot1 snapshot2 - 1cfaa904-5f61-4cfa-87de-ce569d334c0b - 17 + 0a28b871-f75a-46a4-80e0-fe41cbb6b034 + 23 @@ -169,8 +167,8 @@ 15 /directory_mkdir snapshot2 - 1cfaa904-5f61-4cfa-87de-ce569d334c0b - 18 + 0a28b871-f75a-46a4-80e0-fe41cbb6b034 + 24 @@ -181,11 +179,10 @@ 16388 /file_create 1 - 1411256743237 - 1411256743237 + 1412114468073 + 1412114468073 512 - false - DFSClient_NONMAPREDUCE_486984878_1 + DFSClient_NONMAPREDUCE_1474796918_1 127.0.0.1 true @@ -193,8 +190,8 @@ supergroup 420 - 1cfaa904-5f61-4cfa-87de-ce569d334c0b - 19 + 0a28b871-f75a-46a4-80e0-fe41cbb6b034 + 25 @@ -205,10 +202,9 @@ 0 /file_create 1 - 1411256743239 - 1411256743237 + 1412114468075 + 1412114468073 512 - false false @@ -269,10 +265,10 @@ 0 /file_create /file_moved - 1411256743285 + 1412114468093 NONE - 1cfaa904-5f61-4cfa-87de-ce569d334c0b - 26 + 0a28b871-f75a-46a4-80e0-fe41cbb6b034 + 32 @@ -283,11 +279,10 @@ 16389 /file_concat_target 1 - 1411256743290 - 1411256743290 + 1412114468097 + 1412114468097 512 - false - DFSClient_NONMAPREDUCE_486984878_1 + DFSClient_NONMAPREDUCE_1474796918_1 127.0.0.1 true @@ -295,8 +290,8 @@ supergroup 420 - 1cfaa904-5f61-4cfa-87de-ce569d334c0b - 28 + 0a28b871-f75a-46a4-80e0-fe41cbb6b034 + 34 @@ -401,10 +396,9 @@ 0 /file_concat_target 1 - 1411256743982 - 1411256743290 + 1412114468349 + 1412114468097 512 - false false @@ -438,11 +432,10 @@ 16390 /file_concat_0 1 - 1411256743986 - 1411256743986 + 1412114468351 + 1412114468351 512 - false - DFSClient_NONMAPREDUCE_486984878_1 + DFSClient_NONMAPREDUCE_1474796918_1 127.0.0.1 true @@ -450,8 +443,8 @@ supergroup 420 - 1cfaa904-5f61-4cfa-87de-ce569d334c0b - 41 + 0a28b871-f75a-46a4-80e0-fe41cbb6b034 + 47 @@ -556,10 +549,9 @@ 0 /file_concat_0 1 - 1411256744012 - 1411256743986 + 1412114468370 + 1412114468351 512 - false false @@ -593,11 +585,10 @@ 16391 /file_concat_1 1 - 1411256744015 - 1411256744015 + 1412114468373 + 1412114468373 512 - false - DFSClient_NONMAPREDUCE_486984878_1 + DFSClient_NONMAPREDUCE_1474796918_1 127.0.0.1 true @@ -605,8 +596,8 @@ supergroup 420 - 1cfaa904-5f61-4cfa-87de-ce569d334c0b - 53 + 0a28b871-f75a-46a4-80e0-fe41cbb6b034 + 59 @@ -711,10 +702,9 @@ 0 /file_concat_1 1 - 1411256744037 - 1411256744015 + 1412114468392 + 1412114468373 512 - false false @@ -746,13 +736,13 @@ 57 0 /file_concat_target - 1411256744046 + 1412114468395 /file_concat_0 /file_concat_1 - 1cfaa904-5f61-4cfa-87de-ce569d334c0b - 64 + 0a28b871-f75a-46a4-80e0-fe41cbb6b034 + 70 @@ -763,15 +753,15 @@ 16392 /file_symlink /file_concat_target - 1411256744061 - 1411256744061 + 1412114468398 + 1412114468398 aagarwal supergroup 511 - 1cfaa904-5f61-4cfa-87de-ce569d334c0b - 65 + 0a28b871-f75a-46a4-80e0-fe41cbb6b034 + 71 @@ -782,11 +772,10 @@ 16393 /hard-lease-recovery-test 1 - 1411256744064 - 1411256744064 + 1412114468401 + 1412114468401 512 - false - DFSClient_NONMAPREDUCE_486984878_1 + DFSClient_NONMAPREDUCE_1474796918_1 127.0.0.1 true @@ -794,8 +783,8 @@ supergroup 420 - 1cfaa904-5f61-4cfa-87de-ce569d334c0b - 66 + 0a28b871-f75a-46a4-80e0-fe41cbb6b034 + 72 @@ -851,23 +840,7 @@ OP_REASSIGN_LEASE 65 - DFSClient_NONMAPREDUCE_486984878_1 - /hard-lease-recovery-test - HDFS_NameNode - - - - OP_SET_GENSTAMP_V2 - - 66 - 1012 - - - - OP_REASSIGN_LEASE - - 67 - HDFS_NameNode + DFSClient_NONMAPREDUCE_1474796918_1 /hard-lease-recovery-test HDFS_NameNode @@ -875,22 +848,21 @@ OP_CLOSE - 68 + 66 0 0 /hard-lease-recovery-test 1 - 1411256749029 - 1411256744064 + 1412114470807 + 1412114468401 512 - false false 1073741834 11 - 1012 + 1011 aagarwal @@ -902,72 +874,72 @@ OP_ADD_CACHE_POOL - 69 + 67 pool1 aagarwal staff 493 9223372036854775807 2305843009213693951 - 1cfaa904-5f61-4cfa-87de-ce569d334c0b - 74 + 0a28b871-f75a-46a4-80e0-fe41cbb6b034 + 79 OP_MODIFY_CACHE_POOL - 70 + 68 pool1 99 - 1cfaa904-5f61-4cfa-87de-ce569d334c0b - 75 + 0a28b871-f75a-46a4-80e0-fe41cbb6b034 + 80 OP_ADD_CACHE_DIRECTIVE - 71 + 69 1 /path 1 pool1 - 2305844420470443079 - 1cfaa904-5f61-4cfa-87de-ce569d334c0b - 76 + 2305844421328165416 + 0a28b871-f75a-46a4-80e0-fe41cbb6b034 + 81 OP_MODIFY_CACHE_DIRECTIVE - 72 + 70 1 2 - 1cfaa904-5f61-4cfa-87de-ce569d334c0b - 77 + 0a28b871-f75a-46a4-80e0-fe41cbb6b034 + 82 OP_REMOVE_CACHE_DIRECTIVE - 73 + 71 1 - 1cfaa904-5f61-4cfa-87de-ce569d334c0b - 78 + 0a28b871-f75a-46a4-80e0-fe41cbb6b034 + 83 OP_REMOVE_CACHE_POOL - 74 + 72 pool1 - 1cfaa904-5f61-4cfa-87de-ce569d334c0b - 79 + 0a28b871-f75a-46a4-80e0-fe41cbb6b034 + 84 OP_SET_ACL - 75 + 73 /file_concat_target ACCESS @@ -1000,62 +972,62 @@ OP_SET_XATTR - 76 + 74 /file_concat_target USER a1 0x313233 - 1cfaa904-5f61-4cfa-87de-ce569d334c0b - 81 + 0a28b871-f75a-46a4-80e0-fe41cbb6b034 + 86 OP_SET_XATTR - 77 + 75 /file_concat_target USER a2 0x373839 - 1cfaa904-5f61-4cfa-87de-ce569d334c0b - 82 + 0a28b871-f75a-46a4-80e0-fe41cbb6b034 + 87 OP_REMOVE_XATTR - 78 + 76 /file_concat_target USER a2 - 1cfaa904-5f61-4cfa-87de-ce569d334c0b - 83 + 0a28b871-f75a-46a4-80e0-fe41cbb6b034 + 88 OP_ROLLING_UPGRADE_START - 79 - 1411256749298 + 77 + 1412114471510 OP_ROLLING_UPGRADE_FINALIZE - 80 - 1411256749298 + 78 + 1412114471510 OP_END_LOG_SEGMENT - 81 + 79