[ 
https://issues.apache.org/jira/browse/HADOOP-12188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14614978#comment-14614978
 ] 

Kengo Seki commented on HADOOP-12188:
-------------------------------------

Regression test for mvn-based project. The result without this patch is as 
follows:

{code}
[sekikn@localhost hadoop]$ cat ~/hadoop.patch                                   
                                                        
diff --git 
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
 
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
index 54e07c6..b2a74ba 100644
--- 
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
+++ 
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
@@ -100,7 +100,7 @@
 import org.xml.sax.SAXException;
 
 import com.google.common.base.Preconditions;
-
+import sun.misc.Unsafe;
 /** 
  * Provides access to configuration parameters.
  *
@@ -2977,7 +2977,7 @@ public void write(DataOutput out) throws IOException {
   /**
    * get keys matching the the regex 
    * @param regex
-   * @return Map<String,String> with matching keys
+   * @return
    */
   public Map<String,String> getValByRegex(String regex) {
     Pattern p = Pattern.compile(regex);
[sekikn@localhost hadoop]$ dev-support/test-patch.sh --basedir=../dev/hadoop 
--project=hadoop --resetrepo ~/hadoop.patch               

(snip)

| Vote |      Subsystem |  Runtime   | Comment
============================================================================
|  +1  |    mvninstall  |  13m 40s   | trunk passed 
|  +1  |         javac  |  0m 53s    | trunk passed 
|  +1  |       javadoc  |  1m 23s    | trunk passed 
|  +1  |       @author  |  0m 0s     | The patch does not contain any @author 
|      |                |            | tags.
|  -1  |    test4tests  |  0m 0s     | The patch doesn't appear to include any 
|      |                |            | new or modified tests. Please justify why
|      |                |            | no new tests are needed for this patch.
|      |                |            | Also please list what manual steps were
|      |                |            | performed to verify this patch.
|  +1  |    checkstyle  |  1m 25s    | trunk passed 
|  -1  |         javac  |  0m 52s    | Patched hadoop-common generated 1 
|      |                |            | additional warning messages.
|  -1  |       javadoc  |  1m 24s    | Patched 
|      |                |            | hadoop-common-project/hadoop-common
|      |                |            | generated 1 additional warning messages.
|  +1  |    asflicense  |  0m 14s    | Patch does not generate ASF License 
|      |                |            | warnings.
|  -1  |    checkstyle  |  1m 32s    | Patch generated 2 new checkstyle issues 
|      |                |            | in hadoop-common-project/hadoop-common
|      |                |            | (total was 176, now 178).
|  +1  |    whitespace  |  0m 0s     | Patch has no whitespace issues. 
|  +1  |    mvninstall  |  1m 26s    | the patch passed 
|  +1  |       eclipse  |  0m 24s    | the patch passed 
|  +1  |      findbugs  |  4m 43s    | the patch passed 
|      |                |  32m 46s   | 
{code}

And the result after applying this patch is as follows. Javac and javadoc 
warnings are still correctly detected.

{code}
[sekikn@localhost hadoop]$ dev-support/test-patch.sh --basedir=../dev/hadoop 
--project=hadoop --resetrepo ~/hadoop.patch            

(snip)

| Vote |      Subsystem |  Runtime   | Comment
============================================================================
|  +1  |    mvninstall  |  14m 2s    | trunk passed 
|  +1  |         javac  |  0m 54s    | trunk passed 
|  +1  |       javadoc  |  1m 25s    | trunk passed 
|  +1  |       @author  |  0m 0s     | The patch does not contain any @author 
|      |                |            | tags.
|  -1  |    test4tests  |  0m 0s     | The patch doesn't appear to include any 
|      |                |            | new or modified tests. Please justify why
|      |                |            | no new tests are needed for this patch.
|      |                |            | Also please list what manual steps were
|      |                |            | performed to verify this patch.
|  +1  |    checkstyle  |  1m 30s    | trunk passed 
|  -1  |         javac  |  0m 54s    | Patched hadoop-common generated 1 
|      |                |            | additional warning messages.
|  -1  |       javadoc  |  1m 27s    | Patched hadoop-common generated 1 
|      |                |            | additional warning messages.
|  +1  |    asflicense  |  0m 13s    | Patch does not generate ASF License 
|      |                |            | warnings.
|  -1  |    checkstyle  |  1m 41s    | Patch generated 2 new checkstyle issues 
|      |                |            | in hadoop-common-project/hadoop-common
|      |                |            | (total was 176, now 178).
|  +1  |    whitespace  |  0m 0s     | Patch has no whitespace issues. 
|  +1  |    mvninstall  |  1m 46s    | the patch passed 
|  +1  |       eclipse  |  0m 29s    | the patch passed 
|  +1  |      findbugs  |  4m 49s    | the patch passed 
|      |                |  34m 29s   | 
{code}


> javac warning file is always empty on ant-based projects
> --------------------------------------------------------
>
>                 Key: HADOOP-12188
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12188
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: yetus
>            Reporter: Kengo Seki
>            Assignee: Kengo Seki
>         Attachments: HADOOP-12188.HADOOP-12111.01.patch
>
>
> (branch|patch)-javac-root-warning.txt is always empty though there are some 
> warnings on ant-based projects, because check_patch_javac filters warning 
> messages as follows:
> {code}
>       if [[ -f "${PATCH_DIR}/branch-javac-${fn}.txt" ]]; then                 
>                                                                 
>         ${GREP} '\[WARNING\]' "${PATCH_DIR}/branch-javac-${fn}.txt" \         
>                                                                 
>           > "${PATCH_DIR}/branch-javac-${fn}-warning.txt"                     
>                                                                 
>       else                                                                    
>                                                                 
>         touch "${PATCH_DIR}/branch-javac-${fn}.txt" \                         
>                                                                 
>           "${PATCH_DIR}/branch-javac-${fn}-warning.txt"                       
>                                                                 
>       fi                                                                      
>                                                                 
>                                                                               
>                                                                 
>       ${GREP} '\[WARNING\]' "${PATCH_DIR}/patch-javac-${fn}.txt" \            
>                                                                 
>         > "${PATCH_DIR}/patch-javac-${fn}-warning.txt"                        
>                                                                 
> {code}
> But ant's warning output format is as follows:
> {code}
> [javac] 
> /home/sekikn/pig/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java:64:
>  warning: [deprecation] ComparisonFunc in org.apache.pig has been deprecated
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to