spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andrewor14 <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-12895][SPARK-12896] Migrate TaskMetrics...
Date Tue, 26 Jan 2016 02:18:16 GMT
Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10835#discussion_r50788584
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/columnar/PartitionBatchPruningSuite.scala
---
    @@ -32,30 +39,41 @@ class PartitionBatchPruningSuite extends SparkFunSuite with SharedSQLContext
{
         super.beforeAll()
         // Make a table with 5 partitions, 2 batches per partition, 10 elements per batch
         sqlContext.setConf(SQLConf.COLUMN_BATCH_SIZE, 10)
    -
    -    val pruningData = sparkContext.makeRDD((1 to 100).map { key =>
    -      val string = if (((key - 1) / 10) % 2 == 0) null else key.toString
    -      TestData(key, string)
    -    }, 5).toDF()
    -    pruningData.registerTempTable("pruningData")
    -
         // Enable in-memory partition pruning
         sqlContext.setConf(SQLConf.IN_MEMORY_PARTITION_PRUNING, true)
         // Enable in-memory table scan accumulators
         sqlContext.setConf("spark.sql.inMemoryTableScanStatistics.enable", "true")
    -    sqlContext.cacheTable("pruningData")
       }
     
       override protected def afterAll(): Unit = {
         try {
           sqlContext.setConf(SQLConf.COLUMN_BATCH_SIZE, originalColumnBatchSize)
           sqlContext.setConf(SQLConf.IN_MEMORY_PARTITION_PRUNING, originalInMemoryPartitionPruning)
    -      sqlContext.uncacheTable("pruningData")
         } finally {
           super.afterAll()
         }
       }
     
    +  override protected def beforeEach(): Unit = {
    +    super.beforeEach()
    +    // This creates accumulators, which get cleaned up after every single test,
    --- End diff --
    
    no, just here


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message