Where does the Hive data gets stored?

本秂侑毒 提交于 2020-12-05 20:15:46

问题


I am a little confused on where does the hive stores it's data.

Does it stores it's data in HDFS or in a RDBMS ?? Does Hive Meta store uses a RDBMS to store the hive tables metadata ??

Thanks in Advance !!


回答1:


Hive data are stored in one of Hadoop compatible filesystem: S3, HDFS or other compatible filesystem.

Hive metadata are stored in RDBMS like MySQL, see supported RDBMS.

The location of Hive tables data in S3 or HDFS can be specified for both managed and external tables.

The difference between managed and external tables is that DROP TABLE statement, in managed table, will drop the table and delete table's data. Whereas, for external table DROP TABLE will drop only the table and data will remain as is and can be used for creating other tables over it.

See details here: Create/Drop/Truncate Table




回答2:


Here is the answer to your question. But I will suggest you to read hive books or apache hive site for better understanding.

Does it stores it's data in HDFS or in a RDBMS ?? - The Data for HIVE is always stored in HDFS. For managed tables the data is stored in hive warehouse by default which is a directory in HDFS. For HIVE External table user can specify the location anywhere in HDFS.

Does Hive Meta store uses a RDBMS to store the hive tables metadata ?? - Yes HIVE uses RDBMS to store the metadata.



来源:https://stackoverflow.com/questions/43657319/where-does-the-hive-data-gets-stored

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!