CCAH-CCA-500-3题:Table schemas in Hive are?
A. Stored as metadata on the NameNode
B. Stored along with the data in HDFS
C. Stored in the Metadata
D. Stored in ZooKeeper
问题:
Hive组件的table schemas在哪里存储着?
解析:
Hive分为元数据metadata和数据data,元数据一般存储在mysql中(默认在derby),数据存储在hdfs文件系统上.
元数据包括表的名字,表的列和分区及其属性,表的属性(是否为外部表等),表的数据所在目录等.
在安装过程,我们一般会初始化schema,在服务端执行一次“schematool -dbType mysql -initSchema”,以完成对metastore的初始化,所以 table schemas are stored in the metadata at the mysql database.