You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tubemq.apache.org by "Guocheng Zhang (Jira)" <ji...@apache.org> on 2020/12/05 09:51:00 UTC
[jira] [Commented] (TUBEMQ-443) TubemqSourceFunction class prints
too many logs problem
[ https://issues.apache.org/jira/browse/TUBEMQ-443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17244451#comment-17244451 ]
Guocheng Zhang commented on TUBEMQ-443:
---------------------------------------
Hi [~leno] , I think the solution you mentioned is a perfect solution to this problem.
Do you have time to contribute this PR to the project?
> 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
> Priority: Major
>
> 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)