HADOOP-2553 Don't make Long objects calculating hbase type hash codes
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@610698 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
765ee86279
commit
df0f5658a5
|
@ -162,6 +162,7 @@ Trunk (unreleased changes)
|
|||
(Edward Yoon via Stack)
|
||||
HADOOP-2450 Show version (and svn revision) in hbase web ui
|
||||
HADOOP-2472 Range selection using filter (Edward Yoon via Stack)
|
||||
HADOOP-2553 Don't make Long objects calculating hbase type hash codes
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -332,13 +332,13 @@ public class HLog implements HConstants {
|
|||
// equal to the oldest pending region operation
|
||||
TreeSet<Long> sequenceNumbers =
|
||||
new TreeSet<Long>(this.outputfiles.headMap(
|
||||
(oldestOutstandingSeqNum + Long.valueOf(1L))).keySet());
|
||||
(Long.valueOf(oldestOutstandingSeqNum.longValue() + 1L))).keySet());
|
||||
// Now remove old log files (if any)
|
||||
if (LOG.isDebugEnabled()) {
|
||||
// Find region associated with oldest key -- helps debugging.
|
||||
Text oldestRegion = null;
|
||||
for (Map.Entry<Text, Long> e: this.lastSeqWritten.entrySet()) {
|
||||
if (e.getValue().longValue() == oldestOutstandingSeqNum) {
|
||||
if (e.getValue().longValue() == oldestOutstandingSeqNum.longValue()) {
|
||||
oldestRegion = e.getKey();
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ public class HLogKey implements WritableComparable {
|
|||
public int hashCode() {
|
||||
int result = this.regionName.hashCode();
|
||||
result ^= this.row.hashCode();
|
||||
result ^= Long.valueOf(this.logSeqNum).hashCode();
|
||||
result ^= this.logSeqNum;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ public class HRegionInfo implements WritableComparable {
|
|||
|
||||
private void setHashCode() {
|
||||
int result = this.regionName.hashCode();
|
||||
result ^= Long.valueOf(this.regionId).hashCode();
|
||||
result ^= this.regionId;
|
||||
result ^= this.startKey.hashCode();
|
||||
result ^= this.endKey.hashCode();
|
||||
result ^= Boolean.valueOf(this.offLine).hashCode();
|
||||
|
|
|
@ -229,14 +229,12 @@ class HStore implements HConstants {
|
|||
// TODO: If get is of a particular version -- numVersions == 1 -- we
|
||||
// should be able to avoid all of the tailmap creations and iterations
|
||||
// below.
|
||||
HStoreKey curKey = new HStoreKey(key);
|
||||
SortedMap<HStoreKey, byte []> tailMap = map.tailMap(curKey);
|
||||
SortedMap<HStoreKey, byte []> tailMap = map.tailMap(key);
|
||||
for (Map.Entry<HStoreKey, byte []> es: tailMap.entrySet()) {
|
||||
HStoreKey itKey = es.getKey();
|
||||
if (itKey.matchesRowCol(curKey)) {
|
||||
if (itKey.matchesRowCol(key)) {
|
||||
if (!HLogEdit.isDeleted(es.getValue())) {
|
||||
result.add(tailMap.get(itKey));
|
||||
curKey.setVersion(itKey.getTimestamp() - 1);
|
||||
}
|
||||
}
|
||||
if (numVersions > 0 && result.size() >= numVersions) {
|
||||
|
|
|
@ -995,7 +995,7 @@ public class HStoreFile implements HConstants, WritableComparable {
|
|||
int result = this.dir.hashCode();
|
||||
result ^= this.encodedRegionName.hashCode();
|
||||
result ^= this.colFamily.hashCode();
|
||||
result ^= Long.valueOf(this.fileId).hashCode();
|
||||
result ^= this.fileId;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ public class HStoreKey implements WritableComparable {
|
|||
public int hashCode() {
|
||||
int result = this.row.hashCode();
|
||||
result ^= this.column.hashCode();
|
||||
result ^= Long.valueOf(this.timestamp).hashCode();
|
||||
result ^= this.timestamp;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -354,7 +354,7 @@ public class Leases {
|
|||
@Override
|
||||
public int hashCode() {
|
||||
int result = this.getLeaseName().hashCode();
|
||||
result ^= Long.valueOf(this.lastUpdate).hashCode();
|
||||
result ^= this.lastUpdate;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue