spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Franz Graf <i...@Locked.de>
Subject Unable to saveAsParquetFile to HDFS since Spark 1.3.0
Date Tue, 17 Mar 2015 16:24:09 GMT
Hi all,

today we tested Spark 1.3.0.
Everything went pretty fine except that I seem to be unable to save an
RDD as parquet to HDFS.

A minimum example is:

import sqlContext.implicits._
// Reading works fine!
val foo: RDD[String] = spark.textFile("hdfs://....")

// this works
foo.toDF().saveAsParquetFile("/tmp/sparktest") // save to local
foo.saveAsTextFile("/tmp/sparktest") // save to local
foo.saveAsTextFile("hdfs://server/tmp/sparktest") // But even this works!

// this doesn't work
foo.toDF().saveAsParquetFile("hdfs:// ....")

This throws the following exception. And after quite some googling I
am running out of ideas and would be happy about help.

Exception in thread "main" java.lang.IllegalArgumentException: Wrong
FS: hdfs://server/tmp/sparktest_fg, expected: file:///
        at org.apache.hadoop.fs.FileSystem.checkPath(FileSystem.java:590)
        at org.apache.hadoop.fs.FileSystem.makeQualified(FileSystem.java:410)
        at org.apache.hadoop.fs.FilterFileSystem.makeQualified(FilterFileSystem.java:108)
        at org.apache.spark.sql.parquet.ParquetRelation2$MetadataCache$$anonfun$6.apply(newParquet.scala:252)
        at org.apache.spark.sql.parquet.ParquetRelation2$MetadataCache$$anonfun$6.apply(newParquet.scala:251)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
        at scala.collection.immutable.List.foreach(List.scala:318)
        at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
        at scala.collection.AbstractTraversable.map(Traversable.scala:105)
        at org.apache.spark.sql.parquet.ParquetRelation2$MetadataCache.refresh(newParquet.scala:251)
        at org.apache.spark.sql.parquet.ParquetRelation2.<init>(newParquet.scala:370)
        at org.apache.spark.sql.parquet.DefaultSource.createRelation(newParquet.scala:96)
        at org.apache.spark.sql.parquet.DefaultSource.createRelation(newParquet.scala:125)
        at org.apache.spark.sql.sources.ResolvedDataSource$.apply(ddl.scala:308)
        at org.apache.spark.sql.DataFrame.save(DataFrame.scala:1123)
        at org.apache.spark.sql.DataFrame.saveAsParquetFile(DataFrame.scala:922)
        at Pi2Parquet$delayedInit$body.apply(Pi2Parquet.scala:45)
        at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
        at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
        at scala.App$$anonfun$main$1.apply(App.scala:71)
        at scala.App$$anonfun$main$1.apply(App.scala:71)
        at scala.collection.immutable.List.foreach(List.scala:318)
        at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32)
        at scala.App$class.main(App.scala:71)
        at Pi2Parquet$.main(Pi2Parquet.scala:12)
        at Pi2Parquet.main(Pi2Parquet.scala)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:569)
        at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:166)
        at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:189)
        at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:110)
        at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)

Thanks a lot
Franz

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Mime
View raw message