hive创建外部表时,使用location关键字时,系统没有报错,show tables 时,能够显示已经创建成功表。但是,在hdfs目录中没有形成表目录。drop table时,也没有提示投入回收站这一项。经验证,发现除location关键字外,其他关键字均能正确创建表,并显示在hdfs目录中。朋友们又碰到过这种情况吗。以下是使用location关键字建表语言:
create table zhans(
id int,
name string,
age int,
fav array<string>,
addr map<string,string>)
row format delimited fields terminated by '\t'
collection items terminated by '-'
map keys terminated by ':'
stored as textfile
location 'hdfs://192.168.25.100:8020/root'