apache shark 0.9.1无法连接到hdfs?

pcww981p  于 2021-06-03  发布在  Hadoop
关注(0)|答案(1)|浏览(393)

在《鲨鱼》里,当我奔跑时:

  1. CREATE EXTERNAL TABLE test (
  2. memberId STRING,
  3. category STRING,
  4. message STRING,
  5. source STRING,
  6. event_type STRING,
  7. log_level STRING,
  8. path STRING,
  9. host STRING,
  10. event_timestamp STRING,
  11. eventFields MAP<STRING,STRING>
  12. )
  13. PARTITIONED BY (datePart STRING)
  14. ROW FORMAT SERDE 'com.company.eventserde.EventSerde'
  15. LOCATION '/user/ubuntu/test';

我得到:

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

错误日志显示:

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

有人知道为什么shark不在hadoop中创建表吗?

7y4bm7vi

7y4bm7vi1#

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

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

相关问题