gpt4 book ai didi

hadoop - Apache Shark 0.9.1 无法连接到 HDFS?

转载 作者:可可西里 更新时间:2023-11-01 15:37:14 25 4
gpt4 key购买 nike

在 Shark 中,当我运行时:

CREATE EXTERNAL TABLE test (
memberId STRING,
category STRING,
message STRING,
source STRING,
event_type STRING,
log_level STRING,
path STRING,
host STRING,
event_timestamp STRING,
eventFields MAP<STRING,STRING>
)
PARTITIONED BY (datePart STRING)
ROW FORMAT SERDE 'com.company.eventserde.EventSerde'
LOCATION '/user/ubuntu/test';

我得到:

[Hive Error]: Query returned non-zero code: 1, cause: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
Time taken (including network latency): 0.05 seconds

错误日志显示:

35.526: [Full GC 112196K->28191K(1013632K), 0.1913800 secs]
FAILED: Error in metadata: MetaException(message:file:/user/ubuntu/events is not a directory or unable to create one)
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
FAILED: Error in metadata: MetaException(message:file:/user/ubuntu/test is not a directory or unable to create one)
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

有谁知道为什么 Shark 不在 Hadoop 中创建表?

最佳答案

尝试为位置指定完整的 hdfs URI,如下所示:

LOCATION 'hdfs://<NAMENODE-IP>:<NAMENODE-IPC-PORT>/user/ubuntu/test'; 

关于hadoop - Apache Shark 0.9.1 无法连接到 HDFS?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23225631/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com