Browse Source

HADOOP-8339. jenkins complaining about 16 javadoc warnings (Tom White and Robert Evans via tgraves)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1332853 13f79535-47bb-0310-9956-ffa450edef68
Thomas Graves 13 years ago
parent
commit
70c392df0e

+ 0 - 21
dev-support/test-patch.properties

@@ -1,21 +0,0 @@
-# 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.
-
-# The number of acceptable warning for *all* modules
-# Please update the per-module test-patch.properties if you update this file.
-
-OK_RELEASEAUDIT_WARNINGS=0
-OK_FINDBUGS_WARNINGS=0
-OK_JAVADOC_WARNINGS=8

+ 9 - 17
dev-support/test-patch.sh

@@ -240,15 +240,6 @@ setup () {
       cleanupAndExit 0
       cleanupAndExit 0
     fi
     fi
   fi
   fi
-  . $BASEDIR/dev-support/test-patch.properties
-  ### exit if warnings are NOT defined in the properties file
-  if [ -z "$OK_FINDBUGS_WARNINGS" ] || [[ -z "$OK_JAVADOC_WARNINGS" ]] || [[ -z $OK_RELEASEAUDIT_WARNINGS ]]; then
-    echo "Please define the following properties in test-patch.properties file"
-	 echo  "OK_FINDBUGS_WARNINGS"
-	 echo  "OK_RELEASEAUDIT_WARNINGS"
-	 echo  "OK_JAVADOC_WARNINGS"
-    cleanupAndExit 1
-  fi
   echo ""
   echo ""
   echo ""
   echo ""
   echo "======================================================================"
   echo "======================================================================"
@@ -400,8 +391,10 @@ checkJavadocWarnings () {
   echo ""
   echo ""
   echo "There appear to be $javadocWarnings javadoc warnings generated by the patched build."
   echo "There appear to be $javadocWarnings javadoc warnings generated by the patched build."
 
 
+  #There are 6 warnings that are caused by things that are caused by using sun internal APIs.
+  OK_JAVADOC_WARNINGS=6;
   ### if current warnings greater than OK_JAVADOC_WARNINGS
   ### if current warnings greater than OK_JAVADOC_WARNINGS
-  if [[ $javadocWarnings -gt $OK_JAVADOC_WARNINGS ]] ; then
+  if [[ $javadocWarnings -ne $OK_JAVADOC_WARNINGS ]] ; then
     JIRA_COMMENT="$JIRA_COMMENT
     JIRA_COMMENT="$JIRA_COMMENT
 
 
     -1 javadoc.  The javadoc tool appears to have generated `expr $(($javadocWarnings-$OK_JAVADOC_WARNINGS))` warning messages."
     -1 javadoc.  The javadoc tool appears to have generated `expr $(($javadocWarnings-$OK_JAVADOC_WARNINGS))` warning messages."
@@ -481,12 +474,12 @@ checkReleaseAuditWarnings () {
     patchReleaseAuditWarnings=`$GREP -c '\!?????' $PATCH_DIR/patchReleaseAuditWarnings.txt`
     patchReleaseAuditWarnings=`$GREP -c '\!?????' $PATCH_DIR/patchReleaseAuditWarnings.txt`
     echo ""
     echo ""
     echo ""
     echo ""
-    echo "There appear to be $OK_RELEASEAUDIT_WARNINGS release audit warnings before the patch and $patchReleaseAuditWarnings release audit warnings after applying the patch."
-    if [[ $patchReleaseAuditWarnings != "" && $OK_RELEASEAUDIT_WARNINGS != "" ]] ; then
-      if [[ $patchReleaseAuditWarnings -gt $OK_RELEASEAUDIT_WARNINGS ]] ; then
+    echo "There appear to be $patchReleaseAuditWarnings release audit warnings after applying the patch."
+    if [[ $patchReleaseAuditWarnings != "" ]] ; then
+      if [[ $patchReleaseAuditWarnings -gt 0 ]] ; then
         JIRA_COMMENT="$JIRA_COMMENT
         JIRA_COMMENT="$JIRA_COMMENT
 
 
-    -1 release audit.  The applied patch generated $patchReleaseAuditWarnings release audit warnings (more than the trunk's current $OK_RELEASEAUDIT_WARNINGS warnings)."
+    -1 release audit.  The applied patch generated $patchReleaseAuditWarnings release audit warnings."
         $GREP '\!?????' $PATCH_DIR/patchReleaseAuditWarnings.txt > $PATCH_DIR/patchReleaseAuditProblems.txt
         $GREP '\!?????' $PATCH_DIR/patchReleaseAuditWarnings.txt > $PATCH_DIR/patchReleaseAuditProblems.txt
         echo "Lines that start with ????? in the release audit report indicate files that do not have an Apache license header." >> $PATCH_DIR/patchReleaseAuditProblems.txt
         echo "Lines that start with ????? in the release audit report indicate files that do not have an Apache license header." >> $PATCH_DIR/patchReleaseAuditProblems.txt
         JIRA_COMMENT_FOOTER="Release audit warnings: $BUILD_URL/artifact/trunk/patchprocess/patchReleaseAuditProblems.txt
         JIRA_COMMENT_FOOTER="Release audit warnings: $BUILD_URL/artifact/trunk/patchprocess/patchReleaseAuditProblems.txt
@@ -595,11 +588,10 @@ $JIRA_COMMENT_FOOTER"
     fi
     fi
   done
   done
 
 
-  ### if current warnings greater than OK_FINDBUGS_WARNINGS
-  if [[ $findbugsWarnings -gt $OK_FINDBUGS_WARNINGS ]] ; then
+  if [[ $findbugsWarnings -gt 0 ]] ; then
     JIRA_COMMENT="$JIRA_COMMENT
     JIRA_COMMENT="$JIRA_COMMENT
 
 
-    -1 findbugs.  The patch appears to introduce `expr $(($findbugsWarnings-$OK_FINDBUGS_WARNINGS))` new Findbugs (version ${findbugs_version}) warnings."
+    -1 findbugs.  The patch appears to introduce $findbugsWarnings new Findbugs (version ${findbugs_version}) warnings."
     return 1
     return 1
   fi
   fi
   JIRA_COMMENT="$JIRA_COMMENT
   JIRA_COMMENT="$JIRA_COMMENT

+ 0 - 21
hadoop-common-project/dev-support/test-patch.properties

@@ -1,21 +0,0 @@
-# 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.
-
-# The number of acceptable warning for this module
-# Please update the root test-patch.properties if you update this file.
-
-OK_RELEASEAUDIT_WARNINGS=0
-OK_FINDBUGS_WARNINGS=0
-OK_JAVADOC_WARNINGS=13

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -126,6 +126,9 @@ Trunk (unreleased changes)
     HADOOP-8312. testpatch.sh should provide a simpler way to see which
     HADOOP-8312. testpatch.sh should provide a simpler way to see which
     warnings changed (bobby)
     warnings changed (bobby)
 
 
+    HADOOP-8339. jenkins complaining about 16 javadoc warnings 
+    (Tom White and Robert Evans via tgraves)
+
   OPTIMIZATIONS
   OPTIMIZATIONS
 
 
     HADOOP-7761. Improve the performance of raw comparisons. (todd)
     HADOOP-7761. Improve the performance of raw comparisons. (todd)

+ 1 - 1
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/FenceMethod.java

@@ -52,7 +52,7 @@ public interface FenceMethod {
   
   
   /**
   /**
    * Attempt to fence the target node.
    * Attempt to fence the target node.
-   * @param serviceAddr the address (host:ipcport) of the service to fence
+   * @param target the target of the service to fence
    * @param args the configured arguments, which were checked at startup by
    * @param args the configured arguments, which were checked at startup by
    *             {@link #checkArgs(String)}
    *             {@link #checkArgs(String)}
    * @return true if fencing was successful, false if unsuccessful or
    * @return true if fencing was successful, false if unsuccessful or

+ 2 - 1
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAServiceProtocol.java

@@ -117,12 +117,13 @@ public interface HAServiceProtocol {
   /**
   /**
    * Return the current status of the service. The status indicates
    * Return the current status of the service. The status indicates
    * the current <em>state</em> (e.g ACTIVE/STANDBY) as well as
    * the current <em>state</em> (e.g ACTIVE/STANDBY) as well as
-   * some additional information. {@see HAServiceStatus}
+   * some additional information.
    * 
    * 
    * @throws AccessControlException
    * @throws AccessControlException
    *           if access is denied.
    *           if access is denied.
    * @throws IOException
    * @throws IOException
    *           if other errors happen
    *           if other errors happen
+   * @see HAServiceStatus
    */
    */
   public HAServiceStatus getServiceStatus() throws AccessControlException,
   public HAServiceStatus getServiceStatus() throws AccessControlException,
                                                    IOException;
                                                    IOException;

+ 2 - 2
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java

@@ -1776,7 +1776,7 @@ public abstract class Server {
    * from configuration. Otherwise the configuration will be picked up.
    * from configuration. Otherwise the configuration will be picked up.
    * 
    * 
    * If rpcRequestClass is null then the rpcRequestClass must have been 
    * If rpcRequestClass is null then the rpcRequestClass must have been 
-   * registered via {@link #registerProtocolEngine(RpcPayloadHeader.RpcKind,
+   * registered via {@link #registerProtocolEngine(RPC.RpcKind,
    *  Class, RPC.RpcInvoker)}
    *  Class, RPC.RpcInvoker)}
    * This parameter has been retained for compatibility with existing tests
    * This parameter has been retained for compatibility with existing tests
    * and usage.
    * and usage.
@@ -1990,7 +1990,7 @@ public abstract class Server {
   
   
   /** 
   /** 
    * Called for each call. 
    * Called for each call. 
-   * @deprecated Use  {@link #call(RpcPayloadHeader.RpcKind, String,
+   * @deprecated Use  {@link #call(RPC.RpcKind, String,
    *  Writable, long)} instead
    *  Writable, long)} instead
    */
    */
   @Deprecated
   @Deprecated

+ 0 - 18
hadoop-common-project/hadoop-common/src/test/resources/test-patch.properties

@@ -1,18 +0,0 @@
-# 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.
-
-OK_RELEASEAUDIT_WARNINGS=1
-OK_FINDBUGS_WARNINGS=0
-OK_JAVADOC_WARNINGS=6

+ 0 - 21
hadoop-hdfs-project/dev-support/test-patch.properties

@@ -1,21 +0,0 @@
-# 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.
-
-# The number of acceptable warning for this module
-# Please update the root test-patch.properties if you update this file.
-
-OK_RELEASEAUDIT_WARNINGS=0
-OK_FINDBUGS_WARNINGS=0
-OK_JAVADOC_WARNINGS=8

+ 0 - 18
hadoop-mapreduce-project/dev-support/test-patch.properties

@@ -1,18 +0,0 @@
-# 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.
-
-OK_RELEASEAUDIT_WARNINGS=2
-OK_FINDBUGS_WARNINGS=0
-OK_JAVADOC_WARNINGS=0

+ 1 - 2
hadoop-tools/hadoop-extras/src/main/java/org/apache/hadoop/mapred/tools/package-info.java

@@ -17,7 +17,6 @@
  */
  */
 
 
 /**
 /**
- * Command-line tools associated with the {@link org.apache.hadoop.mapred}
- * package.
+ * Command-line tools associated with MapReduce.
  */
  */
 package org.apache.hadoop.mapred.tools;
 package org.apache.hadoop.mapred.tools;

+ 1 - 3
hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/CurrentJHParser.java

@@ -26,9 +26,7 @@ import org.apache.hadoop.mapreduce.jobhistory.HistoryEvent;
 import org.apache.hadoop.mapreduce.v2.hs.JobHistory;
 import org.apache.hadoop.mapreduce.v2.hs.JobHistory;
 
 
 /**
 /**
- * {@link JobHistoryParser} that parses {@link JobHistory} files produced by
- * {@link org.apache.hadoop.mapreduce.jobhistory.JobHistory} in the same source
- * code tree as rumen.
+ * {@link JobHistoryParser} that parses JobHistory files.
  */
  */
 public class CurrentJHParser implements JobHistoryParser {
 public class CurrentJHParser implements JobHistoryParser {
   private EventReader reader;
   private EventReader reader;

+ 1 - 1
hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/LoggedTaskAttempt.java

@@ -170,7 +170,7 @@ public class LoggedTaskAttempt implements DeepCompare {
 
 
   /**
   /**
    *
    *
-   * @returns a list of all splits vectors, ordered in enumeral order
+   * @return a list of all splits vectors, ordered in enumeral order
    *           within {@link SplitVectorKind} .  Do NOT use hard-coded
    *           within {@link SplitVectorKind} .  Do NOT use hard-coded
    *           indices within the return for this with a hard-coded
    *           indices within the return for this with a hard-coded
    *           index to get individual values; use
    *           index to get individual values; use

+ 3 - 3
hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/datatypes/util/MapReduceJobPropertiesParser.java

@@ -43,7 +43,7 @@ import org.apache.log4j.Logger;
  * across versions. {@link MapReduceJobPropertiesParser} is a utility class that
  * across versions. {@link MapReduceJobPropertiesParser} is a utility class that
  * parses MapReduce job configuration properties and converts the value into a 
  * parses MapReduce job configuration properties and converts the value into a 
  * well defined {@link DataType}. Users can use the
  * well defined {@link DataType}. Users can use the
- * {@link MapReduceJobPropertiesParser#parseJobProperty()} API to process job 
+ * {@link #parseJobProperty(String, String)} API to process job 
  * configuration parameters. This API will parse a job property represented as a
  * configuration parameters. This API will parse a job property represented as a
  * key-value pair and return the value wrapped inside a {@link DataType}. 
  * key-value pair and return the value wrapped inside a {@link DataType}. 
  * Callers can then use the returned {@link DataType} for further processing.
  * Callers can then use the returned {@link DataType} for further processing.
@@ -61,12 +61,12 @@ import org.apache.log4j.Logger;
  * {@link DefaultDataType}. Currently only '-Xmx' and '-Xms' settings are 
  * {@link DefaultDataType}. Currently only '-Xmx' and '-Xms' settings are 
  * considered while the rest are ignored.
  * considered while the rest are ignored.
  * 
  * 
- * Note that the {@link MapReduceJobPropertiesParser#parseJobProperty()} API 
+ * Note that the {@link #parseJobProperty(String, String)} API 
  * maps the keys to a configuration parameter listed in 
  * maps the keys to a configuration parameter listed in 
  * {@link MRJobConfig}. This not only filters non-framework specific keys thus 
  * {@link MRJobConfig}. This not only filters non-framework specific keys thus 
  * ignoring user-specific and hard-to-parse keys but also provides a consistent
  * ignoring user-specific and hard-to-parse keys but also provides a consistent
  * view for all possible inputs. So if users invoke the 
  * view for all possible inputs. So if users invoke the 
- * {@link MapReduceJobPropertiesParser#parseJobProperty()} API with either
+ * {@link #parseJobProperty(String, String)} API with either
  * <"mapreduce.job.user.name", "bob"> or <"user.name", "bob">, then the result 
  * <"mapreduce.job.user.name", "bob"> or <"user.name", "bob">, then the result 
  * would be a {@link UserName} {@link DataType} wrapping the user-name "bob".
  * would be a {@link UserName} {@link DataType} wrapping the user-name "bob".
  */
  */

+ 2 - 2
hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/package-info.java

@@ -181,8 +181,8 @@
  *  <li>
  *  <li>
  *    {@link org.apache.hadoop.tools.rumen.JobBuilder}<br>
  *    {@link org.apache.hadoop.tools.rumen.JobBuilder}<br>
  *      Summarizes a job history file.
  *      Summarizes a job history file.
- *      {@link org.apache.hadoop.tools.rumen.TraceBuilder} provides  
- *      {@link org.apache.hadoop.tools.rumen.TraceBuilder#extractJobID(String)} 
+ *      {@link org.apache.hadoop.tools.rumen.JobHistoryUtils} provides  
+ *      {@link org.apache.hadoop.tools.rumen.JobHistoryUtils#extractJobID(String)} 
  *      API for extracting job id from job history or job configuration files
  *      API for extracting job id from job history or job configuration files
  *      which can be used for instantiating {@link org.apache.hadoop.tools.rumen.JobBuilder}. 
  *      which can be used for instantiating {@link org.apache.hadoop.tools.rumen.JobBuilder}. 
  *      {@link org.apache.hadoop.tools.rumen.JobBuilder} generates a 
  *      {@link org.apache.hadoop.tools.rumen.JobBuilder} generates a