findbugsExcludeFile.xml 7.6 KB

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