You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2019/03/28 05:09:31 UTC

[hbase] branch branch-2.1 updated: HBASE-22100 False positive for error prone warnings in pre commit job

This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new e9788c5  HBASE-22100 False positive for error prone warnings in pre commit job
e9788c5 is described below

commit e9788c5cd5c0eb9f9c2a8e00ba2a0036c08d68fb
Author: zhangduo <zh...@apache.org>
AuthorDate: Wed Mar 27 17:03:02 2019 +0800

    HBASE-22100 False positive for error prone warnings in pre commit job
    
    Signed-off-by: Sean Busbey <bu...@apache.org>
---
 dev-support/hbase-personality.sh | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/dev-support/hbase-personality.sh b/dev-support/hbase-personality.sh
index 00ccb45..e5ccea0 100755
--- a/dev-support/hbase-personality.sh
+++ b/dev-support/hbase-personality.sh
@@ -705,6 +705,24 @@ function hbaseanti_patchfile
   return 0
 }
 
+## @description  process the javac output for generating WARNING/ERROR
+## @audience     private
+## @stability    evolving
+## @param        input filename
+## @param        output filename
+# Override the default javac_logfilter so that we can do a sort before outputing the WARNING/ERROR.
+# This is because that the output order of the error prone warnings is not stable, so the diff
+# method will report unexpected errors if we do not sort it. Notice that a simple sort will cause
+# line number being sorted by lexicographical so the output maybe a bit strange to human but it is
+# really hard to sort by file name first and then line number and column number in shell...
+function hbase_javac_logfilter
+{
+  declare input=$1
+  declare output=$2
+
+  ${GREP} -E '\[(ERROR|WARNING)\] /.*\.java:' "${input}" | sort > "${output}"
+}
+
 ## This is named so that yetus will check us right after running tests.
 ## Essentially, we check for normal failures and then we look for zombies.
 #function hbase_unit_logfilter