[
https://issues.apache.org/jira/browse/HIVE-25087?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HIVE-25087:
----------------------------------
Labels: pull-request-available (was: )
> 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
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> 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)