HBASE-19249 test for "hbase antipatterns" should check _count_ of occurance 
rather than text of

Signed-off-by: Apekshit Sharma <a...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/dea935da
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/dea935da
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/dea935da

Branch: refs/heads/branch-1.3
Commit: dea935dab72afeb4b366bb5307ee69f04a4bc50e
Parents: 26ff420
Author: Sean Busbey <bus...@apache.org>
Authored: Mon Nov 13 16:12:32 2017 -0600
Committer: Sean Busbey <bus...@apache.org>
Committed: Mon Nov 13 23:18:46 2017 -0600

----------------------------------------------------------------------
 dev-support/hbase-personality.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/dea935da/dev-support/hbase-personality.sh
----------------------------------------------------------------------
diff --git a/dev-support/hbase-personality.sh b/dev-support/hbase-personality.sh
index 24f2ef5..44cbecb 100755
--- a/dev-support/hbase-personality.sh
+++ b/dev-support/hbase-personality.sh
@@ -431,15 +431,15 @@ function hbaseanti_patchfile
 
   start_clock
 
-  warnings=$(${GREP} 'new TreeMap<byte.*()' "${patchfile}")
+  warnings=$(${GREP} -c 'new TreeMap<byte.*()' "${patchfile}")
   if [[ ${warnings} -gt 0 ]]; then
-    add_vote_table -1 hbaseanti "" "The patch appears to have anti-pattern 
where BYTES_COMPARATOR was omitted: ${warnings}."
+    add_vote_table -1 hbaseanti "" "The patch appears to have anti-pattern 
where BYTES_COMPARATOR was omitted."
     ((result=result+1))
   fi
 
-  warnings=$(${GREP} 'import org.apache.hadoop.classification' "${patchfile}")
+  warnings=$(${GREP} -c 'import org.apache.hadoop.classification' 
"${patchfile}")
   if [[ ${warnings} -gt 0 ]]; then
-    add_vote_table -1 hbaseanti "" "The patch appears use Hadoop 
classification instead of HBase: ${warnings}."
+    add_vote_table -1 hbaseanti "" "The patch appears use Hadoop 
classification instead of HBase."
     ((result=result+1))
   fi
 

Reply via email to