2009-05-19 00:56:52 -04:00
|
|
|
<FindBugsFilter>
|
|
|
|
<Match>
|
|
|
|
<Package name="org.apache.hadoop.record.compiler.generated" />
|
|
|
|
</Match>
|
2011-06-12 18:00:51 -04:00
|
|
|
<Match>
|
|
|
|
<Package name="org.apache.hadoop.hdfs.protocol.proto" />
|
|
|
|
</Match>
|
2012-04-02 20:59:02 -04:00
|
|
|
<Match>
|
|
|
|
<Package name="org.apache.hadoop.hdfs.server.namenode.ha.proto" />
|
|
|
|
</Match>
|
2014-02-09 14:18:51 -05:00
|
|
|
<Match>
|
|
|
|
<Class name="~org.apache.hadoop.hdfs.server.namenode.FsImageProto.*" />
|
|
|
|
</Match>
|
2012-07-19 20:25:50 -04:00
|
|
|
<Match>
|
|
|
|
<Package name="org.apache.hadoop.hdfs.qjournal.protocol" />
|
|
|
|
</Match>
|
2009-05-19 00:56:52 -04:00
|
|
|
<Match>
|
|
|
|
<Bug pattern="EI_EXPOSE_REP" />
|
|
|
|
</Match>
|
|
|
|
<Match>
|
|
|
|
<Bug pattern="EI_EXPOSE_REP2" />
|
|
|
|
</Match>
|
|
|
|
<Match>
|
|
|
|
<Bug pattern="SE_COMPARATOR_SHOULD_BE_SERIALIZABLE" />
|
|
|
|
</Match>
|
2014-10-06 16:29:56 -04:00
|
|
|
<Match>
|
|
|
|
<Bug pattern="SE_BAD_FIELD" />
|
|
|
|
</Match>
|
2009-05-19 00:56:52 -04:00
|
|
|
<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
|
2011-06-12 18:00:51 -04:00
|
|
|
We have an input quoting filter that protects us.
|
2009-05-19 00:56:52 -04:00
|
|
|
-->
|
|
|
|
<Match>
|
|
|
|
<Bug code="XSS" />
|
|
|
|
</Match>
|
|
|
|
<Match>
|
|
|
|
<Bug code="HRS" />
|
|
|
|
</Match>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
core changes
|
|
|
|
-->
|
|
|
|
<Match>
|
|
|
|
<Class name="~org.apache.hadoop.*" />
|
|
|
|
<Bug code="MS" />
|
|
|
|
</Match>
|
|
|
|
|
2011-06-12 18:00:51 -04:00
|
|
|
<!--
|
|
|
|
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.
|
|
|
|
-->
|
2009-05-19 00:56:52 -04:00
|
|
|
<Match>
|
2012-04-02 13:38:56 -04:00
|
|
|
<Class name="org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl" />
|
2011-06-12 18:00:51 -04:00
|
|
|
<Method name="getTmpInputStreams" />
|
2009-05-19 00:56:52 -04:00
|
|
|
<Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
|
|
|
|
</Match>
|
|
|
|
|
2016-12-14 14:18:58 -05:00
|
|
|
<!--
|
|
|
|
This class exposes stream constructors. The newly created streams are not
|
|
|
|
supposed to be closed in the constructor. Ignore the OBL warning.
|
|
|
|
-->
|
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.server.datanode.FileIoProvider$WrappedFileOutputStream" />
|
|
|
|
<Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
|
|
|
|
</Match>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
This class exposes stream constructors. The newly created streams are not
|
|
|
|
supposed to be closed in the constructor. Ignore the OBL warning.
|
|
|
|
-->
|
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.server.datanode.FileIoProvider$WrappedFileInputStream" />
|
|
|
|
<Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
|
|
|
|
</Match>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
This class exposes stream constructors. The newly created streams are not
|
|
|
|
supposed to be closed in the constructor. Ignore the OBL warning.
|
|
|
|
-->
|
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.server.datanode.FileIoProvider$WrappedRandomAccessFile" />
|
|
|
|
<Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
|
|
|
|
</Match>
|
|
|
|
|
2011-07-29 12:28:45 -04:00
|
|
|
<!--
|
|
|
|
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>
|
2011-06-12 18:00:51 -04:00
|
|
|
<!--
|
|
|
|
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>
|
2012-03-01 20:37:02 -05:00
|
|
|
<!--
|
|
|
|
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>
|
2014-09-02 17:02:29 -04:00
|
|
|
<!--
|
|
|
|
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" />
|
2016-12-01 09:08:59 -05:00
|
|
|
</Match>
|
|
|
|
<!--
|
|
|
|
FSEditLog#getTotalSyncCount is not synchronized because this method is
|
|
|
|
used by metrics. NullPointerException can happen and it is ignored.
|
|
|
|
-->
|
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.server.namenode.FSEditLog" />
|
|
|
|
<Field name="editLogStream" />
|
|
|
|
<Bug pattern="IS2_INCONSISTENT_SYNC" />
|
|
|
|
</Match>
|
|
|
|
<!--
|
|
|
|
FSEditLog#isOpenForWriteWithoutLock and FSEditLog#isSegmentOpenWithoutLock
|
|
|
|
are not synchronized because these methods are used by metrics.
|
|
|
|
-->
|
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.server.namenode.FSEditLog" />
|
|
|
|
<Field name="state" />
|
|
|
|
<Bug pattern="IS2_INCONSISTENT_SYNC" />
|
|
|
|
</Match>
|
|
|
|
<!--
|
|
|
|
All of the threads which update/increment txid are synchronized,
|
|
|
|
so make txid volatile instead of AtomicLong.
|
|
|
|
-->
|
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.server.namenode.FSEditLog" />
|
|
|
|
<Field name="txid" />
|
|
|
|
<Bug pattern="VO_VOLATILE_INCREMENT" />
|
2014-09-02 17:02:29 -04:00
|
|
|
</Match>
|
2012-03-01 20:32:49 -05:00
|
|
|
<!--
|
|
|
|
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>
|
2012-04-09 15:39:58 -04:00
|
|
|
<!-- 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>
|
2012-07-19 20:25:50 -04:00
|
|
|
|
|
|
|
<!-- More complex cleanup logic confuses findbugs -->
|
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.qjournal.server.Journal" />
|
2018-11-29 10:27:55 -05:00
|
|
|
<Method name="getPersistedPaxosData" />
|
|
|
|
<Bug pattern="NP_NULL_PARAM_DEREF" />
|
2012-07-19 20:25:50 -04:00
|
|
|
</Match>
|
2013-01-11 18:52:22 -05:00
|
|
|
|
2019-03-29 12:26:20 -04:00
|
|
|
<!-- guava 27.0 update: @Nullable is not detected, however it's there -->
|
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.qjournal.server.Journal" />
|
|
|
|
<Method name="persistPaxosData" />
|
|
|
|
<Bug pattern="NP_NULL_PARAM_DEREF" />
|
|
|
|
</Match>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- guava 27.0 update: @Nullable is not detected, however it's there -->
|
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.qjournal.server.JournalNode" />
|
|
|
|
<Method name="getLogDir" />
|
|
|
|
<Bug pattern="NP_NULL_PARAM_DEREF" />
|
|
|
|
</Match>
|
|
|
|
|
|
|
|
<!-- guava 27.0 update: redundant nullcheck (assert for not null) -->
|
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.qjournal.server.JournalNode" />
|
|
|
|
<Method name="getLogDir" />
|
|
|
|
<Bug pattern="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE" />
|
|
|
|
</Match>
|
|
|
|
|
2013-01-08 14:51:44 -05:00
|
|
|
<!-- Don't complain about LocalDatanodeInfo's anonymous class -->
|
|
|
|
<Match>
|
2016-04-25 15:01:48 -04:00
|
|
|
<Class name="org.apache.hadoop.hdfs.client.impl.BlockReaderLocal$LocalDatanodeInfo$1" />
|
2013-01-08 14:51:44 -05:00
|
|
|
<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" />
|
2013-01-08 17:43:40 -05:00
|
|
|
</Match>
|
2013-10-17 17:49:30 -04:00
|
|
|
<!-- 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>
|
2013-07-04 01:52:13 -04:00
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.server.datanode.ReplicaInfo" />
|
|
|
|
<Method name="setDirInternal" />
|
|
|
|
<Bug pattern="DM_STRING_CTOR" />
|
|
|
|
</Match>
|
2013-10-24 21:56:05 -04:00
|
|
|
<!-- 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>
|
2013-11-27 12:55:52 -05:00
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.protocol.CacheDirective" />
|
|
|
|
<Method name="insertInternal" />
|
|
|
|
<Bug pattern="BC_UNCONFIRMED_CAST" />
|
|
|
|
</Match>
|
2013-10-24 21:56:05 -04:00
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.server.blockmanagement.CacheReplicationMonitor" />
|
2013-12-17 13:47:04 -05:00
|
|
|
<Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
|
2013-10-24 21:56:05 -04:00
|
|
|
</Match>
|
2014-01-25 15:01:26 -05:00
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.DFSUtil"/>
|
|
|
|
<Method name="assertAllResultsEqual" />
|
|
|
|
<Bug pattern="NP_LOAD_OF_KNOWN_NULL_VALUE" />
|
|
|
|
</Match>
|
2017-02-27 20:07:45 -05:00
|
|
|
<!-- Manually verified that signed byte value involved in bitwise OR is not negative -->
|
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.server.namenode.INodeFile$HeaderFormat" />
|
|
|
|
<Method name="getBlockLayoutRedundancy" />
|
|
|
|
<Bug pattern="BIT_IOR_OF_SIGNED_BYTE" />
|
|
|
|
</Match>
|
2017-03-15 21:01:45 -04:00
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.server.datanode.checker.AbstractFuture" />
|
|
|
|
<Bug pattern="DLS_DEAD_STORE_OF_CLASS_LITERAL" />
|
|
|
|
</Match>
|
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.server.datanode.checker.AbstractFuture" />
|
|
|
|
<Bug pattern="DLS_DEAD_LOCAL_STORE" />
|
|
|
|
</Match>
|
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.server.datanode.checker.AbstractFuture" />
|
|
|
|
<Bug pattern="NS_DANGEROUS_NON_SHORT_CIRCUIT" />
|
|
|
|
</Match>
|
2017-08-02 15:12:48 -04:00
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.server.namenode.NNUpgradeUtil$1" />
|
|
|
|
<Method name="visitFile" />
|
|
|
|
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE" />
|
|
|
|
</Match>
|
2017-08-15 04:48:49 -04:00
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.server.namenode.NNUpgradeUtil$1" />
|
|
|
|
<Method name="visitFile" />
|
|
|
|
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE" />
|
|
|
|
</Match>
|
|
|
|
<!-- Ignore warnings for not changing the startup option parsing behavior. -->
|
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.server.common.HdfsServerConstants$StartupOption" />
|
|
|
|
<Method name="setClusterId" />
|
|
|
|
<Bug pattern="ME_ENUM_FIELD_SETTER" />
|
|
|
|
</Match>
|
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.server.common.HdfsServerConstants$StartupOption" />
|
|
|
|
<Method name="setForce" />
|
|
|
|
<Bug pattern="ME_ENUM_FIELD_SETTER" />
|
|
|
|
</Match>
|
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.server.common.HdfsServerConstants$StartupOption" />
|
|
|
|
<Method name="setForceFormat" />
|
|
|
|
<Bug pattern="ME_ENUM_FIELD_SETTER" />
|
|
|
|
</Match>
|
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.server.common.HdfsServerConstants$StartupOption" />
|
|
|
|
<Method name="setInteractiveFormat" />
|
|
|
|
<Bug pattern="ME_ENUM_FIELD_SETTER" />
|
|
|
|
</Match>
|
2019-12-12 23:51:52 -05:00
|
|
|
<Match>
|
|
|
|
<Class name="org.apache.hadoop.hdfs.server.datanode.DirectoryScanner" />
|
|
|
|
<Method name="reconcile" />
|
|
|
|
<Bug pattern="SWL_SLEEP_WITH_LOCK_HELD" />
|
|
|
|
</Match>
|
|
|
|
</FindBugsFilter>
|