具体操作及错误信息我贴到下面,各位大佬帮忙看下如何解决,不知道是不是BUG。
scala> import org.apache.flink.table.catalog.hive.HiveCatalog import org.apache.flink.table.catalog.hive.HiveCatalog
scala> val hiveCatalog = new HiveCatalog("hive", "mydatabase", "/opt/hive2.3.3/conf", "2.3.3"); hiveCatalog: org.apache.flink.table.catalog.hive.HiveCatalog = org.apache.flink.table.catalog.hive.HiveCatalog@193f3306
scala> btenv.registerCatalog("hive", hiveCatalog) Thu May 21 15:10:05 CST 2020 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification. Thu May 21 15:10:05 CST 2020 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
scala> btenv.useCatalog("hive")
scala> btenv.listTables res2: Array[String] = Array(mytable)
scala> btenv.sqlQuery("select * from mytable").toDataSet[Row].print() org.apache.flink.table.api.TableException: Only BatchTableSource and InputFormatTableSource are supported in BatchTableEnvironment. at org.apache.flink.table.plan.nodes.dataset.BatchTableSourceScan.translateToPlan(BatchTableSourceScan.scala:118) at org.apache.flink.table.api.internal.BatchTableEnvImpl.translate(BatchTableEnvImpl.scala:306) at org.apache.flink.table.api.internal.BatchTableEnvImpl.translate(BatchTableEnvImpl.scala:281) at org.apache.flink.table.api.scala.internal.BatchTableEnvironmentImpl.toDataSet(BatchTableEnvironmentImpl.scala:69) at org.apache.flink.table.api.scala.TableConversions.toDataSet(TableConversions.scala:53) ... 30 elided
来自志愿者整理的flink邮件归档来自志愿者整理的FLINK邮件归档
不好意思,现在版本hive connector已经不支持old planner了, 但是scala shell还是默认old planner。
来自志愿者整理的flink邮件归档来自志愿者整理的FLINK邮件归档
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。