[
https://issues.apache.org/jira/browse/TUBEMQ-441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17243661#comment-17243661
]
Guocheng Zhang commented on TUBEMQ-441:
---------------------------------------
The reason for this problem is that the Tubemq class is shared in the source
and sink, but the required parameters required by the source and sink are
inconsistent, the Tubemq.toConnectorProperties() does not check whether the
corresponding required parameters are met according to different ways of use.
The problem is solved by adding the consumerRole attribute (the default true,
consumer role) and the role setting API asConsumer (boolean isConsumer) in the
Tubemq class
> An error occurred when using the Tubemq class to create a sink table
> --------------------------------------------------------------------
>
> Key: TUBEMQ-441
> URL: https://issues.apache.org/jira/browse/TUBEMQ-441
> Project: Apache TubeMQ
> Issue Type: Bug
> Reporter: xianle cao
> Assignee: Guocheng Zhang
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> model:
> tubemq-connector-flink
> code:
> Tubemq tubemq = new
> Tubemq().master(masterAddress).topic(topic).property("some key", "some
> value");
> ConnectTableDescriptor ctd =
> tabEnv.connect(tubemq).inAppendMode().withFormat(format).withSchema(schema);
> TableSink tableSink = TableFactoryService.find(TableSinkFactory.class,
> ctd.toProperties()).createTableSink(ctd.toProperties());
> error message:
> Caused by: org.apache.flink.table.api.ValidationException: Could not find
> required property 'connector.group'. at
> org.apache.flink.table.descriptors.DescriptorProperties.validateOptional(DescriptorProperties.java:1353)
> at
> org.apache.flink.table.descriptors.DescriptorProperties.validateString(DescriptorProperties.java:780)
> at
> org.apache.flink.connectors.tubemq.TubemqValidator.validate(TubemqValidator.java:73)
> at
> org.apache.flink.connectors.tubemq.TubemqTableSourceSinkFactory.validateProperties(TubemqTableSourceSinkFactory.java:222)
> at
> org.apache.flink.connectors.tubemq.TubemqTableSourceSinkFactory.createStreamTableSink(TubemqTableSourceSinkFactory.java:185)
> cause analysis:
> due to parameter verification.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)