Quantcast
Channel: Hortonworks » All Replies
Viewing all articles
Browse latest Browse all 3435

Storing data in hive in ORC format through Spark RDD

$
0
0

As per my requirement I want to store files that are in hdfs to hive tables in ORC format. I am using Spark 1.2.1 with Hive 0.14.0 version.

I have followed below documentation http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.0/bk_spark-quickstart/content/ch_orc-spark-quickstart.html

All the things went fine.. I can’t see any exception in spark shell..

I have created one ORC table in hive as below..

hiveContext.sql(“create table person_orc_table (name STRING, age INT) stored as orc”)

storing into orc table also went fine..

scala> peopleSchemaRDD.saveAsOrcFile(“person_orc_table”)

But when I fire query in hive context to show records, I am not able to see any records..

hive> select * from person_orc_table;
OK
Time taken: 0.097 seconds
hive>
I am expecting data/records in hive table. but it is not there, what am I missing here ?


Viewing all articles
Browse latest Browse all 3435

Trending Articles