[ https://issues.apache.org/jira/browse/HBASE-20932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16558358#comment-16558358 ]
Hudson commented on HBASE-20932: -------------------------------- Results for branch master [build #409 on builds.a.o|https://builds.apache.org/job/HBase%20Nightly/job/master/409/]: (x) *{color:red}-1 overall{color}* ---- details (if available): (/) {color:green}+1 general checks{color} -- For more information [see general report|https://builds.apache.org/job/HBase%20Nightly/job/master/409//General_Nightly_Build_Report/] (x) {color:red}-1 jdk8 hadoop2 checks{color} -- For more information [see jdk8 (hadoop2) report|https://builds.apache.org/job/HBase%20Nightly/job/master/409//JDK8_Nightly_Build_Report_(Hadoop2)/] (x) {color:red}-1 jdk8 hadoop3 checks{color} -- For more information [see jdk8 (hadoop3) report|https://builds.apache.org/job/HBase%20Nightly/job/master/409//JDK8_Nightly_Build_Report_(Hadoop3)/] (/) {color:green}+1 source release artifact{color} -- See build output for details. (/) {color:green}+1 client integration test{color} > Effective MemStoreSize::hashCode() > ----------------------------------- > > Key: HBASE-20932 > URL: https://issues.apache.org/jira/browse/HBASE-20932 > Project: HBase > Issue Type: Bug > Affects Versions: 2.0.2 > Reporter: Mingliang Liu > Assignee: Mingliang Liu > Priority: Major > Fix For: 2.2.0 > > Attachments: HBASE-20932.001.patch, HBASE-20932.002.patch > > > After HBASE-20411 we have > {code:java|title=MemStoreSize::hashCode()} > @Override > public int hashCode() { > long h = 31 * this.dataSize; > h = h + 31 * this.heapSize; > h = h + 31 * this.offHeapSize; > return (int) h; > } > {code} > This is not effective {{hashCode()}} implementation. Instead we can use: > {code:java|title=MemStoreSize::hashCode()} > @Override > public int hashCode() { > long h = this.dataSize; > h = h * 31 + this.heapSize; > h = h * 31 + this.offHeapSize; > return (int) h; > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)