123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- <FindBugsFilter>
- <Match>
- <Package name="org.apache.hadoop.record.compiler.generated" />
- </Match>
- <Match>
- <Package name="org.apache.hadoop.hdfs.protocol.proto" />
- </Match>
- <Match>
- <Package name="org.apache.hadoop.hdfs.server.namenode.ha.proto" />
- </Match>
- <Match>
- <Class name="~org.apache.hadoop.hdfs.server.namenode.FsImageProto.*" />
- </Match>
- <Match>
- <Package name="org.apache.hadoop.hdfs.qjournal.protocol" />
- </Match>
- <Match>
- <Bug pattern="EI_EXPOSE_REP" />
- </Match>
- <Match>
- <Bug pattern="EI_EXPOSE_REP2" />
- </Match>
- <Match>
- <Bug pattern="SE_COMPARATOR_SHOULD_BE_SERIALIZABLE" />
- </Match>
- <Match>
- <Bug pattern="SE_BAD_FIELD" />
- </Match>
- <Match>
- <Class name="~.*_jsp" />
- <Bug pattern="DLS_DEAD_LOCAL_STORE" />
- </Match>
- <Match>
- <Field name="_jspx_dependants" />
- <Bug pattern="UWF_UNWRITTEN_FIELD" />
- </Match>
- <!--
- Inconsistent synchronization for Client.Connection.out is
- is intentional to make a connection to be closed instantly.
- -->
- <Match>
- <Class name="org.apache.hadoop.ipc.Client$Connection" />
- <Field name="out" />
- <Bug pattern="IS2_INCONSISTENT_SYNC" />
- </Match>
- <!--
- Ignore Cross Scripting Vulnerabilities
- We have an input quoting filter that protects us.
- -->
- <Match>
- <Bug code="XSS" />
- </Match>
- <Match>
- <Bug code="HRS" />
- </Match>
- <!--
- core changes
- -->
- <Match>
- <Class name="~org.apache.hadoop.*" />
- <Bug code="MS" />
- </Match>
- <!--
- getTmpInputStreams is pretty much like a stream constructor.
- The newly created streams are not supposed to be closed in the constructor. So ignore
- the OBL warning.
- -->
- <Match>
- <Class name="org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl" />
- <Method name="getTmpInputStreams" />
- <Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
- </Match>
- <!--
- lastAppliedTxid is carefully unsynchronized in the BackupNode in a couple spots.
- See the comments in BackupImage for justification.
- -->
- <Match>
- <Class name="org.apache.hadoop.hdfs.server.namenode.FSImage" />
- <Field name="lastAppliedTxId" />
- <Bug pattern="IS2_INCONSISTENT_SYNC" />
- </Match>
- <!--
- Findbugs doesn't realize that closing a FilterOutputStream pushes the close down to
- wrapped streams, too.
- -->
- <Match>
- <Class name="org.apache.hadoop.hdfs.server.namenode.FSImageFormat$Saver" />
- <Method name="save" />
- <Bug pattern="OS_OPEN_STREAM" />
- </Match>
- <!--
- the 'metrics' member is sometimes used from synchronized blocks, sometimes not,
- but it's only reset by test cases, so should be fine
- -->
- <Match>
- <Class name="org.apache.hadoop.hdfs.server.namenode.FSEditLog" />
- <Field name="metrics" />
- <Bug pattern="IS2_INCONSISTENT_SYNC" />
- </Match>
- <!--
- We use a separate lock to protect modifications to journalSet so that
- FSEditLog#selectInputStreams does not need to be a synchronized method.
- -->
- <Match>
- <Class name="org.apache.hadoop.hdfs.server.namenode.FSEditLog" />
- <Field name="journalSet" />
- <Bug pattern="IS2_INCONSISTENT_SYNC" />
- </Match>
- <!--
- This method isn't performance-critical and is much clearer to write as it's written.
- -->
- <Match>
- <Class name="org.apache.hadoop.hdfs.server.datanode.BlockPoolManager" />
- <Method name="doRefreshNamenodes" />
- <Bug category="PERFORMANCE" />
- </Match>
- <!-- Don't complain about System.exit() being called from quit() -->
- <Match>
- <Class name="org.apache.hadoop.hdfs.server.namenode.MetaRecoveryContext" />
- <Method name="quit" />
- <Bug pattern="DM_EXIT" />
- </Match>
- <!-- More complex cleanup logic confuses findbugs -->
- <Match>
- <Class name="org.apache.hadoop.hdfs.qjournal.server.Journal" />
- <Method name="persistPaxosData" />
- <Bug pattern="OS_OPEN_STREAM" />
- </Match>
- <!-- Don't complain about LocalDatanodeInfo's anonymous class -->
- <Match>
- <Class name="org.apache.hadoop.hdfs.client.impl.BlockReaderLocal$LocalDatanodeInfo$1" />
- <Bug pattern="SE_BAD_FIELD_INNER_CLASS" />
- </Match>
- <!-- Only one method increments numFailedVolumes and it is synchronized -->
- <Match>
- <Class name="org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsVolumeList" />
- <Field name="numFailedVolumes" />
- <Bug pattern="VO_VOLATILE_INCREMENT" />
- </Match>
- <!-- Access to pendingReceivedRequests is synchronized -->
- <Match>
- <Class name="org.apache.hadoop.hdfs.server.datanode.BPServiceActor" />
- <Method name="notifyNamenodeBlockImmediately" />
- <Field name="pendingReceivedRequests" />
- <Bug pattern="VO_VOLATILE_INCREMENT" />
- </Match>
- <!-- Replace System.exit() call with ExitUtil.terminate() -->
- <Match>
- <Class name="org.apache.hadoop.hdfs.tools.JMXGet"/>
- <Method name="main" />
- <Bug pattern="NP_NULL_ON_SOME_PATH" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.hdfs.server.datanode.ReplicaInfo" />
- <Method name="setDirInternal" />
- <Bug pattern="DM_STRING_CTOR" />
- </Match>
- <!-- Manually verified to be okay, we want to throw away the top bit here -->
- <Match>
- <Class name="org.apache.hadoop.hdfs.server.namenode.CachedBlock" />
- <Method name="getReplication" />
- <Bug pattern="ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.hdfs.protocol.CacheDirective" />
- <Method name="insertInternal" />
- <Bug pattern="BC_UNCONFIRMED_CAST" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.hdfs.server.blockmanagement.CacheReplicationMonitor" />
- <Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.hdfs.DFSUtil"/>
- <Method name="assertAllResultsEqual" />
- <Bug pattern="NP_LOAD_OF_KNOWN_NULL_VALUE" />
- </Match>
- </FindBugsFilter>
|