findbugsExcludeFile.xml 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  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. <Bug pattern="EI_EXPOSE_REP" />
  13. </Match>
  14. <Match>
  15. <Bug pattern="EI_EXPOSE_REP2" />
  16. </Match>
  17. <Match>
  18. <Bug pattern="SE_COMPARATOR_SHOULD_BE_SERIALIZABLE" />
  19. </Match>
  20. <Match>
  21. <Class name="~.*_jsp" />
  22. <Bug pattern="DLS_DEAD_LOCAL_STORE" />
  23. </Match>
  24. <Match>
  25. <Field name="_jspx_dependants" />
  26. <Bug pattern="UWF_UNWRITTEN_FIELD" />
  27. </Match>
  28. <!--
  29. Inconsistent synchronization for Client.Connection.out is
  30. is intentional to make a connection to be closed instantly.
  31. -->
  32. <Match>
  33. <Class name="org.apache.hadoop.ipc.Client$Connection" />
  34. <Field name="out" />
  35. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  36. </Match>
  37. <!--
  38. Ignore Cross Scripting Vulnerabilities
  39. We have an input quoting filter that protects us.
  40. -->
  41. <Match>
  42. <Bug code="XSS" />
  43. </Match>
  44. <Match>
  45. <Bug code="HRS" />
  46. </Match>
  47. <!--
  48. Ignore warnings where child class has the same name as
  49. super class. Classes based on Old API shadow names from
  50. new API. Should go off after HADOOP-1.0
  51. -->
  52. <Match>
  53. <Class name="~org.apache.hadoop.mapred.*" />
  54. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" />
  55. </Match>
  56. <!--
  57. Ignore warnings for usage of System.exit. This is
  58. required and have been well thought out
  59. -->
  60. <Match>
  61. <Class name="org.apache.hadoop.mapred.Child$2" />
  62. <Method name="run" />
  63. <Bug pattern="DM_EXIT" />
  64. </Match>
  65. <Match>
  66. <Class name="org.apache.hadoop.mapred.JobTracker" />
  67. <Method name="addHostToNodeMapping" />
  68. <Bug pattern="DM_EXIT" />
  69. </Match>
  70. <Match>
  71. <Class name="org.apache.hadoop.mapred.Task" />
  72. <Or>
  73. <Method name="done" />
  74. <Method name="commit" />
  75. <Method name="statusUpdate" />
  76. </Or>
  77. <Bug pattern="DM_EXIT" />
  78. </Match>
  79. <Match>
  80. <Class name="org.apache.hadoop.mapred.Task$TaskReporter" />
  81. <Method name="run" />
  82. <Bug pattern="DM_EXIT" />
  83. </Match>
  84. <!--
  85. We need to cast objects between old and new api objects
  86. -->
  87. <Match>
  88. <Class name="org.apache.hadoop.mapred.OutputCommitter" />
  89. <Bug pattern="BC_UNCONFIRMED_CAST" />
  90. </Match>
  91. <!--
  92. We intentionally do the get name from the inner class
  93. -->
  94. <Match>
  95. <Class name="org.apache.hadoop.mapred.TaskTracker$MapEventsFetcherThread" />
  96. <Method name="run" />
  97. <Bug pattern="IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD" />
  98. </Match>
  99. <Match>
  100. <Class name="org.apache.hadoop.mapred.FileOutputCommitter" />
  101. <Bug pattern="NM_WRONG_PACKAGE_INTENTIONAL" />
  102. </Match>
  103. <!--
  104. Ignoring this warning as resolving this would need a non-trivial change in code
  105. -->
  106. <Match>
  107. <Class name="org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorBaseDescriptor" />
  108. <Method name="configure" />
  109. <Field name="maxNumItems" />
  110. <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
  111. </Match>
  112. <!--
  113. Comes from org.apache.jasper.runtime.ResourceInjector. Cannot do much.
  114. -->
  115. <Match>
  116. <Class name="org.apache.hadoop.mapred.jobqueue_005fdetails_jsp" />
  117. <Field name="_jspx_resourceInjector" />
  118. <Bug pattern="SE_BAD_FIELD" />
  119. </Match>
  120. <!--
  121. Storing textInputFormat and then passing it as a parameter. Safe to ignore.
  122. -->
  123. <Match>
  124. <Class name="org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorJob" />
  125. <Method name="createValueAggregatorJob" />
  126. <Bug pattern="DLS_DEAD_STORE_OF_CLASS_LITERAL" />
  127. </Match>
  128. <!--
  129. Can remove this after the upgrade to findbugs1.3.8
  130. -->
  131. <Match>
  132. <Class name="org.apache.hadoop.mapred.lib.db.DBInputFormat" />
  133. <Method name="getSplits" />
  134. <Bug pattern="DLS_DEAD_LOCAL_STORE" />
  135. </Match>
  136. <!--
  137. This is a spurious warning. Just ignore
  138. -->
  139. <Match>
  140. <Class name="org.apache.hadoop.mapred.MapTask$MapOutputBuffer" />
  141. <Field name="kvindex" />
  142. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  143. </Match>
  144. <!--
  145. core changes
  146. -->
  147. <Match>
  148. <Class name="~org.apache.hadoop.*" />
  149. <Bug code="MS" />
  150. </Match>
  151. <Match>
  152. <Class name="org.apache.hadoop.fs.FileSystem" />
  153. <Method name="checkPath" />
  154. <Bug pattern="ES_COMPARING_STRINGS_WITH_EQ" />
  155. </Match>
  156. <Match>
  157. <Class name="org.apache.hadoop.fs.kfs.KFSOutputStream" />
  158. <Field name="path" />
  159. <Bug pattern="URF_UNREAD_FIELD" />
  160. </Match>
  161. <Match>
  162. <Class name="org.apache.hadoop.fs.kfs.KosmosFileSystem" />
  163. <Method name="initialize" />
  164. <Bug pattern="DM_EXIT" />
  165. </Match>
  166. <Match>
  167. <Class name="org.apache.hadoop.io.Closeable" />
  168. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_INTERFACE" />
  169. </Match>
  170. <Match>
  171. <Class name="org.apache.hadoop.security.AccessControlException" />
  172. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" />
  173. </Match>
  174. <Match>
  175. <Class name="org.apache.hadoop.record.meta.Utils" />
  176. <Method name="skip" />
  177. <Bug pattern="BC_UNCONFIRMED_CAST" />
  178. </Match>
  179. <!--
  180. The compareTo method is actually a dummy method that just
  181. throws excpetions. So, no need to override equals. Ignore
  182. -->
  183. <Match>
  184. <Class name="org.apache.hadoop.record.meta.RecordTypeInfo" />
  185. <Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS" />
  186. </Match>
  187. <Match>
  188. <Class name="org.apache.hadoop.util.ProcfsBasedProcessTree" />
  189. <Bug pattern="DMI_HARDCODED_ABSOLUTE_FILENAME" />
  190. </Match>
  191. <!--
  192. Streaming, Examples
  193. -->
  194. <Match>
  195. <Class name="org.apache.hadoop.streaming.StreamUtil$TaskId" />
  196. <Bug pattern="URF_UNREAD_FIELD" />
  197. </Match>
  198. <Match>
  199. <Class name="org.apache.hadoop.examples.DBCountPageView" />
  200. <Method name="verify" />
  201. <Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
  202. </Match>
  203. <!--
  204. getTmpInputStreams is pretty much like a stream constructor.
  205. The newly created streams are not supposed to be closed in the constructor. So ignore
  206. the OBL warning.
  207. -->
  208. <Match>
  209. <Class name="org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl" />
  210. <Method name="getTmpInputStreams" />
  211. <Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
  212. </Match>
  213. <!--
  214. ResponseProccessor is thread that is designed to catch RuntimeException.
  215. -->
  216. <Match>
  217. <Class name="org.apache.hadoop.hdfs.DFSClient$DFSOutputStream$DataStreamer$ResponseProcessor" />
  218. <Method name="run" />
  219. <Bug pattern="REC_CATCH_EXCEPTION" />
  220. </Match>
  221. <!--
  222. lastAppliedTxid is carefully unsynchronized in the BackupNode in a couple spots.
  223. See the comments in BackupImage for justification.
  224. -->
  225. <Match>
  226. <Class name="org.apache.hadoop.hdfs.server.namenode.FSImage" />
  227. <Field name="lastAppliedTxId" />
  228. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  229. </Match>
  230. <!--
  231. Findbugs doesn't realize that closing a FilterOutputStream pushes the close down to
  232. wrapped streams, too.
  233. -->
  234. <Match>
  235. <Class name="org.apache.hadoop.hdfs.server.namenode.FSImageFormat$Saver" />
  236. <Method name="save" />
  237. <Bug pattern="OS_OPEN_STREAM" />
  238. </Match>
  239. <!--
  240. the 'metrics' member is sometimes used from synchronized blocks, sometimes not,
  241. but it's only reset by test cases, so should be fine
  242. -->
  243. <Match>
  244. <Class name="org.apache.hadoop.hdfs.server.namenode.FSEditLog" />
  245. <Field name="metrics" />
  246. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  247. </Match>
  248. <!--
  249. This method isn't performance-critical and is much clearer to write as it's written.
  250. -->
  251. <Match>
  252. <Class name="org.apache.hadoop.hdfs.server.datanode.BlockPoolManager" />
  253. <Method name="doRefreshNamenodes" />
  254. <Bug category="PERFORMANCE" />
  255. </Match>
  256. <!-- Don't complain about System.exit() being called from quit() -->
  257. <Match>
  258. <Class name="org.apache.hadoop.hdfs.server.namenode.MetaRecoveryContext" />
  259. <Method name="quit" />
  260. <Bug pattern="DM_EXIT" />
  261. </Match>
  262. </FindBugsFilter>