findbugs-exclude.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  1. <!--
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. -->
  15. <FindBugsFilter>
  16. <Match>
  17. <Package name="org.apache.hadoop.record.compiler.generated" />
  18. </Match>
  19. <Match>
  20. <Bug pattern="EI_EXPOSE_REP" />
  21. </Match>
  22. <Match>
  23. <Bug pattern="EI_EXPOSE_REP2" />
  24. </Match>
  25. <Match>
  26. <Bug pattern="SE_COMPARATOR_SHOULD_BE_SERIALIZABLE" />
  27. </Match>
  28. <Match>
  29. <Class name="~.*_jsp" />
  30. <Bug pattern="DLS_DEAD_LOCAL_STORE" />
  31. </Match>
  32. <Match>
  33. <Class name="~.*_jspx" />
  34. <Bug pattern="DLS_DEAD_LOCAL_STORE" />
  35. </Match>
  36. <Match>
  37. <Field name="_jspx_dependants" />
  38. <Bug pattern="UWF_UNWRITTEN_FIELD" />
  39. </Match>
  40. <!--
  41. Inconsistent synchronization for Client.Connection.out is
  42. is intentional to make a connection to be closed instantly.
  43. -->
  44. <Match>
  45. <Class name="org.apache.hadoop.ipc.Client$Connection" />
  46. <Field name="out" />
  47. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  48. </Match>
  49. <!--
  50. Ignore Cross Scripting Vulnerabilities
  51. -->
  52. <Match>
  53. <Package name="~org.apache.hadoop.mapred.*" />
  54. <Bug code="XSS" />
  55. </Match>
  56. <Match>
  57. <Class name="org.apache.hadoop.mapred.taskdetails_jsp" />
  58. <Bug code="HRS" />
  59. </Match>
  60. <Match>
  61. <Class name="org.apache.hadoop.mapred.jobdetails_jsp"/>
  62. <Bug pattern="HRS_REQUEST_PARAMETER_TO_HTTP_HEADER"/>
  63. </Match>
  64. <Match>
  65. <Class name="org.apache.hadoop.mapred.taskstats_jsp"/>
  66. <Bug pattern="HRS_REQUEST_PARAMETER_TO_HTTP_HEADER"/>
  67. </Match>
  68. <Match>
  69. <Class name="org.apache.hadoop.mapred.jobtasks_jsp"/>
  70. <Bug pattern="HRS_REQUEST_PARAMETER_TO_HTTP_HEADER"/>
  71. </Match>
  72. <!--
  73. Ignore warnings where child class has the same name as
  74. super class. Classes based on Old API shadow names from
  75. new API. Should go off after HADOOP-1.0
  76. -->
  77. <Match>
  78. <Class name="~org.apache.hadoop.mapred.*" />
  79. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" />
  80. </Match>
  81. <Match>
  82. <Class name="~org.apache.hadoop.mapred.*" />
  83. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_INTERFACE" />
  84. </Match>
  85. <Match>
  86. <Class name="~org.apache.hadoop.mapred.lib.aggregate.*" />
  87. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_INTERFACE" />
  88. </Match>
  89. <Match>
  90. <Class name="~org.apache.hadoop.mapred.join.*" />
  91. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_INTERFACE" />
  92. </Match>
  93. <Match>
  94. <Class name="org.apache.hadoop.mapred.SequenceFileInputFilter$Filter" />
  95. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_INTERFACE" />
  96. </Match>
  97. <Match>
  98. <Class name="~org.apache.hadoop.util.*" />
  99. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" />
  100. </Match>
  101. <Match>
  102. <Class name="~org.apache.hadoop.filecache.*" />
  103. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" />
  104. </Match>
  105. <!--
  106. Ignore warnings for usage of System.exit. This is
  107. required and have been well thought out
  108. -->
  109. <Match>
  110. <Class name="org.apache.hadoop.mapred.Child$2" />
  111. <Method name="run" />
  112. <Bug pattern="DM_EXIT" />
  113. </Match>
  114. <Match>
  115. <Class name="org.apache.hadoop.mapred.JobTracker" />
  116. <Method name="addHostToNodeMapping" />
  117. <Bug pattern="DM_EXIT" />
  118. </Match>
  119. <Match>
  120. <Class name="org.apache.hadoop.mapred.Task" />
  121. <Or>
  122. <Method name="done" />
  123. <Method name="commit" />
  124. <Method name="statusUpdate" />
  125. </Or>
  126. <Bug pattern="DM_EXIT" />
  127. </Match>
  128. <Match>
  129. <Class name="org.apache.hadoop.mapred.JobTracker" />
  130. <Field name="clock" />
  131. <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
  132. </Match>
  133. <Match>
  134. <Class name="org.apache.hadoop.mapred.Task$TaskReporter" />
  135. <Method name="run" />
  136. <Bug pattern="DM_EXIT" />
  137. </Match>
  138. <!--
  139. We need to cast objects between old and new api objects
  140. -->
  141. <Match>
  142. <Class name="org.apache.hadoop.mapred.OutputCommitter" />
  143. <Bug pattern="BC_UNCONFIRMED_CAST" />
  144. </Match>
  145. <!--
  146. We intentionally do the get name from the inner class
  147. -->
  148. <Match>
  149. <Class name="org.apache.hadoop.mapred.TaskTracker$MapEventsFetcherThread" />
  150. <Method name="run" />
  151. <Bug pattern="IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD" />
  152. </Match>
  153. <Match>
  154. <Class name="org.apache.hadoop.mapred.FileOutputCommitter" />
  155. <Or>
  156. <Method name="commitJob" />
  157. <Method name="recoverTask" />
  158. <Method name="isRecoverySupported" />
  159. </Or>
  160. <Bug pattern="NM_WRONG_PACKAGE" />
  161. </Match>
  162. <Match>
  163. <Class name="org.apache.hadoop.mapred.OutputCommitter" />
  164. <Or>
  165. <Method name="abortJob" />
  166. <Method name="commitJob" />
  167. <Method name="cleanupJob" />
  168. <Method name="recoverTask" />
  169. <Method name="isRecoverySupported" />
  170. </Or>
  171. <Bug pattern="NM_WRONG_PACKAGE_INTENTIONAL" />
  172. </Match>
  173. <Match>
  174. <Class name="org.apache.hadoop.mapred.TaskCompletionEvent" />
  175. <Or>
  176. <Method name="setTaskStatus" />
  177. <Method name="setTaskAttemptId" />
  178. </Or>
  179. <Bug pattern="NM_WRONG_PACKAGE" />
  180. </Match>
  181. <Match>
  182. <Class name="org.apache.hadoop.mapred.lib.db.DBInputFormat$DBRecordReader" />
  183. <Method name="next" />
  184. <Bug pattern="NM_WRONG_PACKAGE_INTENTIONAL" />
  185. </Match>
  186. <!--
  187. Ignoring this warning as resolving this would need a non-trivial change in code
  188. -->
  189. <Match>
  190. <Class name="org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorBaseDescriptor" />
  191. <Method name="configure" />
  192. <Field name="maxNumItems" />
  193. <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
  194. </Match>
  195. <!--
  196. Comes from org.apache.jasper.runtime.ResourceInjector. Cannot do much.
  197. -->
  198. <Match>
  199. <Class name="org.apache.hadoop.mapred.jobqueue_005fdetails_jsp" />
  200. <Field name="_jspx_resourceInjector" />
  201. <Bug pattern="SE_BAD_FIELD" />
  202. </Match>
  203. <!--
  204. Storing textInputFormat and then passing it as a parameter. Safe to ignore.
  205. -->
  206. <Match>
  207. <Class name="org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorJob" />
  208. <Method name="createValueAggregatorJob" />
  209. <Bug pattern="DLS_DEAD_STORE_OF_CLASS_LITERAL" />
  210. </Match>
  211. <!--
  212. Can remove this after the upgrade to findbugs1.3.8
  213. -->
  214. <Match>
  215. <Class name="org.apache.hadoop.mapred.lib.db.DBInputFormat" />
  216. <Method name="getSplits" />
  217. <Bug pattern="DLS_DEAD_LOCAL_STORE" />
  218. </Match>
  219. <!--
  220. org.apache.hadoop.mapred.IndexCache is thread-safe. It does not need
  221. synchronous access.
  222. -->
  223. <Match>
  224. <Class name="org.apache.hadoop.mapred.TaskTracker" />
  225. <Field name="indexCache" />
  226. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  227. </Match>
  228. <!--
  229. None of the following variables should be referenced by any thread
  230. but the collection thread in MapTask
  231. -->
  232. <Match>
  233. <Class name="org.apache.hadoop.mapred.MapTask$MapOutputBuffer" />
  234. <Field name="kvindex" />
  235. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  236. </Match>
  237. <Match>
  238. <Class name="org.apache.hadoop.mapred.MapTask$MapOutputBuffer" />
  239. <Field name="bufferRemaining" />
  240. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  241. </Match>
  242. <Match>
  243. <Class name="org.apache.hadoop.mapred.MapTask$MapOutputBuffer" />
  244. <Field name="equator" />
  245. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  246. </Match>
  247. <!-- This is spurious. -->
  248. <Match>
  249. <Class name="org.apache.hadoop.mapred.MapTask$MapOutputBuffer$SpillThread" />
  250. <Method name="run" />
  251. <Bug pattern="UL_UNRELEASED_LOCK_EXCEPTION_PATH" />
  252. </Match>
  253. <Match>
  254. <Class name="org.apache.hadoop.mapreduce.task.reduce.MergeThread" />
  255. <Field name="inputs" />
  256. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  257. </Match>
  258. <Match>
  259. <Class name="org.apache.hadoop.mapred.JobTracker" />
  260. <Method name="updateTaskTrackerStatus" />
  261. <Bug pattern="DLS_DEAD_LOCAL_STORE" />
  262. </Match>
  263. <!--
  264. This class is unlikely to get subclassed, so ignore
  265. -->
  266. <Match>
  267. <Class name="org.apache.hadoop.mapreduce.task.reduce.MergeManagerImpl" />
  268. <Bug pattern="SC_START_IN_CTOR" />
  269. </Match>
  270. <!--
  271. This class is unlikely to get subclassed, so ignore
  272. -->
  273. <Match>
  274. <Class name="org.apache.hadoop.mapreduce.task.reduce.ShuffleSchedulerImpl" />
  275. <Bug pattern="SC_START_IN_CTOR" />
  276. </Match>
  277. <!--
  278. Do not bother if equals is not implemented. We will not need it here
  279. -->
  280. <Match>
  281. <Class name="org.apache.hadoop.mapreduce.task.reduce.ShuffleSchedulerImpl$Penalty" />
  282. <Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS" />
  283. </Match>
  284. <Match>
  285. <Class name="org.apache.hadoop.mapred.Task" />
  286. <Method name="reportFatalError" />
  287. <Bug pattern="DM_EXIT" />
  288. </Match>
  289. <!--
  290. core changes
  291. -->
  292. <Match>
  293. <Class name="~org.apache.hadoop.*" />
  294. <Bug code="MS" />
  295. </Match>
  296. <Match>
  297. <Class name="org.apache.hadoop.fs.FileSystem" />
  298. <Method name="checkPath" />
  299. <Bug pattern="ES_COMPARING_STRINGS_WITH_EQ" />
  300. </Match>
  301. <Match>
  302. <Class name="org.apache.hadoop.fs.kfs.KFSOutputStream" />
  303. <Field name="path" />
  304. <Bug pattern="URF_UNREAD_FIELD" />
  305. </Match>
  306. <Match>
  307. <Class name="org.apache.hadoop.fs.kfs.KosmosFileSystem" />
  308. <Method name="initialize" />
  309. <Bug pattern="DM_EXIT" />
  310. </Match>
  311. <Match>
  312. <Class name="org.apache.hadoop.io.Closeable" />
  313. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_INTERFACE" />
  314. </Match>
  315. <Match>
  316. <Class name="org.apache.hadoop.security.AccessControlException" />
  317. <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" />
  318. </Match>
  319. <Match>
  320. <Class name="org.apache.hadoop.record.meta.Utils" />
  321. <Method name="skip" />
  322. <Bug pattern="BC_UNCONFIRMED_CAST" />
  323. </Match>
  324. <!--
  325. The compareTo method is actually a dummy method that just
  326. throws excpetions. So, no need to override equals. Ignore
  327. -->
  328. <Match>
  329. <Class name="org.apache.hadoop.record.meta.RecordTypeInfo" />
  330. <Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS" />
  331. </Match>
  332. <Match>
  333. <Class name="org.apache.hadoop.util.ProcfsBasedProcessTree" />
  334. <Bug pattern="DMI_HARDCODED_ABSOLUTE_FILENAME" />
  335. </Match>
  336. <!--
  337. Streaming, Examples
  338. -->
  339. <Match>
  340. <Class name="org.apache.hadoop.streaming.StreamUtil$TaskId" />
  341. <Bug pattern="URF_UNREAD_FIELD" />
  342. </Match>
  343. <Match>
  344. <Class name="org.apache.hadoop.examples.DBCountPageView" />
  345. <Method name="verify" />
  346. <Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
  347. </Match>
  348. <Match>
  349. <Class name="org.apache.hadoop.examples.ContextFactory" />
  350. <Method name="setAttributes" />
  351. <Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
  352. </Match>
  353. <Match>
  354. <Class name="org.apache.hadoop.mapred.TaskScheduler$QueueRefresher" />
  355. <Bug pattern="SIC_INNER_SHOULD_BE_STATIC" />
  356. </Match>
  357. <Match>
  358. <Class name="org.apache.hadoop.examples.terasort.TeraInputFormat$1" />
  359. <Method name="run" />
  360. <Bug pattern="DM_EXIT" />
  361. </Match>
  362. <Match>
  363. <Class name="org.apache.hadoop.examples.terasort.TeraOutputFormat$TeraOutputCommitter"/>
  364. <Bug pattern="NM_WRONG_PACKAGE_INTENTIONAL" />
  365. </Match>
  366. <Match>
  367. <Class name="org.apache.hadoop.examples.terasort.Unsigned16" />
  368. <Method name="getHexDigit"/>
  369. <Bug pattern="ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT" />
  370. </Match>
  371. <!--
  372. False positive of FindBugs complaining that initializationPoller and
  373. started were accessed through
  374. CapacitySchedulerQueueRefresher.refreshQueues without explicitly holding
  375. the lock of CapacityTaskScheduler. The lock is in fact acquired by
  376. JobTracker prior to calling QueueManager.refereshQueues - this is
  377. necessary to ensure the order of locking (TaskScheduler ->
  378. QueueManager).
  379. -->
  380. <Match>
  381. <Class name="org.apache.hadoop.mapred.CapacityTaskScheduler" />
  382. <Field name="initializationPoller" />
  383. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  384. </Match>
  385. <Match>
  386. <Class name="org.apache.hadoop.mapred.CapacityTaskScheduler" />
  387. <Field name="started" />
  388. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  389. </Match>
  390. <!-- Yarn excludes -->
  391. <Match>
  392. <Class name="org.apache.hadoop.mapreduce.v2.app.job.impl.TaskAttemptImpl" />
  393. <Method name="computeSlotMillis" />
  394. <Bug pattern="DB_DUPLICATE_BRACHES" />
  395. </Match>
  396. <Match>
  397. <Class name="org.apache.hadoop.mapreduce.v2.app.MRAppMaster$1" />
  398. <Bug pattern="DM_EXIT" />
  399. </Match>
  400. <Match>
  401. <Class name="org.apache.hadoop.mapred.LocalContainerLauncher$SubtaskRunner" />
  402. <Bug pattern="DM_EXIT" />
  403. </Match>
  404. <Match>
  405. <Class name="~org\.apache\.hadoop\.mapreduce\.v2\.app\.job\.impl\.TaskImpl.*" />
  406. <Bug pattern="BC_UNCONFIRMED_CAST" />
  407. </Match>
  408. <Match>
  409. <Class name="~org\.apache\.hadoop\.mapreduce\.v2\.app\.job\.impl\.JobImpl.*" />
  410. <Bug pattern="BC_UNCONFIRMED_CAST" />
  411. </Match>
  412. <Match>
  413. <Class name="~org\.apache\.hadoop\.mapreduce\.v2\.app\.job\.impl\.TaskAttemptImpl.*" />
  414. <Bug pattern="BC_UNCONFIRMED_CAST" />
  415. </Match>
  416. <Match>
  417. <Class name="~org\.apache\.hadoop\.mapreduce\.v2\.app\.recover\.RecoveryService" />
  418. <Bug pattern="BC_UNCONFIRMED_CAST" />
  419. </Match>
  420. <Match>
  421. <Class name="~org\.apache\.hadoop\.mapreduce\.v2\.app\.rm\.RMContainerAllocator" />
  422. <Bug pattern="BC_UNCONFIRMED_CAST" />
  423. </Match>
  424. <Match>
  425. <Class name="org.apache.hadoop.mapreduce.v2.app.job.impl.TaskAttemptImpl" />
  426. <Method name="computeSlotMillis" />
  427. <Bug pattern="DB_DUPLICATE_BRANCHES" />
  428. </Match>
  429. <Match>
  430. <Package name="org.apache.hadoop.yarn.proto" />
  431. </Match>
  432. <Match>
  433. <Package name="org.apache.hadoop.mapreduce.v2.hs.proto" />
  434. </Match>
  435. <Match>
  436. <Class name="~org\.apache\.hadoop\.mapreduce\.v2\.proto.*" />
  437. </Match>
  438. <Match>
  439. <Package name="org.apache.hadoop.mapred.proto" />
  440. </Match>
  441. <!--
  442. The below fields are accessed locally and only via methods that are synchronized.
  443. -->
  444. <Match>
  445. <Class name="org.apache.hadoop.mapreduce.v2.app.rm.RMContainerAllocator" />
  446. <Or>
  447. <Field name="mapResourceRequest" />
  448. <Field name="reduceResourceRequest" />
  449. <Field name="maxReduceRampupLimit" />
  450. <Field name="reduceSlowStart" />
  451. </Or>
  452. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  453. </Match>
  454. <Match>
  455. <Class name="org.apache.hadoop.mapreduce.v2.app.local.LocalContainerAllocator" />
  456. <Or>
  457. <Field name="retryInterval" />
  458. <Field name="retrystartTime" />
  459. </Or>
  460. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  461. </Match>
  462. <Match>
  463. <Class name="org.apache.hadoop.mapreduce.v2.app.commit.CommitterEventHandler" />
  464. <Field name="commitThreadCancelTimeoutMs" />
  465. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  466. </Match>
  467. <Match>
  468. <Class name="org.apache.hadoop.mapred.ShuffleHandler" />
  469. <Field name="sslFileBufferSize" />
  470. <Bug pattern="IS2_INCONSISTENT_SYNC" />
  471. </Match>
  472. <Match>
  473. <Class name="org.apache.hadoop.mapred.ClientServiceDelegate" />
  474. <Method name="invoke" />
  475. <Bug pattern="SWL_SLEEP_WITH_LOCK_HELD" />
  476. </Match>
  477. <Match>
  478. <Class name="org.apache.hadoop.mapreduce.util.ProcessTree" />
  479. <Method name="sendSignal" />
  480. <Bug pattern="NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH" />
  481. </Match>
  482. <Match>
  483. <Class name="org.apache.hadoop.mapreduce.util.ProcessTree" />
  484. <Method name="isSetsidSupported" />
  485. <Bug pattern="NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH" />
  486. </Match>
  487. <Match>
  488. <Class name="org.apache.hadoop.mapreduce.util.ProcessTree" />
  489. <Method name="isSetsidSupported" />
  490. <Bug pattern="NP_NULL_ON_SOME_PATH_EXCEPTION" />
  491. </Match>
  492. <Match>
  493. <Class name="org.apache.hadoop.mapreduce.v2.hs.CachedHistoryStorage$1" />
  494. <Bug pattern="SE_BAD_FIELD_INNER_CLASS" />
  495. </Match>
  496. </FindBugsFilter>