hive view 2.0 执行sql时错误解决方式

638次浏览 0人关注 复制链接 所属标签: hive hview 错误

# 错误1:

Caused by: javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.2.v20151217-774c696): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'ambari.ds_jobimpl_11' doesn't exist
Error Code: 1146
Call: INSERT INTO DS_JOBIMPL_11 (DS_id, DS_applicationId, DS_confFile, DS_dagId, DS_dagName, DS_dataBase, DS_dateSubmitted, DS_duration, DS_forcedContent, DS_globalSettings, DS_guid, DS_hiveQueryId, DS_logFile, DS_owner, DS_queryFile, DS_queryId, DS_referrer, DS_sessionTag, DS_sqlState, DS_status, DS_statusDir, DS_statusMessage, DS_title) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
    bind => [23 parameters bound]
    at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:159)
    at org.apache.ambari.server.view.persistence.DataStoreImpl.store(DataStoreImpl.java:142)
    ... 104 more

解决方式:

-- 登录mysql,执行下面语句
CREATE TABLE DS_JOBIMPL_11 (
    ds_id VARCHAR(255) NOT NULL,
    ds_applicationid TEXT,
    ds_conffile TEXT,
    ds_dagid TEXT,
    ds_dagname TEXT,
    ds_database TEXT,
    ds_datesubmitted BIGINT,
    ds_duration BIGINT,
    ds_forcedcontent TEXT,
    ds_globalsettings TEXT,
    DS_guid TEXT,
    DS_hiveQueryId TEXT,
    ds_logfile TEXT,
    ds_owner TEXT,
    ds_queryfile TEXT,
    ds_queryid TEXT,
    ds_referrer TEXT,
    ds_sessiontag TEXT,
    ds_sqlstate TEXT,
    ds_status TEXT,
    ds_statusdir TEXT,
    ds_statusmessage TEXT,
    ds_title TEXT,
    PRIMARY KEY (ds_id)
);

# 错误2:

org.apache.ambari.view.utils.hdfs.HdfsApiException: HDFS020 Could not write file /user/admin/hive/jobs/hive-job-18-2019-03-07_09-52/query.hql

org.apache.ambari.view.utils.hdfs.HdfsApiException: HDFS020 Could not write file /user/admin/hive/jobs/hive-job-18-2019-03-07_09-52/query.hql
    at org.apache.ambari.view.utils.hdfs.HdfsUtil.putStringToFile(HdfsUtil.java:50)
    at org.apache.ambari.view.hive20.resources.jobs.viewJobs.JobControllerImpl.setup

解决方法:

[root@ark1 ~]# su - hdfs
[hdfs@ark1 ~]$ hadoop fs -mkdir /user/admin
[hdfs@ark1 ~]$ hadoop fs -chown admin:hadoop /user/admin
[hdfs@ark1 ~]$ exit
2条回答
zhaoy07331 1年前

超级厉害

有用0 评论0
高俊 1年前

有用0 评论0