Skip to content

Commit

Permalink
Fix RMM crash in FileCacheIntegrationSuite with ARENA memory allocator
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Lowe <[email protected]>
  • Loading branch information
jlowe committed Sep 27, 2023
1 parent 8e84c8e commit 857cd67
Showing 1 changed file with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,22 @@

package org.apache.spark.sql.rapids.filecache

import com.nvidia.spark.rapids.{RapidsBufferCatalog, RapidsDeviceMemoryStore, SparkQueryCompareTestSuite}
import com.nvidia.spark.rapids.SparkQueryCompareTestSuite
import com.nvidia.spark.rapids.shims.GpuBatchScanExec
import org.scalatest.BeforeAndAfterEach

import org.apache.spark.SparkConf
import org.apache.spark.sql.execution.SparkPlan
import org.apache.spark.sql.execution.metric.SQLMetric
import org.apache.spark.sql.rapids.GpuFileSourceScanExec

class FileCacheIntegrationSuite extends SparkQueryCompareTestSuite with BeforeAndAfterEach {
class FileCacheIntegrationSuite extends SparkQueryCompareTestSuite {
import com.nvidia.spark.rapids.GpuMetric._

private val FILE_SPLITS_PARQUET = "file-splits.parquet"
private val FILE_SPLITS_ORC = "file-splits.orc"
private val MAP_OF_STRINGS_PARQUET = "map_of_strings.snappy.parquet"
private val SCHEMA_CANT_PRUNE_ORC = "schema-cant-prune.orc"

override def beforeEach(): Unit = {
val deviceStorage = new RapidsDeviceMemoryStore()
val catalog = new RapidsBufferCatalog(deviceStorage)
RapidsBufferCatalog.setDeviceStorage(deviceStorage)
RapidsBufferCatalog.setCatalog(catalog)
}

override def afterEach(): Unit = {
RapidsBufferCatalog.close()
}

def isFileCacheEnabled(conf: SparkConf): Boolean = {
// File cache only supported on Spark 3.2+
assumeSpark320orLater
Expand Down

0 comments on commit 857cd67

Please sign in to comment.