Hi, HBase connector 不用声明 update-mode 属性。 也不能声明。
Best, Jark On Wed, 17 Jun 2020 at 13:08, Zhou Zach <is...@foxmail.com> wrote: > The program finished with the following exception: > > > org.apache.flink.client.program.ProgramInvocationException: The main > method caused an error: Could not find a suitable table factory for > 'org.apache.flink.table.factories.TableSinkFactory' in > the classpath. > > > Reason: No factory supports all properties. > > > The matching candidates: > org.apache.flink.addons.hbase.HBaseTableFactory > Unsupported property keys: > update-mode > > > The following properties are requested: > connector.table-name=user_hbase10 > connector.type=hbase > connector.version=2.1.0 > connector.write.buffer-flush.interval=2s > connector.write.buffer-flush.max-rows=1000 > connector.write.buffer-flush.max-size=10mb > connector.zookeeper.quorum=cdh1:2181,cdh2:2181,cdh3:2181 > connector.zookeeper.znode.parent=/hbase > schema.0.data-type=VARCHAR(2147483647) > schema.0.name=rowkey > schema.1.data-type=ROW<`sex` VARCHAR(2147483647), `age` INT, > `created_time` TIMESTAMP(3)> > schema.1.name=cf > update-mode=upsert > > > The following factories have been considered: > org.apache.flink.addons.hbase.HBaseTableFactory > org.apache.flink.api.java.io.jdbc.JDBCTableSourceSinkFactory > org.apache.flink.streaming.connectors.kafka.KafkaTableSourceSinkFactory > org.apache.flink.table.sinks.CsvBatchTableSinkFactory > org.apache.flink.table.sinks.CsvAppendTableSinkFactory > at > org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:335) > at > org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:205) > at > org.apache.flink.client.ClientUtils.executeProgram(ClientUtils.java:138) > at > org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:664) > at > org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:213) > at > org.apache.flink.client.cli.CliFrontend.parseParameters(CliFrontend.java:895) > at > org.apache.flink.client.cli.CliFrontend.lambda$main$10(CliFrontend.java:968) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1875) > at > org.apache.flink.runtime.security.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:41) > at > org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:968) > Caused by: org.apache.flink.table.api.NoMatchingTableFactoryException: > Could not find a suitable table factory for > 'org.apache.flink.table.factories.TableSinkFactory' in > the classpath. > > > Reason: No factory supports all properties. > > > The matching candidates: > org.apache.flink.addons.hbase.HBaseTableFactory > Unsupported property keys: > update-mode > > > The following properties are requested: > connector.table-name=user_hbase10 > connector.type=hbase > connector.version=2.1.0 > connector.write.buffer-flush.interval=2s > connector.write.buffer-flush.max-rows=1000 > connector.write.buffer-flush.max-size=10mb > connector.zookeeper.quorum=cdh1:2181,cdh2:2181,cdh3:2181 > connector.zookeeper.znode.parent=/hbase > schema.0.data-type=VARCHAR(2147483647) > schema.0.name=rowkey > schema.1.data-type=ROW<`sex` VARCHAR(2147483647), `age` INT, > `created_time` TIMESTAMP(3)> > schema.1.name=cf > update-mode=upsert > > > The following factories have been considered: > org.apache.flink.addons.hbase.HBaseTableFactory > org.apache.flink.api.java.io.jdbc.JDBCTableSourceSinkFactory > org.apache.flink.streaming.connectors.kafka.KafkaTableSourceSinkFactory > org.apache.flink.table.sinks.CsvBatchTableSinkFactory > org.apache.flink.table.sinks.CsvAppendTableSinkFactory > at > org.apache.flink.table.factories.TableFactoryService.filterBySupportedProperties(TableFactoryService.java:434) > at > org.apache.flink.table.factories.TableFactoryService.filter(TableFactoryService.java:195) > at > org.apache.flink.table.factories.TableFactoryService.findSingleInternal(TableFactoryService.java:143) > at > org.apache.flink.table.factories.TableFactoryService.find(TableFactoryService.java:96) > at > org.apache.flink.table.planner.delegation.PlannerBase.getTableSink(PlannerBase.scala:310) > at > org.apache.flink.table.planner.delegation.PlannerBase.translateToRel(PlannerBase.scala:190) > at > org.apache.flink.table.planner.delegation.PlannerBase$$anonfun$1.apply(PlannerBase.scala:150) > at > org.apache.flink.table.planner.delegation.PlannerBase$$anonfun$1.apply(PlannerBase.scala:150) > at > scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) > at > scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) > at scala.collection.Iterator$class.foreach(Iterator.scala:891) > at scala.collection.AbstractIterator.foreach(Iterator.scala:1334) > at > scala.collection.IterableLike$class.foreach(IterableLike.scala:72) > at scala.collection.AbstractIterable.foreach(Iterable.scala:54) > at > scala.collection.TraversableLike$class.map(TraversableLike.scala:234) > at scala.collection.AbstractTraversable.map(Traversable.scala:104) > at > org.apache.flink.table.planner.delegation.PlannerBase.translate(PlannerBase.scala:150) > at > org.apache.flink.table.api.internal.TableEnvironmentImpl.translate(TableEnvironmentImpl.java:682) > at > org.apache.flink.table.api.internal.TableEnvironmentImpl.sqlUpdate(TableEnvironmentImpl.java:495) > at > cn.ibobei.qile.dataflow.sql.FromKafkaSinkHbase$.main(FromKafkaSinkHbase.scala:63) > at > cn.ibobei.qile.dataflow.sql.FromKafkaSinkHbase.main(FromKafkaSinkHbase.scala) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:321)