[ https://issues.apache.org/jira/browse/HIVE-18038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16247550#comment-16247550 ]
BELUGA BEHR commented on HIVE-18038: ------------------------------------ [~pvary] Thanks!!! \\ \\ * {{IOUtils.closeStream(in)}} already has a null check in it, so no harm there, just reusing code. https://github.com/apache/hadoop/blob/bc206806dadc5dc85f182d98d859307cfb33172b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/IOUtils.java#L294 * I reverted the change for the "Reading log file" message. One of the things that I was attempting to address was there there is an edge-case with {{nLines}} being equal to 1. In this case, if the "Reading log file" message is included, {{nLines}} is decremented to 0 and then the following code will interpret the zero to mean "no cap": {code:java} // if nLines <= 0, read all lines in log file. for (int i = 0; i < nLines || nLines <= 0; i++) { {code} So, if {{isShortLogs}} is true and the user requests one row, should we only provide the "Reading log file" message or should we always provide this line, when requested, and then include {{nLines}} more lines to the results? > org.apache.hadoop.hive.ql.session.OperationLog - Review > ------------------------------------------------------- > > Key: HIVE-18038 > URL: https://issues.apache.org/jira/browse/HIVE-18038 > Project: Hive > Issue Type: Improvement > Components: HiveServer2 > Affects Versions: 3.0.0 > Reporter: BELUGA BEHR > Priority: Trivial > Attachments: HIVE-18038.1.patch, HIVE-18038.2.patch > > > Simplifications, improve readability -- This message was sent by Atlassian JIRA (v6.4.14#64029)