[
https://issues.apache.org/jira/browse/TUBEMQ-443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17246268#comment-17246268
]
ASF subversion and git services commented on TUBEMQ-443:
--------------------------------------------------------
Commit 0d3f9c91828ecc745f53154d78bb6e52381f6dc4 in incubator-tubemq's branch
refs/heads/master from leno1001
[ https://gitbox.apache.org/repos/asf?p=incubator-tubemq.git;h=0d3f9c9 ]
[TUBEMQ-443] TubemqSourceFunction class prints too many logs problem (#344)
Co-authored-by: 曹显乐 <[email protected]>
> TubemqSourceFunction class prints too many logs problem
> -------------------------------------------------------
>
> Key: TUBEMQ-443
> URL: https://issues.apache.org/jira/browse/TUBEMQ-443
> Project: Apache TubeMQ
> Issue Type: Bug
> Reporter: xianle cao
> Assignee: xianle cao
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> When using the TubemqSourceFunction class to register the source table to
> consume tubemq topic data, this class prints too many info type logs, and the
> container log takes up a lot of disk space.
> code:
> ```
> ConsumerResult consumeResult = messagePullConsumer.getMessage();
> if (!consumeResult.isSuccess()) {
> LOG.info("Could not consume messages from tubemq (errcode: {}, " +
> "errmsg: {}).", consumeResult.getErrCode(),
> consumeResult.getErrMsg());
> ...
> }
> possible improvements:
> ConsumerResult consumeResult = messagePullConsumer.getMessage();
> if (!consumeResult.isSuccess()) {
> if (!(consumeResult.getErrCode() == 400 || consumeResult.getErrCode() == 404
> ||
> consumeResult.getErrCode() == 405 || consumeResult.getErrCode() == 406 ||
> consumeResult.getErrCode() == 407 || consumeResult.getErrCode() == 408)) {
> LOG.info("Could not consume messages from tubemq (errcode: {}, " + "errmsg:
> {}).",
> consumeResult.getErrCode(), consumeResult.getErrMsg());
> }
> ...
> }
> ```
--
This message was sent by Atlassian Jira
(v8.3.4#803005)