java.util.NoSuchElementException: key not found: people_cpy

DataStax JIRA | John Hoyland | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  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 | 2 years 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 | 2 years ago | John Hoyland
    java.util.NoSuchElementException: key not found: people_cpy
  3. 0

    Key not found for VectorIndexer models after serialization from Spark

    GitHub | 1 month ago | joyceqli
    java.util.NoSuchElementException: key not found: 645_keys
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Explanations for JOINs

    GitHub | 10 months ago | okennedy
    play.api.http.HttpErrorHandlerExceptions$$anon$1: Execution exception[[NoSuchElementException: key not found: ROWID_MIMIR]]
  6. 0

    a bug in bagOfWords

    GitHub | 3 years ago | breezer2020
    java.util.NoSuchElementException: key not found: of

  1. Handemelindo 4 times, last 7 days ago
  2. rp 1 times, last 1 month ago
  3. Mark 2 times, last 1 month ago
  4. jokester 1 times, last 3 months ago
  5. Nikolay Rybak 12 times, last 3 months ago
3 more registered users
6 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