Skip to content
This repository was archived by the owner on Nov 28, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.biodatageeks.rangejoins.optimizer

import jdk.nashorn.internal.ir.debug.ObjectSizeCalculator
import org.apache.spark.util.SizeEstimator
import org.apache.spark.SparkContext
import org.apache.spark.rdd.RDD
import org.apache.spark.util.SizeEstimator
Expand All @@ -20,7 +20,7 @@ class JoinOptimizer(sc: SparkContext, rdd: RDD[IntervalWithRow[Int]], rddCount :


private def estimateBroadcastSize(rdd: RDD[IntervalWithRow[Int]], rddCount: Long): Long = {
(ObjectSizeCalculator.getObjectSize(rdd.first()) * rddCount) /10
(SizeEstimator.estimate(rdd.first()) * rddCount) /10
//FIXME: Do not know why the size ~10x the actual size is- Spark row representation or getObject size in bits???
}

Expand Down