无法启动Cloud SQL Metastore使用预览图像创建数据集群时

时间:2018-06-06 15:13:26

标签: apache-spark hive google-cloud-platform google-cloud-dataproc

我使用Spark对某些数据进行一些计算,然后推送到Hive。 Cloud Dataproc versions为1.2,其中包含Hive 2.1。 Hive中的Merge命令仅支持2.2版本以上版本。所以我必须使用数据中心集群的预览版本。当我将1.2版用于数据集群时,我可以毫无问题地创建集群。使用预览版时,我收到此错误“无法启动Cloud SQL Metastore ”。 初始化脚本为here。有没有人以前遇到过这个问题?

hive-metastore.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install is-enabled hive-metastore
mysql.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable mysql
insserv: warning: current start runlevel(s) (empty) of script `mysql` overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mysql' overrides LSB defaults (0 1 6).
Created symlink /etc/systemd/system/multi-user.target.wants/cloud-sql-proxy.service → /usr/lib/systemd/system/cloud-sql-proxy.service.
Cloud SQL Proxy installation succeeded
hive-metastore.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install is-enabled hive-metastore
[2018-06-06T12:43:55+0000]: Failed to bring up Cloud SQL Metastore

1 个答案:

答案 0 :(得分:1)

我认为问题可能是您的Metastore是从较旧版本的Dataproc初始化的,因此已经过时了架构。

如果您有故障群集(如果没有,请像以前一样创建一个新群集,您可以使用--single-node选项来降低成本),然后SSH到主节点并升级架构:

$ gcloud compute ssh my-cluster-m

$ /usr/lib/hive/bin/schematool -dbType mysql -info
Hive distribution version:       2.3.0
Metastore schema version:        2.1.0    <-- you will need this

org.apache.hadoop.hive.metastore.HiveMetaException: Metastore schema version is
not compatible. Hive Version: 2.3.0, Database Schema Version: 2.1.0
*** schemaTool failed ***

$ /usr/lib/hive/bin/schematool -dbType mysql -upgradeSchemaFrom 2.1.0

不幸的是,此群集无法返回到运行状态,因此请删除并重新创建它。

我创建此PR以使问题更容易被发现: https://github.com/GoogleCloudPlatform/dataproc-initialization-actions/pull/278