本文介绍Catalog相关问题。
报错:CREATE TABLE ... AS TABLE ... statement requires target catalog ... implements org.apache.flink.table.catalog.CatalogTableProvider interface.
报错详情
org.apache.flink.table.api.ValidationException: SQL validation failed. CREATE TABLE ... AS TABLE ... statement requires target catalog 'XXXXXX' (MongoDBCatalog) implements org.apache.flink.table.catalog.CatalogTableProvider interface. Hint: Please refer the document and use another catalog that supports schema evolution as the target catalog.
报错原因
可能是使用了CTAS不支持的上下游存储。例如,CTAS不支持MongoDB作为结果表写入。
解决方案
CTAS支持的上下游存储列表请参见使用限制,您可以从源表和结果表中各选一个进行组合。
MySQL Catalog执行查询很慢或查询提示服务器响应错误如何解决?
报错详情
MySQL Catalog创建成功但执行查询很慢或查询提示服务器响应错误,如图所示。
报错原因
云产品到MySQL的网络较卡,建立的连接经常断掉,导致了不稳定现象。
解决方案
以下三种优化方式供您选择:
判断云产品到MySQL走的公网带宽是否受限(例如有些配置是默认非常小的2 MB),以及是否存在跨Region访问,详情可参见如何查看公网带宽情况?。
如果您的网络确实不佳,您可以将MySQL实例相关的
interactive_timeout
和wait_timeout
参数取值适当调大。创建表时,您可以添加WITH参数
'connect.timeout'='120s'
。
报错:Cannot obtain STS token from EMR meta-service.
报错详情
Caused by: MetaException(message:Initialize DlfMetaStoreClient failed: Initialize DlfMetaStoreClient failed: Cannot obtain STS token from EMR meta-service. Note that AK-Mode[dlf.catalog.akMode] can only used in EMR clusters, otherwise you should config the dlf.catalog.accessKeyId and dlf.catalog.accessKeySecret explicitly.) at com.aliyun.datalake.metastore.hive2.ProxyMetaStoreClient.createClient(ProxyMetaStoreClient.java:91) at com.aliyun.datalake.metastore.hive2.ProxyMetaStoreClient.<init>(ProxyMetaStoreClient.java:71) ... 41 more
报错原因
配置文件有误导致Hive Catalog初始化异常。
解决方案
找到hive-conf-dir目录下的hive-site.xml文件,删除如下property信息。
<property> <name>dlf.catalog.akMode</name> <value>EMR_AUTO</value> </property>
配置AccessKeyId和AccessKeySecret。
<property> <name>dlf.catalog.accessKeyId</name> <value>${AccessKeyId}</value> </property> <property> <name>dlf.catalog.accessKeySecret</name> <value>${AccessKeySecret}</value> </property>
该文章对您有帮助吗?