Hive有两种表,即托管表和外部表,区别在于,您可以检查Managed. VS External Tables。
当前,要将外部数据库从HDFS
移到Alluxio
,我需要将外部表的位置修改为alluxio://
。
该语句类似于:alter table catalog_page set location "alluxio://node1:19998/user/root/tpcds/1000/catalog_returns"
根据我的理解,它应该是一个简单的metastore修改,但是,对于某些表修改,它将花费数十分钟。数据库本身包含大约1TB数据。
反正我有什么要加快表修改过程的速度吗?如果没有,为什么这么慢?任何评论都欢迎,谢谢。
答案 0 :(得分:3)
我在metatool
下找到了建议的方法$HIVE_HOME/bin
。
metatool -updateLocation <new-loc> <old-loc> Update FS root location in the
metastore to new location.Both
new-loc and old-loc should be
valid URIs with valid host names
and schemes.When run with the
dryRun option changes are
displayed but are not persisted.
When run with the
serdepropKey/tablePropKey option
updateLocation looks for the
serde-prop-key/table-prop-key
that is specified and updates
its value if found.
使用此工具,位置修改非常快。 (也许几秒钟。)
将此线程留给可能遇到相同情况的任何人使用。