java.lang.Exception: Cassandra Writer Failed. java.lang.IllegalArgumentException: Unsupported type: org.apache.spark.mllib.linalg.VectorUDT@f71b0bce

Stack Overflow | Desanth pv | 10 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    How to save org.apache.spark.mllib.linalg.Vector in dataframe to cassandra

    Stack Overflow | 10 months ago | Desanth pv
    java.lang.Exception: Cassandra Writer Failed. java.lang.IllegalArgumentException: Unsupported type: org.apache.spark.mllib.linalg.VectorUDT@f71b0bce

    Root Cause Analysis

    1. java.lang.Exception

      Cassandra Writer Failed. java.lang.IllegalArgumentException: Unsupported type: org.apache.spark.mllib.linalg.VectorUDT@f71b0bce

      at com.datastax.spark.connector.types.ColumnType$.unsupportedType$1()
    2. spark-cassandra-connector
      DataFrameColumnMapper$$anonfun$1.apply
      1. com.datastax.spark.connector.types.ColumnType$.unsupportedType$1(ColumnType.scala:132)
      2. com.datastax.spark.connector.types.ColumnType$.fromSparkSqlType(ColumnType.scala:155)
      3. com.datastax.spark.connector.mapper.DataFrameColumnMapper$$anonfun$1.apply(DataFrameColumnMapper.scala:18)
      4. com.datastax.spark.connector.mapper.DataFrameColumnMapper$$anonfun$1.apply(DataFrameColumnMapper.scala:16)
      4 frames
    3. Scala
      AbstractTraversable.map
      1. scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
      2. scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
      3. scala.collection.immutable.List.foreach(List.scala:318)
      4. scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
      5. scala.collection.AbstractTraversable.map(Traversable.scala:105)
      5 frames
    4. spark-cassandra-connector
      TableDef$.fromDataFrame
      1. com.datastax.spark.connector.mapper.DataFrameColumnMapper.newTable(DataFrameColumnMapper.scala:16)
      2. com.datastax.spark.connector.cql.TableDef$.fromDataFrame(Schema.scala:206)
      2 frames