配置单元外部表未显示在namenode中(cloudera quickstartvm)

wlzqhblo  于 2021-05-30  发布在  Hadoop
关注(0)|答案(1)|浏览(307)

我已经在hdfs路径的配置单元中创建了外部表hdfs://localhost.localdomain:8020/用户/Hive/训练'。如果我应用descripe命令,我可以找到如下表路径。但是当我浏览namenode网页时,表名不会显示在路径中。

hive> describe extended testtable4;
OK
firstname   string  
lastname    string  
address string  
city    string  
state   string  
country string  

Detailed Table Information  Table(tableName:testtable4, dbName:default, owner:cloudera, createTime:1408765301, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:firstname, type:string, comment:null), FieldSchema(name:lastname, type:string, comment:null), FieldSchema(name:address, type:string, comment:null), FieldSchema(name:city, type:string, comment:null), FieldSchema(name:state, type:string, comment:null), FieldSchema(name:country, type:string, comment:null)], location:hdfs://localhost.localdomain:8020/user/hive/training, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=,, field.delim=,, line.delim=    
}), bucketCols:[], sortCols:[], parameters:{}, skewedInfo:SkewedInfo(skewedColNames:[], skewedColValues:[], skewedColValueLocationMaps:{}), storedAsSubDirectories:false), partitionKeys:[], parameters:{EXTERNAL=TRUE, transient_lastDdlTime=1408765301}, viewOriginalText:null, viewExpandedText:null, tableType:EXTERNAL_TABLE)       
Time taken: 0.7 seconds
zzwlnbp8

zzwlnbp81#

我为此道歉。我猜在创建内部配置单元表的情况下,我们可以在/user/hive/warehouse中的相应数据库中看到表名。
在创建外部表的情况下,需要将一个文件放在指定的hdfs位置,我们无法看到表名。
请从HiveWiki中找到以下一些定义
“用户可以创建一个指向hdfs中指定位置的外部表。在这种特殊用法中,用户可以使用hdfs put或copy命令将文件复制到指定位置,并创建一个包含所有相关行格式信息的指向此位置的表。”
我相信下面的链接可能正是你想要的信息。
配置单元内部表和外部表之间的区别?
https://cwiki.apache.org/confluence/display/hive/tutorial

相关问题