天天看點

hive本地模式和遠端模式

1.内嵌模式,特點是:hive服務和metastore服務運作在同一個程序中,derby服務也運作在該程序中。

該模式無需特殊配置,參見老虎ppt即可。

2.本地模式,特點是:hive服務和metastore服務運作在同一個程序中,mysql是單獨的程序,可以在同一台機器上,也可以在遠端機器上。

該模式隻需将hive-site.xml中的ConnectionURL指向mysql,并配置好驅動名、資料庫連接配接賬号即可:

3.遠端模式,特點是:hive服務和metastore在不同的程序内,可能是不同的機器。

該模式需要将hive.metastore.local設定為false,并将hive.metastore.uris設定為metastore伺服器URI,如有多個metastore伺服器,URI之間用逗号分隔。metastore伺服器URI的格式為thrift://hostort

<property>
<name>hive.metastore.uris</name>
<value>thrift://127.0.0.1:9083</value>
</property>