簡體   English   中英

無法在HIVE中創建表

[英]unable able to create table in HIVE

當我嘗試使用以下命令在HIVE中創建表時,

CREATE TABLE IF NOT EXISTS employee ( eid int, name String,
salary String, destination String)
COMMENT 'Employee details'
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\t'
LINES TERMINATED BY '\n'
STORED AS TEXTFILE;

我得到以下錯誤。

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:For direct MetaStore DB connections, we don't support retries at the client level.)

我對HDFS中的/ user / hive / warehouse目錄具有完全權限。

感謝您的回復。

我找到了解決方案。 我正在使用HIVE 2.1.0。

使用SCHEMA TOOL初始化架構的強制性

命令:$ HIVE_HOME / bin / schematool -dbType mysql -initSchema

注意:在我的情況下-dbType是mysql,因為我將mysql用作rdbms。

請參考以下鏈接: https : //cwiki.apache.org/confluence/display/Hive/Hive+Schema+Tool

我已經通過運行上述命令在mysql中刪除了metastore數據庫並創建了metastore模式。

現在,我可以在配置單元中創建表。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM