我创建了如下表格。
CREATE TABLE apachelog (
host STRING, identity STRING, user STRING, time STRING, request STRING, status STRING,
size STRING, referer STRING, agent STRING)
ROW FORMAT SERDE 'org.apache.hadoop.hive.contrib.serde2.RegexSerDe'
WITH SERDEPROPERTIES ( "input.regex" = "([^ ]*) ([^ ]*) ([^ ]*) (-
|\\[[^\\]]*\\]) ([^ \"]*|\"[^\"]*\") (-|[0-9]*) (-|[0-9]*)(?: ([^
\"]*|\"[^\"]*\") ([^ \"]*|\"[^\"]*\"))?", "output.format.string" =
"%1$s %2$s %3$s %4$s %5$s %6$s %7$s %8$s %9$s" )
STORED AS TEXTFILE
LOCATION 's3://dinendra80/H4P3';
我可以看到表格在那里并且有正确的行数。
hive> show tables;
OK
apachelog
Time taken: 14.376 seconds
我找到仓库位置。
hadoop@domU-12-31-39-02-5D-B7:~$ cat hive/conf/hive-default.xml | grep warehouse
<name>hive.metastore.warehouse.dir</name>
<value>/mnt/hive_081/warehouse</value>
<description>location of default database for the warehouse</description>
然后,当我这样做时,我收到一条错误消息。
hadoop fs -lsr /mnt/hive_081
lsr: Cannot access /mnt/hive_081: No such file or directory.
Same thing when I look for /mnt/hive_081/warehouse
我做错了什么?我从一开始就完成了所有设置 3 次,但仍然出现相同的错误。