java.io.IOException: Failed to prepare statement INSERT INTO "cassandrasink"."transaction" ("event_id", "isin", "security_type", "security_name", "date", "time", "price", "currency", "user_id", "quantity", "amount", "session_id") VALUES (:"event_id", :"isin", :"security_type", :"security_name", :"date", :"time", :"price", :"currency", :"user_id", :"quantity", :"amount", :"session_id"): All host(s) tried for query failed (no host was tried) at com.datastax.spark.connector.writer.TableWriter.com <http://com.datastax.spark.connector.writer.tablewriter.com/>$ datastax$spark$connector$writer$TableWriter$$prepareStatement(TableWriter. scala:96)

spark-user | Antonio Giambanco | 2 years ago
  1. 0

    Re: Execption writing on two cassandra tables NoHostAvailableException: All host(s) tried for query failed (no host was tried)

    spark-user | 2 years ago | Antonio Giambanco
    java.io.IOException: Failed to prepare statement INSERT INTO "cassandrasink"."transaction" ("event_id", "isin", "security_type", "security_name", "date", "time", "price", "currency", "user_id", "quantity", "amount", "session_id") VALUES (:"event_id", :"isin", :"security_type", :"security_name", :"date", :"time", :"price", :"currency", :"user_id", :"quantity", :"amount", :"session_id"): All host(s) tried for query failed (no host was tried) at com.datastax.spark.connector.writer.TableWriter.com <http://com.datastax.spark.connector.writer.tablewriter.com/>$ datastax$spark$connector$writer$TableWriter$$prepareStatement(TableWriter. scala:96)
  2. 0

    Failed to write statements

    Stack Overflow | 2 years ago | Amine CHERIFI
    java.io.IOException: Failed to write statements to KeySpace.MyTable. at com.datastax.spark.connector.writer.TableWriter$$anonfun$write$1.apply(TableWriter.scala:145)
  3. 0

    java.io.IOException: Failed to write statements to keyspacename.tablename

    Stack Overflow | 1 year ago | user3376961
    java.io.IOException: Failed to write statements to keyspacename.tablename.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    SaveToCassandra error

    GitHub | 1 year ago | jadelaop
    java.io.IOException: Failed to write statements to keyspace.table.
  6. 0

    Spark Code works for 1000 document but as it is increased to 1200 or more it fails with None.get?

    Stack Overflow | 1 hour ago | Shivansh Srivastava
    java.io.IOException: Failed to write statements to elsevier.rnf.

    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.io.IOException

      Failed to prepare statement INSERT INTO "cassandrasink"."transaction" ("event_id", "isin", "security_type", "security_name", "date", "time", "price", "currency", "user_id", "quantity", "amount", "session_id") VALUES (:"event_id", :"isin", :"security_type", :"security_name", :"date", :"time", :"price", :"currency", :"user_id", :"quantity", :"amount", :"session_id"): All host(s) tried for query failed (no host was tried) at com.datastax.spark.connector.writer.TableWriter.com <http://com.datastax.spark.connector.writer.tablewriter.com/>$ datastax$spark$connector$writer$TableWriter$$prepareStatement(TableWriter. scala:96)

      at com.datastax.spark.connector.writer.TableWriter$$anonfun$write$1.apply()
    2. spark-cassandra-connector
      RDDFunctions$$anonfun$saveToCassandra$1.apply
      1. com.datastax.spark.connector.writer.TableWriter$$anonfun$write$1.apply(TableWriter.scala:122)
      2. com.datastax.spark.connector.writer.TableWriter$$anonfun$write$1.apply(TableWriter.scala:120)
      3. com.datastax.spark.connector.cql.CassandraConnector$$anonfun$withSessionDo$1.apply(CassandraConnector.scala:100)
      4. com.datastax.spark.connector.cql.CassandraConnector$$anonfun$withSessionDo$1.apply(CassandraConnector.scala:99)
      5. com.datastax.spark.connector.cql.CassandraConnector.closeResourceAfterUse(CassandraConnector.scala:151)
      6. com.datastax.spark.connector.cql.CassandraConnector.withSessionDo(CassandraConnector.scala:99)
      7. com.datastax.spark.connector.writer.TableWriter.write(TableWriter.scala:120)
      8. com.datastax.spark.connector.RDDFunctions$$anonfun$saveToCassandra$1.apply(RDDFunctions.scala:36)
      9. com.datastax.spark.connector.RDDFunctions$$anonfun$saveToCassandra$1.apply(RDDFunctions.scala:36)
      9 frames
    3. Spark
      Executor$TaskRunner.run
      1. org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:61)
      2. org.apache.spark.scheduler.Task.run(Task.scala:64)
      3. org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:203)
      3 frames
    4. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      3. java.lang.Thread.run(Thread.java:722)
      3 frames