You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "László Bodor (Jira)" <ji...@apache.org> on 2021/05/03 09:39:00 UTC

[jira] [Updated] (HIVE-25087) Introduce a reusable and configurable periodic/logarithmic logger with stopwatch

     [ https://issues.apache.org/jira/browse/HIVE-25087?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

László Bodor updated HIVE-25087:
--------------------------------
    Summary: Introduce a reusable and configurable periodic/logarithmic logger with stopwatch  (was: Introduce a reusable and configurable periodic/logarithmic logger)

> Introduce a reusable and configurable periodic/logarithmic logger with stopwatch
> --------------------------------------------------------------------------------
>
>                 Key: HIVE-25087
>                 URL: https://issues.apache.org/jira/browse/HIVE-25087
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: László Bodor
>            Assignee: László Bodor
>            Priority: Major
>
> This is for reusing the logic from [FileSinkOperator|https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java]:
> {code}
> if ((++numRows == cntr) && LOG.isInfoEnabled()) {
>  cntr = logEveryNRows == 0 ? cntr * 10 : numRows + logEveryNRows;
>  if (cntr < 0 || numRows < 0) {
>  cntr = 0;
>  numRows = 1;
>  }
>  LOG.info(toString() + ": records written - " + numRows);
> }
> {code}
> which results in:
> {code}
> 2021-04-29 10:29:38,199 [INFO] [TezChild] |exec.FileSinkOperator|: FS[8]: records written - 1
> 2021-04-29 10:29:38,201 [INFO] [TezChild] |exec.FileSinkOperator|: FS[8]: records written - 10
> 2021-04-29 10:29:38,216 [INFO] [TezChild] |exec.FileSinkOperator|: FS[8]: records written - 100
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)