From reviews-return-77023-archive-asf-public=cust-asf.ponee.io@impala.apache.org Tue Apr 7 20:31:53 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 23F28180663 for ; Tue, 7 Apr 2020 22:31:53 +0200 (CEST) Received: (qmail 69513 invoked by uid 500); 7 Apr 2020 20:31:52 -0000 Mailing-List: contact reviews-help@impala.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.apache.org Received: (qmail 69501 invoked by uid 99); 7 Apr 2020 20:31:52 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Apr 2020 20:31:52 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id A35A6182B8A for ; Tue, 7 Apr 2020 20:31:51 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.574 X-Spam-Level: X-Spam-Status: No, score=0.574 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=0.2, KAM_DMARC_STATUS=0.01, RDNS_DYNAMIC=0.363, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-ec2-va.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id Rc--JZAiLVWJ for ; Tue, 7 Apr 2020 20:31:50 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=75.101.130.251; helo=ip-10-146-233-104.ec2.internal; envelope-from=gerrit@cloudera.org; receiver= Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx1-ec2-va.apache.org (ASF Mail Server at mx1-ec2-va.apache.org) with ESMTPS id 106B9BB8ED for ; Tue, 7 Apr 2020 20:31:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id 037KVmXA011777; Tue, 7 Apr 2020 20:31:48 GMT Message-Id: <202004072031.037KVmXA011777@ip-10-146-233-104.ec2.internal> X-Gerrit-PatchSet: 6 Date: Tue, 7 Apr 2020 20:31:45 +0000 From: "David Knupp (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Impala Public Jenkins , Tim Armstrong , Abhishek Rawat , Sahil Takiar X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-3343=2C_IMPALA-9489=3A_Make_impala-shell_compatible_with_python_3=2E=0A?= X-Gerrit-Change-Id: Idb004d352fe230a890a6b6356496ba76c2fab615 X-Gerrit-Change-Number: 15524 X-Gerrit-ChangeURL: X-Gerrit-Commit: 9abd4c101dae2850f1e19c35a73c5da0ef007cb0 In-Reply-To: References: X-Gerrit-Comment-Date: Tue, 7 Apr 2020 20:31:45 +0000 Reply-To: dknupp@cloudera.com, impala-cr@cloudera.com, marcelk@gmail.com, tarmstrong@cloudera.com, impala-public-jenkins@cloudera.com, arawat@cloudera.com, stakiar@cloudera.com, reviews@impala.incubator.apache.org MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.14.15 Content-Type: multipart/alternative; boundary="uY0HrkHbQ/Y="; charset=UTF-8 --uY0HrkHbQ/Y= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable David Knupp has posted comments on this change=2E ( http://gerrit=2Eclouder= a=2Eorg:8080/15524 ) Change subject: IMPALA-3343, IMPALA-9489: Make impala= -shell compatible with python 3=2E =2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E= =2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E= =2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E= =2E=2E=2E=2E=2E=2E=2E Patch Set 6: (4 comments) http://gerrit=2Eclouder= a=2Eorg:8080/#/c/15524/6/bin/impala-shell=2Esh File bin/impala-shell=2Esh: = http://gerrit=2Ecloudera=2Eorg:8080/#/c/15524/6/bin/impala-shell=2Esh@27 P= S6, Line 27: USE_THRIFT11_GEN_PY > who sets this? the user? Presumably=2E I= just wanted to leave a safety valve for reverting to the previous version = of thrift in the dev environment, but to be honest, I'm wondering if it's e= ven necessary=2E http://gerrit=2Ecloudera=2Eorg:8080/#/c/15524/6/shell/pa= ckaging/requirements=2Etxt File shell/packaging/requirements=2Etxt: http:/= /gerrit=2Ecloudera=2Eorg:8080/#/c/15524/6/shell/packaging/requirements=2Etx= t@8 PS6, Line 8: thrift=3D=3D0=2E11=2E0 > a bit confused about the version = of Thrift being used=2E after this patch, wi This requirements file only pe= rtains to the pip-installable python package that a user might independentl= y install outside of a cluster -- e=2Eg=2E, on their laptop or whatever=2E = In this case, it's always thrift 0=2E11=2E0=2E Honestly, for the pip-instal= led shell, we could easily use a later version than 0=2E11=2E0, but I wante= d it to match the version that comes with CDH/CDP=2E http://gerrit=2Eclou= dera=2Eorg:8080/#/c/15524/6/shell/shell_output=2Epy File shell/shell_output= =2Epy: http://gerrit=2Ecloudera=2Eorg:8080/#/c/15524/6/shell/shell_output= =2Epy@101 PS6, Line 101: with open(self=2Efilename, 'ab') as out_fi= le: > this seems to change the logic so that it opens and closed the file d= uring When I had to update the string/unicode handling here, I took the op= portunity to refactor the class=2E I'm not wholly sure the result is behavi= ng any differently=2E Every time the impala-shell calls self=2Eoutput_strea= m=2Ewrite(), it seems to always be preceded by an instantiation of a new Ou= tputStream instance, so I think the object is used once and destroyed=2E It= doesn't look we ever cache the object long term=2E This may reflect that f= act that, presumably, one can change the name of the output_file in an alre= ady running shell session=2E Am I wrong about this though? http://gerrit= =2Ecloudera=2Eorg:8080/#/c/15524/6/tests/shell/test_shell_commandline=2Epy = File tests/shell/test_shell_commandline=2Epy: http://gerrit=2Ecloudera=2Eo= rg:8080/#/c/15524/6/tests/shell/test_shell_commandline=2Epy@472 PS6, Line 4= 72: # args =3D ['-q', "select '{0}'"=2Eformat(RUSSIAN_CHARS)] > delete?= Ack -- To view, visit http://gerrit=2Ecloudera=2Eorg:8080/15524 To uns= ubscribe, visit http://gerrit=2Ecloudera=2Eorg:8080/settings Gerrit-Projec= t: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Chan= ge-Id: Idb004d352fe230a890a6b6356496ba76c2fab615 Gerrit-Change-Number: 1552= 4 Gerrit-PatchSet: 6 Gerrit-Owner: David Knupp Gerr= it-Reviewer: Abhishek Rawat Gerrit-Reviewer: David = Knupp Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Sahil Takiar Gerrit-Reviewer: Tim Armstrong Ger= rit-Comment-Date: Tue, 07 Apr 2020 20:31:45 +0000 Gerrit-HasComments: Yes --uY0HrkHbQ/Y=--