I created a Spark SQL table by calling .saveAsTable on my dataframe. That command succeeded completely. However, now when I query the table, the parquet files seem corrupt. I'm seeing this error:
"Failed with exception java.io.IOException:java.io.IOException: hdfs://ip:8020/user/hive/warehouse/people/part-r-00001.parquet not a SequenceFile"
below steps I have followed in spark-shell
scala >val sqlContext = new org.apache.spark.sql.hive.HiveContext(sc)
scala>val path="test.json"
scala>val people = sqlContext.jsonFile(path)
scala> people.saveAsTable("people")
after that I have opened hive command prompt
hive> select * from people;
OK Failed with exception java.io.IOException:java.io.IOException: hdfs://IP:8020/user/hive/warehouse/people/part-r-00001.parquet not a SequenceFile Time taken: 0.276 seconds
How can I get my hive table(people) result.
Please let me know anything, nay change configuration wise.
How can I resolve above exception.
Thanks in advance.