HBASE-19249 test for "hbase antipatterns" should check _count_ of occurance rather than text of
Signed-off-by: Apekshit Sharma <appy@apache.org>
This commit is contained in:
parent
d0fb4bd783
commit
d5df4c0426
|
@ -431,21 +431,21 @@ function hbaseanti_patchfile
|
||||||
|
|
||||||
start_clock
|
start_clock
|
||||||
|
|
||||||
warnings=$(${GREP} 'new TreeMap<byte.*()' "${patchfile}")
|
warnings=$(${GREP} -c 'new TreeMap<byte.*()' "${patchfile}")
|
||||||
if [[ ${warnings} -gt 0 ]]; then
|
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))
|
((result=result+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
warnings=$(${GREP} 'import org.apache.hadoop.classification' "${patchfile}")
|
warnings=$(${GREP} -c 'import org.apache.hadoop.classification' "${patchfile}")
|
||||||
if [[ ${warnings} -gt 0 ]]; then
|
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))
|
((result=result+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
warnings=$(${GREP} 'import org.codehaus.jackson' "${patchfile}")
|
warnings=$(${GREP} -c 'import org.codehaus.jackson' "${patchfile}")
|
||||||
if [[ ${warnings} -gt 0 ]]; then
|
if [[ ${warnings} -gt 0 ]]; then
|
||||||
add_vote_table -1 hbaseanti "" "The patch appears use Jackson 1 classes/annotations: ${warnings}."
|
add_vote_table -1 hbaseanti "" "The patch appears use Jackson 1 classes/annotations."
|
||||||
((result=result+1))
|
((result=result+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue