title: TaskSchedulerImpl: Initial job has not accepted any resources;
body: <p>Here is what I am trying to do.</p>
  
  <p>I have created two nodes of DataStax enterprise cluster,on top of which I have created a java program to get the count of one table (Cassandra database table).</p>
  
  <p>This program was built in eclipse which is actually from a windows box. </p>
  
  <p>At the time of running this program from windows it's failing with the following error at runtime:</p>
  
  <blockquote>
    <p>Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient memory</p>
  </blockquote>
  
  <p>The same code has been compiled &amp; run successfully on those clusters without any issue. What could be the reason why am getting above error?</p>
  
  <p>Code:</p>
  
  <pre><code>import org.apache.spark.SparkConf;
  
  import org.apache.spark.SparkContext;
  
  import org.apache.spark.api.java.JavaSparkContext;
  import org.apache.spark.sql.SchemaRDD;
  import org.apache.spark.sql.cassandra.CassandraSQLContext;
  import com.datastax.bdp.spark.DseSparkConfHelper;
  
  public class SparkProject  {
  
      public static void main(String[] args) {
  
          SparkConf conf = DseSparkConfHelper.enrichSparkConf(new SparkConf()).setMaster("spark://10.63.24.14X:7077").setAppName("DatastaxTests").set("spark.cassandra.connection.host","10.63.24.14x").set("spark.executor.memory", "2048m").set("spark.driver.memory", "1024m").set("spark.local.ip","10.63.24.14X");
  
          JavaSparkContext sc = new JavaSparkContext(conf);
  
          CassandraSQLContext cassandraContext = new CassandraSQLContext(sc.sc());
          SchemaRDD employees = cassandraContext.sql("SELECT * FROM portware_ants.orders");
  
          //employees.registerTempTable("employees");
          //SchemaRDD managers = cassandraContext.sql("SELECT symbol FROM employees");
          System.out.println(employees.count());
  
          sc.stop();
      }
  }
  </code></pre>