Skip to content

Commit

Permalink
when enabled oap mllib, spark.dynamicAllocation.enabled should be set…
Browse files Browse the repository at this point in the history
… false (#201)

Signed-off-by: minmingzhu <minming.zhu@intel.com>
  • Loading branch information
minmingzhu authored Apr 1, 2022
1 parent 401891e commit 0f2f4bc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mllib-dal/src/main/scala/com/intel/oap/mllib/Utils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ object Utils {

def isOAPEnabled(): Boolean = {
val sc = SparkSession.active.sparkContext
return sc.getConf.getBoolean("spark.oap.mllib.enabled", true)
val isDynamicAllication = sc.getConf.getBoolean("spark.dynamicAllocation.enabled", false)
val isOap = sc.getConf.getBoolean("spark.oap.mllib.enabled", true)
if (isOap && isDynamicAllication) {
throw new Exception(
s"OAP MLlib does not support dynamic allocation, " +
s"spark.dynamicAllocation.enabled should be set to false")
}
isOap
}

def getOneCCLIPPort(data: RDD[_]): String = {
Expand Down

0 comments on commit 0f2f4bc

Please sign in to comment.