Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-12953

RDDRelation write set mode will be better to avoid error "pair.parquet already exists"

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.0.0
    • Examples
    • None

    Description

      It will be error if not set Write Mode when execute test case `RDDRelation.main()`

      Exception in thread "main" org.apache.spark.sql.AnalysisException: path file:/Users/sjk/pair.parquet already exists.;
      at org.apache.spark.sql.execution.datasources.InsertIntoHadoopFsRelation.run(InsertIntoHadoopFsRelation.scala:76)
      at org.apache.spark.sql.execution.ExecutedCommand.sideEffectResult$lzycompute(commands.scala:58)
      at org.apache.spark.sql.execution.ExecutedCommand.sideEffectResult(commands.scala:56)
      at org.apache.spark.sql.execution.ExecutedCommand.doExecute(commands.scala:70)
      at org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$5.apply(SparkPlan.scala:132)
      at org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$5.apply(SparkPlan.scala:130)
      at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:150)
      at org.apache.spark.sql.execution.SparkPlan.execute(SparkPlan.scala:130)
      at org.apache.spark.sql.execution.QueryExecution.toRdd$lzycompute(QueryExecution.scala:55)
      at org.apache.spark.sql.execution.QueryExecution.toRdd(QueryExecution.scala:55)
      at org.apache.spark.sql.execution.datasources.ResolvedDataSource$.apply(ResolvedDataSource.scala:256)
      at org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala:148)
      at org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala:139)
      at org.apache.spark.sql.DataFrameWriter.parquet(DataFrameWriter.scala:329)
      at net.pusuo.gs.sql.RDDRelation$.main(RDDRelation.scala:65)
      at net.pusuo.gs.sql.RDDRelation.main(RDDRelation.scala)

      Attachments

        Activity

          People

            shijinkui shijinkui
            shijinkui shijinkui
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: