findbugsExcludeFile.xml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <FindBugsFilter>
  2. <Match>
  3. <Package name="org.apache.hadoop.record.compiler.generated" />
  4. </Match>
  5. <Match>
  6. <Package name="org.apache.hadoop.hdfs.protocol.proto" />
  7. </Match>
  8. <Match>
  9. <Package name="org.apache.hadoop.hdfs.server.namenode.ha.proto" />
  10. </Match>
  11. <Match>
  12. <Class name="~org.apache.hadoop.hdfs.server.namenode.FsImageProto.*" />
  13. </Match>
  14. <Match>
  15. <Package name="org.apache.hadoop.hdfs.qjournal.protocol" />
  16. </Match>
  17. <Match>
  18. <Bug pattern="EI_EXPOSE_REP" />
  19. </Match>
  20. <Match>
  21. <Bug pattern="EI_EXPOSE_REP2" />
  22. </Match>
  23. <Match>
  24. <Bug pattern="SE_COMPARATOR_SHOULD_BE_SERIALIZABLE" />
  25. </Match>
  26. <Match>
  27. <Class name="~.*_jsp" />
  28. <Bug pattern="DLS_DEAD_LOCAL_STORE" />
  29. </Match>
  30. <Match>
  31. <Field name="_jspx_dependants" />
  32. <Bug pattern="UWF_UNWRITTEN_FIELD" />
  33. </Match>
  34. <!--
  35. Inconsistent synchronization for Client.Connection.out is
  36. is intentional to make a connection to be closed instantly.
  37. -->
  38. <Match>
  39. <Class name="org.apache.hadoop.ipc.Client$Connection" />
  40. <Field name="out" />
  41. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  42. </Match>
  43. <!--
  44. Ignore Cross Scripting Vulnerabilities
  45. We have an input quoting filter that protects us.
  46. -->
  47. <Match>
  48. <Bug code="XSS" />
  49. </Match>
  50. <Match>
  51. <Bug code="HRS" />
  52. </Match>
  53. <!--
  54. core changes
  55. -->
  56. <Match>
  57. <Class name="~org.apache.hadoop.*" />
  58. <Bug code="MS" />
  59. </Match>
  60. <!--
  61. getTmpInputStreams is pretty much like a stream constructor.
  62. The newly created streams are not supposed to be closed in the constructor. So ignore
  63. the OBL warning.
  64. -->
  65. <Match>
  66. <Class name="org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl" />
  67. <Method name="getTmpInputStreams" />
  68. <Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
  69. </Match>
  70. <!--
  71. ResponseProccessor is thread that is designed to catch RuntimeException.
  72. -->
  73. <Match>
  74. <Class name="org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer$ResponseProcessor" />
  75. <Method name="run" />
  76. <Bug pattern="REC_CATCH_EXCEPTION" />
  77. </Match>
  78. <!--
  79. lastAppliedTxid is carefully unsynchronized in the BackupNode in a couple spots.
  80. See the comments in BackupImage for justification.
  81. -->
  82. <Match>
  83. <Class name="org.apache.hadoop.hdfs.server.namenode.FSImage" />
  84. <Field name="lastAppliedTxId" />
  85. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  86. </Match>
  87. <!--
  88. Findbugs doesn't realize that closing a FilterOutputStream pushes the close down to
  89. wrapped streams, too.
  90. -->
  91. <Match>
  92. <Class name="org.apache.hadoop.hdfs.server.namenode.FSImageFormat$Saver" />
  93. <Method name="save" />
  94. <Bug pattern="OS_OPEN_STREAM" />
  95. </Match>
  96. <!--
  97. the 'metrics' member is sometimes used from synchronized blocks, sometimes not,
  98. but it's only reset by test cases, so should be fine
  99. -->
  100. <Match>
  101. <Class name="org.apache.hadoop.hdfs.server.namenode.FSEditLog" />
  102. <Field name="metrics" />
  103. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  104. </Match>
  105. <!--
  106. We use a separate lock to protect modifications to journalSet so that
  107. FSEditLog#selectInputStreams does not need to be a synchronized method.
  108. -->
  109. <Match>
  110. <Class name="org.apache.hadoop.hdfs.server.namenode.FSEditLog" />
  111. <Field name="journalSet" />
  112. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  113. </Match>
  114. <!--
  115. This method isn't performance-critical and is much clearer to write as it's written.
  116. -->
  117. <Match>
  118. <Class name="org.apache.hadoop.hdfs.server.datanode.BlockPoolManager" />
  119. <Method name="doRefreshNamenodes" />
  120. <Bug category="PERFORMANCE" />
  121. </Match>
  122. <!-- Don't complain about System.exit() being called from quit() -->
  123. <Match>
  124. <Class name="org.apache.hadoop.hdfs.server.namenode.MetaRecoveryContext" />
  125. <Method name="quit" />
  126. <Bug pattern="DM_EXIT" />
  127. </Match>
  128. <!-- Don't complain about recoverBlock equality check -->
  129. <Match>
  130. <Class name="org.apache.hadoop.hdfs.server.datanode.DataNode" />
  131. <Method name="recoverBlock" />
  132. <Bug pattern="EC_UNRELATED_TYPES" />
  133. </Match>
  134. <!-- More complex cleanup logic confuses findbugs -->
  135. <Match>
  136. <Class name="org.apache.hadoop.hdfs.qjournal.server.Journal" />
  137. <Method name="persistPaxosData" />
  138. <Bug pattern="OS_OPEN_STREAM" />
  139. </Match>
  140. <!-- Don't complain about LocalDatanodeInfo's anonymous class -->
  141. <Match>
  142. <Class name="org.apache.hadoop.hdfs.BlockReaderLocal$LocalDatanodeInfo$1" />
  143. <Bug pattern="SE_BAD_FIELD_INNER_CLASS" />
  144. </Match>
  145. <!-- Only one method increments numFailedVolumes and it is synchronized -->
  146. <Match>
  147. <Class name="org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsVolumeList" />
  148. <Field name="numFailedVolumes" />
  149. <Bug pattern="VO_VOLATILE_INCREMENT" />
  150. </Match>
  151. <!-- Access to pendingReceivedRequests is synchronized -->
  152. <Match>
  153. <Class name="org.apache.hadoop.hdfs.server.datanode.BPServiceActor" />
  154. <Method name="notifyNamenodeBlockImmediately" />
  155. <Field name="pendingReceivedRequests" />
  156. <Bug pattern="VO_VOLATILE_INCREMENT" />
  157. </Match>
  158. <!-- Replace System.exit() call with ExitUtil.terminate() -->
  159. <Match>
  160. <Class name="org.apache.hadoop.hdfs.tools.JMXGet"/>
  161. <Method name="main" />
  162. <Bug pattern="NP_NULL_ON_SOME_PATH" />
  163. </Match>
  164. <Match>
  165. <Class name="org.apache.hadoop.hdfs.server.datanode.ReplicaInfo" />
  166. <Method name="setDirInternal" />
  167. <Bug pattern="DM_STRING_CTOR" />
  168. </Match>
  169. <Match>
  170. <Class name="org.apache.hadoop.hdfs.shortcircuit.DfsClientShmManager$EndpointShmManager" />
  171. <Method name="allocSlot" />
  172. <Bug pattern="UL_UNRELEASED_LOCK_EXCEPTION_PATH" />
  173. </Match>
  174. <Match>
  175. <Class name="org.apache.hadoop.hdfs.shortcircuit.DfsClientShmManager$EndpointShmManager" />
  176. <Method name="allocSlot" />
  177. <Bug pattern="UL_UNRELEASED_LOCK" />
  178. </Match>
  179. <!-- Manually verified to be okay, we want to throw away the top bit here -->
  180. <Match>
  181. <Class name="org.apache.hadoop.hdfs.server.namenode.CachedBlock" />
  182. <Method name="getReplication" />
  183. <Bug pattern="ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT" />
  184. </Match>
  185. <Match>
  186. <Class name="org.apache.hadoop.hdfs.protocol.CacheDirective" />
  187. <Method name="insertInternal" />
  188. <Bug pattern="BC_UNCONFIRMED_CAST" />
  189. </Match>
  190. <Match>
  191. <Class name="org.apache.hadoop.hdfs.server.blockmanagement.CacheReplicationMonitor" />
  192. <Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
  193. </Match>
  194. <Match>
  195. <Class name="org.apache.hadoop.hdfs.DFSUtil"/>
  196. <Method name="assertAllResultsEqual" />
  197. <Bug pattern="NP_LOAD_OF_KNOWN_NULL_VALUE" />
  198. </Match>
  199. </FindBugsFilter>