title: Why does collecting dataset fail with org.apache.spark.shuffle.FetchFailedException?
body: <p>I use Spark with YARN cluster manager.</p>
  
  <p>I create a dataset from a Cassandra table with around 700 rows with 5 columns in that and one of the column with data in JSON format. The amount of data is in MB only.</p>
  
  <p>I run <code>spark-shell</code> with:</p>
  
  <ul>
  <li>spark.executor.memory=4g</li>
  <li>spark.driver.memory=2g</li>
  </ul>
  
  <p>I am getting this error:</p>
  
  <blockquote>
    <p>org.apache.spark.shuffle.FetchFailedException: Failed to connect to bosirahtaicas02.bscuat.local/172.17.0.1:53093 at org.apache.spark.storage.ShuffleBlockFetcherIterator.throwFetchFailedException(ShuffleBlockFetcherIterator.scala:323)</p>
  </blockquote>
  
  <p>while I am trying to collect data from my <code>dataFrame</code></p>
  
  <p>I run the following piece of code directly in spark-shell (line by line):</p>
  
  <pre><code>import org.apache.spark.sql._
  import org.apache.spark.sql.cassandra._
  
  import org.apache.spark.SparkConf
  import org.apache.spark.rdd.RDD
  import org.apache.spark.SparkContext
  
  import com.datastax.spark.connector.cql._
  import com.datastax.spark.connector._
  
  import org.json._
  import java.sql.Timestamp
  
  val sqc = new SQLContext(sc)
  val csc = new CassandraSQLContext(sc)
  
  val allRecordsDF = sqc.read.format("org.apache.spark.sql.cassandra").
      option("table", "xyz").
      option("keyspace", 'pqr").load().cache()
  
  val allRowsDF = allRecordsDF.select(allRecordsDF.col("record_type"), allRecordsDF.col("process_time"))
  
  val allPatientsTS = allRowsDF.where(allRowsDF("record_type") === "patient").select("process_time").sort("process_time")
  </code></pre>
  
  <p>Here when I am trying to collect <code>allPatientsTS</code> <code>Dataframe</code> it is showing error.</p>