CHANGES.HDFS-2802.txt 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. Branch-2802 Snapshot (Unreleased)
  19. HDFS-4076. Support snapshot of single files. (szetszwo)
  20. HDFS-4082. Add editlog opcodes for snapshot create and delete operations.
  21. (suresh via szetszwo)
  22. HDFS-4086. Add editlog opcodes to allow and disallow snapshots on a
  23. directory. (Brandon Li via suresh)
  24. HDFS-4083. Protocol changes for snapshots. (suresh)
  25. HDFS-4077. Add support for Snapshottable Directory. (szetszwo via suresh)
  26. HDFS-4087. Protocol changes for listSnapshots functionality.
  27. (Brandon Li via suresh)
  28. HDFS-4079. Add SnapshotManager which maintains a list for all the
  29. snapshottable directories and supports snapshot methods such as setting a
  30. directory to snapshottable and creating a snapshot. (szetszwo)
  31. HDFS-4078. Handle replication in snapshots. (szetszwo)
  32. HDFS-4084. Provide CLI support to allow and disallow snapshot
  33. on a directory. (Brondon Li via suresh)
  34. HDFS-4091. Add snapshot quota to limit the number of snapshots allowed.
  35. (szetszwo)
  36. HDFS-4097. Provide CLI support for createSnapshot. (Brandon Li via suresh)
  37. HDFS-4092. Update file deletion logic for snapshot so that the current inode
  38. is removed from the circular linked list; and if some blocks at the end of the
  39. block list no longer belong to any other inode, collect them and update the
  40. block list. (szetszwo)
  41. HDFS-4111. Support snapshot of subtrees. (szetszwo via suresh)
  42. HDFS-4119. Complete the allowSnapshot code and add a test for it. (szetszwo)
  43. HDFS-4133. Add testcases for testing basic snapshot functionalities.
  44. (Jing Zhao via suresh)
  45. HDFS-4116. Add auditlog for some snapshot operations. (Jing Zhao via suresh)
  46. HDFS-4095. Add some snapshot related metrics. (Jing Zhao via suresh)
  47. HDFS-4141. Support directory diff - the difference between the current state
  48. and a previous snapshot of an INodeDirectory. (szetszwo)
  49. HDFS-4146. Use getter and setter in INodeFileWithLink to access blocks and
  50. initialize root directory as snapshottable. (szetszwo)
  51. HDFS-4149. Implement the disallowSnapshot(..) in FSNamesystem and add
  52. resetSnapshottable(..) to SnapshotManager. (szetszwo)
  53. HDFS-4147. When there is a snapshot in a subtree, deletion of the subtree
  54. should fail. (Jing Zhao via szetszwo)
  55. HDFS-4150. Update the inode in the block map when a snapshotted file or a
  56. snapshot file is deleted. (Jing Zhao via szetszwo)
  57. HDFS-4159. Rename should fail when the destination directory is snapshottable
  58. and has snapshots. (Jing Zhao via szetszwo)
  59. HDFS-4170. Add snapshot information to INodesInPath. (szetszwo)
  60. HDFS-4177. Add a snapshot parameter to INodeDirectory.getChildrenList() for
  61. selecting particular snapshot children list views. (szetszwo)
  62. HDFS-4148. Disallow write/modify operations on files and directories in a
  63. snapshot. (Brandon Li via suresh)
  64. HDFS-4188. Add Snapshot.ID_COMPARATOR for comparing IDs and fix a bug in
  65. ReadOnlyList.Util.binarySearch(..). (szetszwo)
  66. HDFS-4187. Add tests for replication handling in snapshots. (Jing Zhao via
  67. szetszwo)
  68. HDFS-4196. Support renaming of snapshots. (Jing Zhao via szetszwo)
  69. HDFS-4175. Additional snapshot tests for more complicated directory
  70. structure and modifications. (Jing Zhao via suresh)
  71. HDFS-4293. Fix TestSnapshot failure. (Jing Zhao via suresh)
  72. HDFS-4317. Change INode and its subclasses to support HDFS-4103. (szetszwo)
  73. HDFS-4103. Support O(1) snapshot creation. (szetszwo)
  74. HDFS-4330. Support snapshots up to the snapshot limit. (szetszwo)
  75. HDFS-4357. Fix a bug that if an inode is replaced, further INode operations
  76. should apply to the new inode. (Jing Zhao via szetszwo)
  77. HDFS-4230. Support listing of all the snapshottable directories. (Jing Zhao
  78. via szetszwo)
  79. HDFS-4244. Support snapshot deletion. (Jing Zhao via szetszwo)
  80. HDFS-4245. Include snapshot related operations in TestOfflineEditsViewer.
  81. (Jing Zhao via szetszwo)
  82. HDFS-4395. In INodeDirectorySnapshottable's constructor, the passed-in dir
  83. could be an INodeDirectoryWithSnapshot. (Jing Zhao via szetszwo)
  84. HDFS-4397. Fix a bug in INodeDirectoryWithSnapshot.Diff.combinePostDiff(..)
  85. that it may put the wrong node into the deleted list. (szetszwo)
  86. HDFS-4407. Change INodeDirectoryWithSnapshot.Diff.combinePostDiff(..) to
  87. merge-sort like and keep the postDiff parameter unmodified. (szetszwo)
  88. HDFS-4098. Add FileWithSnapshot, INodeFileUnderConstructionWithSnapshot and
  89. INodeFileUnderConstructionSnapshot for supporting append to snapshotted files.
  90. (szetszwo)
  91. HDFS-4126. Add reading/writing snapshot information to FSImage.
  92. (Jing Zhao via suresh)
  93. HDFS-4436. Change INode.recordModification(..) to return only the current
  94. inode and remove the updateCircularList parameter from some methods in
  95. INodeDirectoryWithSnapshot.Diff. (szetszwo)
  96. HDFS-4429. When the latest snapshot exists, INodeFileUnderConstruction should
  97. be replaced with INodeFileWithSnapshot but not INodeFile. (Jing Zhao
  98. via szetszwo)
  99. HDFS-4441. Move INodeDirectoryWithSnapshot.Diff and the related classes to a
  100. package. (szetszwo)
  101. HDFS-4432. Support INodeFileUnderConstructionWithSnapshot in FSImage
  102. saving/loading. (Jing Zhao via suresh)
  103. HDFS-4131. Add capability to namenode to get snapshot diff. (Jing Zhao via
  104. suresh)
  105. HDFS-4447. Refactor INodeDirectoryWithSnapshot for supporting general INode
  106. diff lists. (szetszwo)
  107. HDFS-4189. Renames the getMutableXxx methods to getXxx4Write and fix a bug
  108. that some getExistingPathINodes calls should be getINodesInPath4Write.
  109. (szetszwo)
  110. HDFS-4361. When listing snapshottable directories, only return those
  111. where the user has permission to take snapshots. (Jing Zhao via szetszwo)
  112. HDFS-4464. Combine collectSubtreeBlocksAndClear with deleteDiffsForSnapshot
  113. and rename it to destroySubtreeAndCollectBlocks. (szetszwo)
  114. HDFS-4414. Add support for getting snapshot diff from DistributedFileSystem.
  115. (Jing Zhao via suresh)
  116. HDFS-4446. Support file snapshots with diff lists. (szetszwo)
  117. HDFS-4480. Eliminate the file snapshot circular linked list. (szetszwo)
  118. HDFS-4481. Change fsimage to support snapshot file diffs. (szetszwo)
  119. HDFS-4500. Refactor snapshot INode methods. (szetszwo)
  120. HDFS-4487. Fix snapshot diff report for HDFS-4446. (Jing Zhao via szetszwo)
  121. HDFS-4431. Support snapshot in OfflineImageViewer. (Jing Zhao via szetszwo)
  122. HDFS-4503. Update computeContentSummary(..), spaceConsumedInTree(..) and
  123. diskspaceConsumed(..) in INode for snapshot. (szetszwo)
  124. HDFS-4499. Fix file/directory/snapshot deletion for file diff. (Jing Zhao
  125. via szetszwo)
  126. HDFS-4524. Update SnapshotManager#snapshottables when loading fsimage.
  127. (Jing Zhao via szetszwo)
  128. HDFS-4520. Support listing snapshots under a snapshottable directory using ls.
  129. (Jing Zhao via szetszwo)
  130. HDFS-4514. Add CLI for supporting snapshot rename, diff report, and
  131. snapshottable directory listing. (Jing Zhao via szetszwo)
  132. HDFS-4523. Fix INodeFile replacement, TestQuota and javac errors from trunk
  133. merge. (szetszwo)
  134. HDFS-4507. Update quota verification for snapshots. (szetszwo)
  135. HDFS-4545. With snapshots, FSDirectory.unprotectedSetReplication(..) always
  136. changes file replication but it may or may not changes block replication.
  137. (szetszwo)
  138. HDFS-4557. Fix FSDirectory#delete when INode#cleanSubtree returns 0.
  139. (Jing Zhao via szetszwo)
  140. HDFS-4579. Annotate snapshot tests. (Arpit Agarwal via suresh)
  141. HDFS-4574. Move Diff to the util package. (szetszwo)
  142. HDFS-4563. Update namespace/diskspace usage after deleting snapshots.
  143. (Jing Zhao via szetszwo)
  144. HDFS-4144. Create test for all snapshot-related metrics.
  145. (Jing Zhao via suresh)
  146. HDFS-4556. Add snapshotdiff and LsSnapshottableDir tools to hdfs script.
  147. (Arpit Agarwal via szetszwo)
  148. HDFS-4534. Add INodeReference in order to support rename with snapshots.
  149. (szetszwo)
  150. HDFS-4616. Update the FilesDeleted metric while deleting file/dir in the
  151. current tree. (Jing Zhao via szetszwo)
  152. HDFS-4627. Fix FSImageFormat#Loader NPE and synchronization issues.
  153. (Jing Zhao via suresh)
  154. HDFS-4612. Not to use INode.getParent() when generating snapshot diff report.
  155. (Jing Zhao via szetszwo)
  156. HDFS-4636. Update quota usage when deleting files/dirs that were created
  157. after taking the latest snapshot. (Jing Zhao via szetszwo)
  158. HDFS-4648. For snapshot deletion, when merging the diff from to-delete
  159. snapshot to the prior snapshot, make sure files/directories created after
  160. the prior snapshot get deleted. (Jing Zhao via szetszwo)
  161. HDFS-4637. INodeDirectory#replaceSelf4Quota may incorrectly convert a newly
  162. created directory to an INodeDirectoryWithSnapshot. (Jing Zhao via szetszwo)
  163. HDFS-4611. Update FSImage for INodeReference. (szetszwo)
  164. HDFS-4647. Rename should call setLocalName after an inode is removed from
  165. snapshots. (Arpit Agarwal via szetszwo)
  166. HDFS-4684. Use INode id for image serialization when writing INodeReference.
  167. (szetszwo)
  168. HDFS-4675. Fix rename across snapshottable directories. (Jing Zhao via
  169. szetszwo)
  170. HDFS-4692. Use timestamp as default snapshot names. (szetszwo)
  171. HDFS-4666. Define ".snapshot" as a reserved inode name so that users cannot
  172. create a file/directory with ".snapshot" as the name. If ".snapshot" is used
  173. in a previous version of HDFS, it must be renamed before upgrade; otherwise,
  174. upgrade will fail. (szetszwo)
  175. HDFS-4700. Fix the undo section of rename with snapshots. (Jing Zhao via
  176. szetszwo)
  177. HDFS-4529. Disallow concat when one of the src files is in some snapshot.
  178. (szetszwo)
  179. HDFS-4550. Refactor INodeDirectory.INodesInPath to a standalone class.
  180. (szetszwo)
  181. HDFS-4707. Add snapshot methods to FilterFileSystem and fix findbugs warnings.
  182. (szetszwo)
  183. HDFS-4706. Do not replace root inode for disallowSnapshot. (szetszwo)
  184. HDFS-4717. Change the path parameter type of the snapshot methods in
  185. HdfsAdmin from String to Path. (szetszwo)
  186. HDFS-4708. Add snapshot user documentation. (szetszwo)
  187. HDFS-4726. Fix test failures after merging the INodeId-INode mapping
  188. from trunk. (Jing Zhao via szetszwo)
  189. HDFS-4727. Update inodeMap after deleting files/directories/snapshots.
  190. (Jing Zhao via szetszwo)
  191. HDFS-4719. Remove AbstractINodeDiff.Factory and move its methods to
  192. AbstractINodeDiffList. (Arpit Agarwal via szetszwo)
  193. HDFS-4735. DisallowSnapshot throws IllegalStateException for nested
  194. snapshottable directories. (Jing Zhao via szetszwo)
  195. HDFS-4738. Changes AbstractINodeDiff to implement Comparable<Integer>, and
  196. fix javadoc and other warnings. (szetszwo)
  197. HDFS-4686. Update quota computation for rename and INodeReference.
  198. (Jing Zhao via szetszwo)
  199. HDFS-4729. Fix OfflineImageViewer and permission checking for snapshot
  200. operations. (Jing Zhao via szetszwo)
  201. HDFS-4749. Use INodeId to identify the corresponding directory node in
  202. FSImage saving/loading. (Jing Zhao via szetszwo)
  203. HDFS-4742. Fix appending to a renamed file with snapshot. (Jing Zhao via
  204. szetszwo)
  205. HDFS-4755. Fix AccessControlException message and moves "implements
  206. LinkedElement" from INode to INodeWithAdditionalFields. (szetszwo)
  207. HDFS-4650. Fix a bug in FSDirectory and add more unit tests for rename with
  208. existence of snapshottable directories and snapshots. (Jing Zhao via
  209. szetszwo)
  210. HDFS-4650. When passing two non-existing snapshot names to snapshotDiff, it
  211. returns success if the names are the same. (Jing Zhao via szetszwo)
  212. HDFS-4767. If a directory is snapshottable, do not replace it when clearing
  213. quota. (Jing Zhao via szetszwo)
  214. HDFS-4578. Restrict snapshot IDs to 24-bit wide. (Arpit Agarwal via
  215. szetszwo)
  216. HDFS-4773. Fix bugs in quota usage computation and OfflineImageViewer.
  217. (Jing Zhao via szetszwo)
  218. HDFS-4760. Update inodeMap after node replacement. (Jing Zhao via szetszwo)
  219. HDFS-4758. Disallow nested snapshottable directories and unwrap
  220. RemoteException. (szetszwo)
  221. HDFS-4781. Fix a NullPointerException when listing .snapshot under
  222. a non-existing directory. (szetszwo)
  223. HDFS-4791. Update and fix deletion of reference inode. (Jing Zhao via
  224. szetszwo)
  225. HDFS-4798. Update computeContentSummary() for the reference nodes in
  226. snapshots. (szetszwo)
  227. HDFS-4800. Fix INodeDirectoryWithSnapshot#cleanDeletedINode. (Jing Zhao via
  228. szetszwo)
  229. HDFS-4801. lsSnapshottableDir throws IllegalArgumentException when root is
  230. snapshottable. (Jing Zhao via szetszwo)
  231. HDFS-4802. Disallowing snapshot on / twice should throw SnapshotException
  232. but not IllegalStateException. (Jing Zhao via szetszwo)
  233. HDFS-4806. In INodeDirectoryWithSnapshot, use isInLatestSnapshot() to
  234. determine if an added/removed child should be recorded in the snapshot diff.
  235. (Jing Zhao via szetszwo)