Skip to content

Commit

Permalink
fix conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
Davies Liu committed Feb 3, 2016
1 parent ddacfa6 commit 5eff34b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,9 @@ public void safeLookup(Object keyBase, long keyOffset, int keyLength, Location l
if (areEqual) {
return;
} else {
//if (enablePerfMetrics) {
if (enablePerfMetrics) {
numHashCollisions++;
//}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ case class TungstenAggregate(
UnsafeRow $buffer = null;
if ($checkFallback) {
// try to get the buffer from hash map
$buffer = $hashMapTerm.getAggregationBufferFromUnsafeRow($key);
$buffer = $hashMapTerm.getAggregationBufferFromUnsafeRow($key, ${hashEval.value});
}
if ($buffer == null) {
if ($sorterTerm == null) {
Expand All @@ -546,7 +546,7 @@ case class TungstenAggregate(
$resetCoulter
// the hash map had be spilled, it should have enough memory now,
// try to allocate buffer again.
$buffer = $hashMapTerm.getAggregationBufferFromUnsafeRow($key);
$buffer = $hashMapTerm.getAggregationBufferFromUnsafeRow($key, ${hashEval.value});
if ($buffer == null) {
// failed to allocate the first page
throw new OutOfMemoryError("No enough memory for aggregation");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,7 @@ class BenchmarkWholeStageCodegen extends SparkFunSuite {
key.setInt(0, i % 65536)
val loc = map.lookup(key.getBaseObject, key.getBaseOffset, key.getSizeInBytes, i % 65536)
if (loc.isDefined) {
value.pointTo(loc.getValueBase, loc.getValueOffset,
loc.getValueLength)
value.pointTo(loc.getValueBase, loc.getValueOffset, loc.getValueLength)
value.setInt(0, value.getInt(0) + 1)
i += 1
} else {
Expand All @@ -255,10 +254,10 @@ class BenchmarkWholeStageCodegen extends SparkFunSuite {
}

// These benchmark are skipped in normal build
ignore("benchmark") {
test("benchmark") {
// testWholeStage(200 << 20)
// testStatFunctions(20 << 20)
// testAggregateWithKey(20 << 20)
testAggregateWithKey(20 << 20)
// testBytesToBytesMap(50 << 20)
// testBroadcastHashJoin(10 << 20)
}
Expand Down

0 comments on commit 5eff34b

Please sign in to comment.