java.util.NoSuchElementException: key not found: people_cpy

DataStax JIRA | John Hoyland | 1 year ago
  1. 0

    If you create a dataframe, then try to save it to Cassandra, but the table does not already exist in Cassandra, an exception is raised: {code} scala> df.save( "org.apache.spark.sql.cassandra", SaveMode.Ignore, options = Map( "c_table" -> "people_cpy", "keyspace" -> "dataframe") ) df.save( | "org.apache.spark.sql.cassandra", | SaveMode.Ignore, | options = Map( "c_table" -> "people_cpy", "keyspace" -> "dataframe") | ) java.util.NoSuchElementException: key not found: people_cpy at scala.collection.MapLike$class.default(MapLike.scala:228) at scala.collection.AbstractMap.default(Map.scala:58) at scala.collection.MapLike$class.apply(MapLike.scala:141) at scala.collection.AbstractMap.apply(Map.scala:58) at org.apache.spark.sql.cassandra.CassandraSourceRelation.<init>(CassandraSourceRelation.scala:40) at org.apache.spark.sql.cassandra.CassandraSourceRelation$.apply(CassandraSourceRelation.scala:168) at org.apache.spark.sql.cassandra.DefaultSource.createRelation(DefaultSource.scala:84) at org.apache.spark.sql.sources.ResolvedDataSource$.apply(ddl.scala:240) at org.apache.spark.sql.DataFrame.save(DataFrame.scala:1196) {code} Version of connector is: {code} $ ls spark-cassandra-connector* dse/resources/spark/lib/spark-cassandra-connector_2.10-1.3.0-M1.jar dse/resources/spark/lib/spark-cassandra-connector-java_2.10-1.3.0-M1.jar {code} I have verified with [~pkolaczk] that this is a bug. There is no exception if the table exists. I think the table should be created if it does not already exist for all values of SaveMode.

    DataStax JIRA | 1 year ago | John Hoyland
    java.util.NoSuchElementException: key not found: people_cpy
  2. 0

    If you create a dataframe, then try to save it to Cassandra, but the table does not already exist in Cassandra, an exception is raised: {code} scala> df.save( "org.apache.spark.sql.cassandra", SaveMode.Ignore, options = Map( "c_table" -> "people_cpy", "keyspace" -> "dataframe") ) df.save( | "org.apache.spark.sql.cassandra", | SaveMode.Ignore, | options = Map( "c_table" -> "people_cpy", "keyspace" -> "dataframe") | ) java.util.NoSuchElementException: key not found: people_cpy at scala.collection.MapLike$class.default(MapLike.scala:228) at scala.collection.AbstractMap.default(Map.scala:58) at scala.collection.MapLike$class.apply(MapLike.scala:141) at scala.collection.AbstractMap.apply(Map.scala:58) at org.apache.spark.sql.cassandra.CassandraSourceRelation.<init>(CassandraSourceRelation.scala:40) at org.apache.spark.sql.cassandra.CassandraSourceRelation$.apply(CassandraSourceRelation.scala:168) at org.apache.spark.sql.cassandra.DefaultSource.createRelation(DefaultSource.scala:84) at org.apache.spark.sql.sources.ResolvedDataSource$.apply(ddl.scala:240) at org.apache.spark.sql.DataFrame.save(DataFrame.scala:1196) {code} Version of connector is: {code} $ ls spark-cassandra-connector* dse/resources/spark/lib/spark-cassandra-connector_2.10-1.3.0-M1.jar dse/resources/spark/lib/spark-cassandra-connector-java_2.10-1.3.0-M1.jar {code} I have verified with [~pkolaczk] that this is a bug. There is no exception if the table exists. I think the table should be created if it does not already exist for all values of SaveMode.

    DataStax JIRA | 1 year ago | John Hoyland
    java.util.NoSuchElementException: key not found: people_cpy
  3. 0

    a bug in bagOfWords

    GitHub | 2 years ago | breezer2020
    java.util.NoSuchElementException: key not found: of
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    can: HostConnector dies when going from Idle => Unconnected

    GitHub | 3 years ago | jrudolph
    java.util.NoSuchElementException: key not found: Actor[akka://default/user/IO-HTTP/host-connector-0/1#1484964495]
  6. 0

    java.util.NoSuchElementException during ClusterSharding recovery

    GitHub | 2 years ago | cowboy129
    java.util.NoSuchElementException: key not found: Actor[akka.tcp://ClusterSystem@xxx/user/sharding/ConnectionActives#5543584 72]

  1. poroszd 1 times, last 2 months ago
  2. Mark 1 times, last 3 months ago
  3. rp 3 times, last 3 months ago
  4. poroszd 1 times, last 5 months ago
  5. silex 1 times, last 6 months ago
1 more registered users
5 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.util.NoSuchElementException

    key not found: people_cpy

    at scala.collection.MapLike$class.default()
  2. Scala
    AbstractMap.apply
    1. scala.collection.MapLike$class.default(MapLike.scala:228)
    2. scala.collection.AbstractMap.default(Map.scala:58)
    3. scala.collection.MapLike$class.apply(MapLike.scala:141)
    4. scala.collection.AbstractMap.apply(Map.scala:58)
    4 frames
  3. spark-cassandra-connector
    DefaultSource.createRelation
    1. org.apache.spark.sql.cassandra.CassandraSourceRelation.<init>(CassandraSourceRelation.scala:40)
    2. org.apache.spark.sql.cassandra.CassandraSourceRelation$.apply(CassandraSourceRelation.scala:168)
    3. org.apache.spark.sql.cassandra.DefaultSource.createRelation(DefaultSource.scala:84)
    3 frames
  4. Spark Project SQL
    DataFrame.save
    1. org.apache.spark.sql.sources.ResolvedDataSource$.apply(ddl.scala:240)
    2. org.apache.spark.sql.DataFrame.save(DataFrame.scala:1196)
    2 frames