Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
[SQL-DS-CACHE-47]Add plasma native get timeout (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
offthewall123 authored Mar 22, 2021
1 parent d98a0d7 commit 35be456
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ class ExternalCache(fiberType: FiberType) extends OapCache with Logging {
var fiberCache : FiberCache = null
logDebug(s"Cache hit, get from external cache.")
val plasmaClient = plasmaClientPool(clientRoundRobin.getAndAdd(1) % clientPoolSize)
val buf: ByteBuffer = plasmaClient.getObjAsByteBuffer(objectId, -1, false)
val buf: ByteBuffer = plasmaClient.getObjAsByteBuffer(objectId, 1000, false)
if(buf.asInstanceOf[DirectBuffer].address() == 0) {
logWarning("Get return an invalid value.")
fiberCache = cache(fiberId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
*/
package org.apache.spark.sql


import scala.collection.mutable
import org.apache.spark.SparkConf

import org.apache.spark.SparkConf

// TODO: use SQLConf style i.e. (value, defaultValue)
class BenchmarkConfig {
Expand Down Expand Up @@ -115,7 +114,7 @@ class BenchmarkConfig {

object BenchmarkConfig {
val INDEX_ENABLE = "oap.benchmark.config.index"
val FILE_FORMAT = "oap.benchmark.config.format"
val FILE_FORMAT = "oap.benchmark.config.format"
}

abstract class BenchmarkConfigSelector {
Expand Down Expand Up @@ -174,8 +173,9 @@ trait ParquetVsOrcConfigSet extends BenchmarkConfigSelector{
// TODO: choose conf
val _conf = new SparkConf()
def allConfigurations: Seq[BenchmarkConfig] =
if(_conf.get("spark.sql.oap.cache.memory.manager") == "offheap" ||
((!_conf.contains("spark.sql.oap.cache.memory.manager")) && _conf.get("spark.sql.oap.fiberCache.memory.manager")=="offheap")) {
if (_conf.get("spark.sql.oap.cache.memory.manager") == "offheap" ||
((!_conf.contains("spark.sql.oap.cache.memory.manager")) &&
_conf.get("spark.sql.oap.fiberCache.memory.manager")=="offheap")) {
Seq(
new BenchmarkConfig()
.setBenchmarkConfName("Orc w/ index")
Expand Down Expand Up @@ -245,7 +245,7 @@ trait ParquetVsOrcConfigSet extends BenchmarkConfigSelector{
.setSparkConf("spark.sql.oap.index.data.cache.separation.enabled", "true")
.setSparkConf("spark.oap.cache.strategy", "mix")
)
}else{
} else {
Seq(
new BenchmarkConfig()
.setBenchmarkConfName("Orc w/ index")
Expand Down

0 comments on commit 35be456

Please sign in to comment.