123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557 |
- <!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
- <FindBugsFilter>
- <Match>
- <Package name="org.apache.hadoop.record.compiler.generated" />
- </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>
- <Class name="~.*_jsp" />
- <Bug pattern="DLS_DEAD_LOCAL_STORE" />
- </Match>
- <Match>
- <Class name="~.*_jspx" />
- <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
- -->
- <Match>
- <Package name="~org.apache.hadoop.mapred.*" />
- <Bug code="XSS" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapred.taskdetails_jsp" />
- <Bug code="HRS" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapred.jobdetails_jsp"/>
- <Bug pattern="HRS_REQUEST_PARAMETER_TO_HTTP_HEADER"/>
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapred.taskstats_jsp"/>
- <Bug pattern="HRS_REQUEST_PARAMETER_TO_HTTP_HEADER"/>
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapred.jobtasks_jsp"/>
- <Bug pattern="HRS_REQUEST_PARAMETER_TO_HTTP_HEADER"/>
- </Match>
- <!--
- Ignore warnings where child class has the same name as
- super class. Classes based on Old API shadow names from
- new API. Should go off after HADOOP-1.0
- -->
- <Match>
- <Class name="~org.apache.hadoop.mapred.*" />
- <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" />
- </Match>
- <Match>
- <Class name="~org.apache.hadoop.mapred.*" />
- <Bug pattern="NM_SAME_SIMPLE_NAME_AS_INTERFACE" />
- </Match>
- <Match>
- <Class name="~org.apache.hadoop.mapred.lib.aggregate.*" />
- <Bug pattern="NM_SAME_SIMPLE_NAME_AS_INTERFACE" />
- </Match>
- <Match>
- <Class name="~org.apache.hadoop.mapred.join.*" />
- <Bug pattern="NM_SAME_SIMPLE_NAME_AS_INTERFACE" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapred.SequenceFileInputFilter$Filter" />
- <Bug pattern="NM_SAME_SIMPLE_NAME_AS_INTERFACE" />
- </Match>
- <Match>
- <Class name="~org.apache.hadoop.util.*" />
- <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" />
- </Match>
- <Match>
- <Class name="~org.apache.hadoop.filecache.*" />
- <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" />
- </Match>
- <!--
- Ignore warnings for usage of System.exit. This is
- required and have been well thought out
- -->
- <Match>
- <Class name="org.apache.hadoop.mapred.Child$2" />
- <Method name="run" />
- <Bug pattern="DM_EXIT" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapred.JobTracker" />
- <Method name="addHostToNodeMapping" />
- <Bug pattern="DM_EXIT" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapred.Task" />
- <Or>
- <Method name="done" />
- <Method name="commit" />
- <Method name="statusUpdate" />
- </Or>
- <Bug pattern="DM_EXIT" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapred.JobTracker" />
- <Field name="clock" />
- <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapred.Task$TaskReporter" />
- <Method name="run" />
- <Bug pattern="DM_EXIT" />
- </Match>
- <!--
- We need to cast objects between old and new api objects
- -->
- <Match>
- <Class name="org.apache.hadoop.mapred.OutputCommitter" />
- <Bug pattern="BC_UNCONFIRMED_CAST" />
- </Match>
- <!--
- We intentionally do the get name from the inner class
- -->
- <Match>
- <Class name="org.apache.hadoop.mapred.TaskTracker$MapEventsFetcherThread" />
- <Method name="run" />
- <Bug pattern="IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapred.FileOutputCommitter" />
- <Or>
- <Method name="commitJob" />
- <Method name="recoverTask" />
- <Method name="isRecoverySupported" />
- <Method name="isCommitJobRepeatable" />
- </Or>
- <Bug pattern="NM_WRONG_PACKAGE" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapred.OutputCommitter" />
- <Or>
- <Method name="abortJob" />
- <Method name="commitJob" />
- <Method name="cleanupJob" />
- <Method name="recoverTask" />
- <Method name="isRecoverySupported" />
- <Method name="isCommitJobRepeatable" />
- </Or>
- <Bug pattern="NM_WRONG_PACKAGE_INTENTIONAL" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapred.TaskCompletionEvent" />
- <Or>
- <Method name="setTaskStatus" />
- <Method name="setTaskAttemptId" />
- </Or>
- <Bug pattern="NM_WRONG_PACKAGE" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapred.lib.db.DBInputFormat$DBRecordReader" />
- <Method name="next" />
- <Bug pattern="NM_WRONG_PACKAGE_INTENTIONAL" />
- </Match>
- <!--
- Ignoring this warning as resolving this would need a non-trivial change in code
- -->
- <Match>
- <Class name="org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorBaseDescriptor" />
- <Method name="configure" />
- <Field name="maxNumItems" />
- <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
- </Match>
- <!--
- Comes from org.apache.jasper.runtime.ResourceInjector. Cannot do much.
- -->
- <Match>
- <Class name="org.apache.hadoop.mapred.jobqueue_005fdetails_jsp" />
- <Field name="_jspx_resourceInjector" />
- <Bug pattern="SE_BAD_FIELD" />
- </Match>
- <!--
- Storing textInputFormat and then passing it as a parameter. Safe to ignore.
- -->
- <Match>
- <Class name="org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorJob" />
- <Method name="createValueAggregatorJob" />
- <Bug pattern="DLS_DEAD_STORE_OF_CLASS_LITERAL" />
- </Match>
- <!--
- Can remove this after the upgrade to findbugs1.3.8
- -->
- <Match>
- <Class name="org.apache.hadoop.mapred.lib.db.DBInputFormat" />
- <Method name="getSplits" />
- <Bug pattern="DLS_DEAD_LOCAL_STORE" />
- </Match>
- <!--
- org.apache.hadoop.mapred.IndexCache is thread-safe. It does not need
- synchronous access.
- -->
- <Match>
- <Class name="org.apache.hadoop.mapred.TaskTracker" />
- <Field name="indexCache" />
- <Bug pattern="IS2_INCONSISTENT_SYNC" />
- </Match>
- <!--
- None of the following variables should be referenced by any thread
- but the collection thread in MapTask
- -->
- <Match>
- <Class name="org.apache.hadoop.mapred.MapTask$MapOutputBuffer" />
- <Field name="kvindex" />
- <Bug pattern="IS2_INCONSISTENT_SYNC" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapred.MapTask$MapOutputBuffer" />
- <Field name="bufferRemaining" />
- <Bug pattern="IS2_INCONSISTENT_SYNC" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapred.MapTask$MapOutputBuffer" />
- <Field name="equator" />
- <Bug pattern="IS2_INCONSISTENT_SYNC" />
- </Match>
- <!-- This is spurious. -->
- <Match>
- <Class name="org.apache.hadoop.mapred.MapTask$MapOutputBuffer$SpillThread" />
- <Method name="run" />
- <Bug pattern="UL_UNRELEASED_LOCK_EXCEPTION_PATH" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapreduce.task.reduce.MergeThread" />
- <Field name="inputs" />
- <Bug pattern="IS2_INCONSISTENT_SYNC" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapred.JobTracker" />
- <Method name="updateTaskTrackerStatus" />
- <Bug pattern="DLS_DEAD_LOCAL_STORE" />
- </Match>
- <!--
- This class is unlikely to get subclassed, so ignore
- -->
- <Match>
- <Class name="org.apache.hadoop.mapreduce.task.reduce.MergeManagerImpl" />
- <Bug pattern="SC_START_IN_CTOR" />
- </Match>
- <!--
- This class is unlikely to get subclassed, so ignore
- -->
- <Match>
- <Class name="org.apache.hadoop.mapreduce.task.reduce.ShuffleSchedulerImpl" />
- <Bug pattern="SC_START_IN_CTOR" />
- </Match>
- <!--
- Do not bother if equals is not implemented. We will not need it here
- -->
- <Match>
- <Class name="org.apache.hadoop.mapreduce.task.reduce.ShuffleSchedulerImpl$Penalty" />
- <Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS" />
- </Match>
- <!--
- Ignore untidy code generated by Avro
- -->
- <Match>
- <Class name="org.apache.hadoop.mapreduce.jobhistory.JobSubmitted" />
- <Bug pattern="NP_NULL_INSTANCEOF" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapred.Task" />
- <Method name="reportFatalError" />
- <Bug pattern="DM_EXIT" />
- </Match>
- <!--
- core changes
- -->
- <Match>
- <Class name="~org.apache.hadoop.*" />
- <Bug code="MS" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.fs.FileSystem" />
- <Method name="checkPath" />
- <Bug pattern="ES_COMPARING_STRINGS_WITH_EQ" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.fs.kfs.KFSOutputStream" />
- <Field name="path" />
- <Bug pattern="URF_UNREAD_FIELD" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.fs.kfs.KosmosFileSystem" />
- <Method name="initialize" />
- <Bug pattern="DM_EXIT" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.io.Closeable" />
- <Bug pattern="NM_SAME_SIMPLE_NAME_AS_INTERFACE" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.security.AccessControlException" />
- <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.record.meta.Utils" />
- <Method name="skip" />
- <Bug pattern="BC_UNCONFIRMED_CAST" />
- </Match>
- <!--
- The compareTo method is actually a dummy method that just
- throws excpetions. So, no need to override equals. Ignore
- -->
- <Match>
- <Class name="org.apache.hadoop.record.meta.RecordTypeInfo" />
- <Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.util.ProcfsBasedProcessTree" />
- <Bug pattern="DMI_HARDCODED_ABSOLUTE_FILENAME" />
- </Match>
- <!--
- Streaming, Examples
- -->
- <Match>
- <Class name="org.apache.hadoop.streaming.StreamUtil$TaskId" />
- <Bug pattern="URF_UNREAD_FIELD" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.examples.DBCountPageView" />
- <Method name="verify" />
- <Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.examples.ContextFactory" />
- <Method name="setAttributes" />
- <Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapred.TaskScheduler$QueueRefresher" />
- <Bug pattern="SIC_INNER_SHOULD_BE_STATIC" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.examples.terasort.TeraInputFormat$1" />
- <Method name="run" />
- <Bug pattern="DM_EXIT" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.examples.terasort.TeraOutputFormat$TeraOutputCommitter"/>
- <Bug pattern="NM_WRONG_PACKAGE_INTENTIONAL" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.examples.terasort.Unsigned16" />
- <Method name="getHexDigit"/>
- <Bug pattern="ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT" />
- </Match>
- <!--
- False positive of FindBugs complaining that initializationPoller and
- started were accessed through
- CapacitySchedulerQueueRefresher.refreshQueues without explicitly holding
- the lock of CapacityTaskScheduler. The lock is in fact acquired by
- JobTracker prior to calling QueueManager.refereshQueues - this is
- necessary to ensure the order of locking (TaskScheduler ->
- QueueManager).
- -->
- <Match>
- <Class name="org.apache.hadoop.mapred.CapacityTaskScheduler" />
- <Field name="initializationPoller" />
- <Bug pattern="IS2_INCONSISTENT_SYNC" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapred.CapacityTaskScheduler" />
- <Field name="started" />
- <Bug pattern="IS2_INCONSISTENT_SYNC" />
- </Match>
-
- <!-- Yarn excludes -->
- <Match>
- <Class name="org.apache.hadoop.mapreduce.v2.app.job.impl.TaskAttemptImpl" />
- <Method name="computeSlotMillis" />
- <Bug pattern="DB_DUPLICATE_BRACHES" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapreduce.v2.app.MRAppMaster$1" />
- <Bug pattern="DM_EXIT" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapred.LocalContainerLauncher$SubtaskRunner" />
- <Bug pattern="DM_EXIT" />
- </Match>
- <Match>
- <Class name="~org\.apache\.hadoop\.mapreduce\.v2\.app\.job\.impl\.TaskImpl.*" />
- <Bug pattern="BC_UNCONFIRMED_CAST" />
- </Match>
- <Match>
- <Class name="~org\.apache\.hadoop\.mapreduce\.v2\.app\.job\.impl\.JobImpl.*" />
- <Bug pattern="BC_UNCONFIRMED_CAST" />
- </Match>
- <Match>
- <Class name="~org\.apache\.hadoop\.mapreduce\.v2\.app\.job\.impl\.TaskAttemptImpl.*" />
- <Bug pattern="BC_UNCONFIRMED_CAST" />
- </Match>
- <Match>
- <Class name="~org\.apache\.hadoop\.mapreduce\.v2\.app\.recover\.RecoveryService" />
- <Bug pattern="BC_UNCONFIRMED_CAST" />
- </Match>
- <Match>
- <Class name="~org\.apache\.hadoop\.mapreduce\.v2\.app\.rm\.RMContainerAllocator" />
- <Bug pattern="BC_UNCONFIRMED_CAST" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapreduce.v2.app.job.impl.TaskAttemptImpl" />
- <Method name="computeSlotMillis" />
- <Bug pattern="DB_DUPLICATE_BRANCHES" />
- </Match>
- <Match>
- <Package name="org.apache.hadoop.yarn.proto" />
- </Match>
- <Match>
- <Package name="org.apache.hadoop.mapreduce.v2.hs.proto" />
- </Match>
- <Match>
- <Class name="~org\.apache\.hadoop\.mapreduce\.v2\.proto.*" />
- </Match>
- <Match>
- <Package name="org.apache.hadoop.mapred.proto" />
- </Match>
-
- <!--
- The below fields are accessed locally and only via methods that are synchronized.
- -->
- <Match>
- <Class name="org.apache.hadoop.mapreduce.v2.app.rm.RMContainerAllocator" />
- <Or>
- <Field name="mapResourceRequest" />
- <Field name="reduceResourceRequest" />
- <Field name="maxReduceRampupLimit" />
- <Field name="reduceSlowStart" />
- <Field name="reduceNodeLabelExpression" />
- </Or>
- <Bug pattern="IS2_INCONSISTENT_SYNC" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapreduce.v2.app.local.LocalContainerAllocator" />
- <Or>
- <Field name="retryInterval" />
- <Field name="retrystartTime" />
- </Or>
- <Bug pattern="IS2_INCONSISTENT_SYNC" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapreduce.v2.app.commit.CommitterEventHandler" />
- <Field name="commitThreadCancelTimeoutMs" />
- <Bug pattern="IS2_INCONSISTENT_SYNC" />
- </Match>
-
- <Match>
- <Class name="org.apache.hadoop.mapred.ShuffleHandler" />
- <Field name="sslFileBufferSize" />
- <Bug pattern="IS2_INCONSISTENT_SYNC" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapred.ClientServiceDelegate" />
- <Method name="invoke" />
- <Bug pattern="SWL_SLEEP_WITH_LOCK_HELD" />
- </Match>
-
- <Match>
- <Class name="org.apache.hadoop.mapreduce.util.ProcessTree" />
- <Method name="sendSignal" />
- <Bug pattern="NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH" />
- </Match>
-
- <Match>
- <Class name="org.apache.hadoop.mapreduce.util.ProcessTree" />
- <Method name="isSetsidSupported" />
- <Bug pattern="NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH" />
- </Match>
- <Match>
- <Class name="org.apache.hadoop.mapreduce.util.ProcessTree" />
- <Method name="isSetsidSupported" />
- <Bug pattern="NP_NULL_ON_SOME_PATH_EXCEPTION" />
- </Match>
-
- <Match>
- <Class name="org.apache.hadoop.mapreduce.v2.hs.CachedHistoryStorage$1" />
- <Bug pattern="SE_BAD_FIELD_INNER_CLASS" />
- </Match>
- <!--
- HADOOP-17138: Suppress warnings about unchecked Nullable
- since the methoad catches NullPointerException then registerError.
- -->
- <Match>
- <Or>
- <Class name="org.apache.hadoop.mapred.LocatedFileStatusFetcher$ProcessInputDirCallback" />
- <Class name="org.apache.hadoop.mapred.LocatedFileStatusFetcher$ProcessInitialInputPathCallback" />
- </Or>
- <Method name="onSuccess" />
- <Bug pattern="NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE" />
- </Match>
- </FindBugsFilter>
|