Skip to content

Commit

Permalink
[SPARK] Remove RDD check to avoid double evaluation
Browse files Browse the repository at this point in the history
relates #631
  • Loading branch information
costin committed Jan 8, 2016
1 parent a677e61 commit fc96529
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ object EsSpark {
def saveToEs(rdd: RDD[_], cfg: Map[String, String]) {
CompatUtils.warnSchemaRDD(rdd, LogFactory.getLog("org.elasticsearch.spark.rdd.EsSpark"))

if (rdd == null || rdd.partitions.length == 0 || rdd.take(1).length == 0) {
if (rdd == null || rdd.partitions.length == 0) {
return
}

Expand Down

0 comments on commit fc96529

Please sign in to comment.