Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CA1AC200C5D for ; Fri, 7 Apr 2017 11:38:49 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C8985160B97; Fri, 7 Apr 2017 09:38:49 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E894B160B93 for ; Fri, 7 Apr 2017 11:38:48 +0200 (CEST) Received: (qmail 4904 invoked by uid 500); 7 Apr 2017 09:38:47 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 4887 invoked by uid 99); 7 Apr 2017 09:38:47 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Apr 2017 09:38:47 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 49A0D1A0E16; Fri, 7 Apr 2017 09:38:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.2 X-Spam-Level: *** X-Spam-Status: No, score=3.2 tagged_above=-999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, KAM_MANYTO=0.2, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id gKQwElbY5yzl; Fri, 7 Apr 2017 09:38:45 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 0527E5F1E9; Fri, 7 Apr 2017 09:38:45 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 6C34BE00B4; Fri, 7 Apr 2017 09:38:44 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id 5BF84C40414; Fri, 7 Apr 2017 09:38:44 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============8568790856253624026==" MIME-Version: 1.0 Subject: Re: Review Request 57693: HIVE-16146 If possible find a better way to filter the TestBeeLineDriver outpu From: Peter Vary To: Yongzhi Chen , hive , Zoltan Haindrich , Barna Zsombor Klara , Marta Kuczora , Naveen Gangam , Miklos Csanady , Vihang Karajgaonkar , Peter Vary Date: Fri, 07 Apr 2017 09:38:44 -0000 Message-ID: <20170407093844.2052.62968@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Peter Vary X-ReviewGroup: hive X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/57693/ X-Sender: Peter Vary References: <20170407093738.2052.80570@reviews-vm2.apache.org> In-Reply-To: <20170407093738.2052.80570@reviews-vm2.apache.org> X-ReviewBoard-Diff-For: itests/util/src/main/java/org/apache/hive/beeline/QFile.java X-ReviewBoard-Diff-For: itests/util/src/main/java/org/apache/hive/beeline/qfile/QFileBeeLineClient.java X-ReviewBoard-Diff-For: itests/util/src/main/java/org/apache/hive/beeline/package-info.java X-ReviewBoard-Diff-For: itests/util/src/main/java/org/apache/hive/beeline/qfile/package-info.java X-ReviewBoard-Diff-For: itests/util/src/main/java/org/apache/hive/beeline/qfile/QFile.java X-ReviewBoard-Diff-For: ql/src/java/org/apache/hadoop/hive/ql/log/LogDivertAppenderForTest.java X-ReviewBoard-Diff-For: itests/util/src/main/java/org/apache/hive/beeline/QFileBeeLineClient.java X-ReviewBoard-Diff-For: ql/src/test/results/clientpositive/beeline/select_dummy_source.q.out Reply-To: Peter Vary X-ReviewRequest-Repository: hive-git archived-at: Fri, 07 Apr 2017 09:38:50 -0000 --===============8568790856253624026== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/57693/ ----------------------------------------------------------- (Updated April 7, 2017, 9:38 a.m.) Review request for hive, Zoltan Haindrich, Marta Kuczora, Miklos Csanady, Naveen Gangam, Vihang Karajgaonkar, Yongzhi Chen, and Barna Zsombor Klara. Bugs: HIVE-16146 https://issues.apache.org/jira/browse/HIVE-16146 Repository: hive-git Description ------- The goal was to generate '\0' markers around the raw log items we want to keep in the golden files. To archive this I had to do a small functional change and some small refactor: - Removed the immutability of the format map in BeeLine, so the test could add the QFile specific OutputFromat as a possible format - The PostExecutePrinter and the PreExecutePrinter got a common ancestor, which was due anyway because PostExecutePrinter reused static methods from PreExecutePrinter. This way I was able to create QFile specific printers which are generating the desired markers. - Moved the QFile test to the org.apache.hive.beeline package, so the test classes can use the package private classes and methods For one reason or other BeeLine added an extra space character at the end of the lines for multiline commands - I have removed this space - Will see if this effects any unit test or not. With the above mentioned *OutputFromat*, *QFilePreExecutePrinter*, *QFilePostExecutePrinter* we can mark the lines which are needed in the q.out file, and during the filtering we can remove the unneeded parts - I prefer to keep the log level high in the raw files, so in case of a test failure we can have better understanding of what has happened. In the test files: - Updated the beforeExecute, and afterExecute methods to set the new outputformat and the new hooks - Removed the query specific filters, since they are non exitstent in the CLI tests - Simplified the static filterset - currently only contains the filters which are really neccessary for the actual tests - might grow to the same size than in the QTestUtils - but if we do not want to run all of the test we would like to keep this list as small as possible - Removed unnecessary configurations from QFileBuilder which will be not needed in case we want to mimic the CLI results Diffs ----- beeline/src/java/org/apache/hive/beeline/BeeLine.java 11526a7 beeline/src/java/org/apache/hive/beeline/Commands.java 2578728 common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 7d4a6a0 itests/src/test/resources/testconfiguration.properties 7a70c9c itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CoreBeeLineDriver.java 0d63f5d itests/util/src/main/java/org/apache/hive/beeline/qfile/QFile.java ae5a349 itests/util/src/main/java/org/apache/hive/beeline/qfile/QFileBeeLineClient.java 760fde6 itests/util/src/main/java/org/apache/hive/beeline/qfile/package-info.java fcd50ec ql/src/java/org/apache/hadoop/hive/ql/exec/mr/ExecDriver.java a5c0fcd ql/src/java/org/apache/hadoop/hive/ql/log/LogDivertAppenderForTest.java PRE-CREATION ql/src/java/org/apache/hadoop/hive/ql/session/OperationLog.java c37a633 ql/src/test/results/clientpositive/beeline/drop_with_concurrency.q.out 385f9b7 ql/src/test/results/clientpositive/beeline/escape_comments.q.out abc0fee ql/src/test/results/clientpositive/beeline/select_dummy_source.q.out PRE-CREATION service/src/java/org/apache/hive/service/cli/operation/OperationManager.java f62ee4e service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java 418f453 Diff: https://reviews.apache.org/r/57693/diff/2/ Testing ------- Added a new simple query file from CLI driver, and checked that the generated output is the same Thanks, Peter Vary --===============8568790856253624026==--