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 07397200D1B for ; Thu, 12 Oct 2017 21:41:20 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 05DFF1609E8; Thu, 12 Oct 2017 19:41:20 +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 25EEE1609E4 for ; Thu, 12 Oct 2017 21:41:18 +0200 (CEST) Received: (qmail 98375 invoked by uid 500); 12 Oct 2017 19:41:18 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 98364 invoked by uid 99); 12 Oct 2017 19:41:18 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Oct 2017 19:41:18 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 4B86AC6182 for ; Thu, 12 Oct 2017 19:41:17 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.362 X-Spam-Level: ** X-Spam-Status: No, score=2.362 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id UUgk09j6NMa9 for ; Thu, 12 Oct 2017 19:41:16 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 067FC60E0E for ; Thu, 12 Oct 2017 19:41:15 +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 v9CJfCXc029036; Thu, 12 Oct 2017 19:41:12 GMT Message-Id: <201710121941.v9CJfCXc029036@ip-10-146-233-104.ec2.internal> X-Gerrit-PatchSet: 4 Date: Thu, 12 Oct 2017 19:41:12 +0000 From: "Csaba Ringhofer (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Matthew Jacobs , Lars Volker , Philip Zeyliger X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-5736=3A_Add_impala-shell_argument_to_set_default_query_options=0A?= X-Gerrit-Change-Id: I26a3b67230c80a99bd246b6af205d558fec9a986 X-Gerrit-Change-Number: 8038 X-Gerrit-ChangeURL: X-Gerrit-Commit: d12eb26113580646f3cda357a8912c0f9f771588 In-Reply-To: References: X-Gerrit-Comment-Date: Thu, 12 Oct 2017 19:41:12 +0000 Reply-To: csringhofer@cloudera.com, impala-cr@cloudera.com, lv@cloudera.com, marcelk@gmail.com, philip@cloudera.com, reviews@impala.incubator.apache.org, mjacobs@apache.org MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.14.2 Content-Type: multipart/alternative; boundary="ALHVlz0w3N0="; charset=UTF-8 archived-at: Thu, 12 Oct 2017 19:41:20 -0000 --ALHVlz0w3N0= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Csaba Ringhofer has posted comments on this change=2E ( http://gerrit=2Eclo= udera=2Eorg:8080/8038 ) Change subject: IMPALA-5736: Add impala-shell argu= ment to set default query options =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 4: (10 comments) http://gerrit=2Ecloude= ra=2Eorg:8080/#/c/8038/4/shell/impala_shell=2Epy File shell/impala_shell=2E= py: http://gerrit=2Ecloudera=2Eorg:8080/#/c/8038/4/shell/impala_shell=2Epy= @686 PS4, Line 686: tmp_set =3D {} > Add a comment: Done http://gerri= t=2Ecloudera=2Eorg:8080/#/c/8038/4/shell/impala_shell=2Epy@1330 PS4, Line 1= 330: if __name__ =3D=3D "__main__": > Perhaps we need a big comment: Thanks= for the nice comment, I made some small changes=2E http://gerrit=2Ecloud= era=2Eorg:8080/#/c/8038/4/shell/impala_shell=2Epy@1350 PS4, Line 1350: # = default options loaded in from impala_shell_config_defaults=2Epy > Let's ta= ke the time to update this comment by disambiguating "shell options Done = http://gerrit=2Ecloudera=2Eorg:8080/#/c/8038/4/shell/impala_shell=2Epy@1354= PS4, Line 1354: impala_shell_defaults=2Eupdate(loaded_shell_options) >= I think "impala_query_options_default" is empty, but this assymetry > bet= ween impala_shell_defaults and query_options is weird=2E I think it is le= ss weird now with the long comment at the beginning=2E Query option default= s come from the server, so the script does not know them yet=2E > It's we= ird that you're updating impala_shell_defaults, rather than > updating "sh= ell_options"=2E I do not know why it was done this way originally=2E htt= p://gerrit=2Ecloudera=2Eorg:8080/#/c/8038/4/shell/impala_shell=2Epy@1437 PS= 4, Line 1437: query_options=2Eupdate( > Add comment: Done http://gerrit= =2Ecloudera=2Eorg:8080/#/c/8038/4/shell/option_parser=2Epy File shell/optio= n_parser=2Epy: http://gerrit=2Ecloudera=2Eorg:8080/#/c/8038/4/shell/option= _parser=2Epy@36 PS4, Line 36: def convert_loaded_shell_option(option, value= , default_options, config_filename): > Please document config_filename=2E I= 'm unclear how it's used=2E Done http://gerrit=2Ecloudera=2Eorg:8080/#/c/= 8038/4/shell/option_parser=2Epy@47 PS4, Line 47: # if the option is= not set to either true or false, use the default > Do we need to log about= the ignored value here? Done http://gerrit=2Ecloudera=2Eorg:8080/#/c/803= 8/4/shell/option_parser=2Epy@36 PS4, Line 36: def convert_loaded_shell_opti= on(option, value, default_options, config_filename): : """C= onverts some values based on their type in default_options : = """ : if default_options[option] in [True, False]: = : # validate the option if it can only be a boolean value = : # the only choice for these options is true or false = : if value=2Elower() =3D=3D "true": : return= True : elif value=2Elower() =3D=3D 'false': = : return False : else: : # if= the option is not set to either true or false, use the default = : return default_options[option] : elif value=2Elo= wer() =3D=3D "none": : return None : elif= option=2Elower() =3D=3D "config_file": : return config_f= ilename > This function is mixing 2-space indent and 4-space indent=2E Plea= se clean up=2E Done http://gerrit=2Ecloudera=2Eorg:8080/#/c/8038/4/shell/= option_parser=2Epy@164 PS4, Line 164: "Only speci= fy this as a option in the commandline=2E" > s/as a option/as an option/ Do= ne http://gerrit=2Ecloudera=2Eorg:8080/#/c/8038/4/shell/option_parser=2Ep= y@183 PS4, Line 183: help=3D"Sets default query options= =2E" > Add: "May be specified multiple times=2E" Unless it's clear from the= usage? Done -- To view, visit http://gerrit=2Ecloudera=2Eorg:8080/8038= To unsubscribe, visit http://gerrit=2Ecloudera=2Eorg:8080/settings Gerrit= -Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerr= it-Change-Id: I26a3b67230c80a99bd246b6af205d558fec9a986 Gerrit-Change-Numbe= r: 8038 Gerrit-PatchSet: 4 Gerrit-Owner: Csaba Ringhofer Gerrit-Reviewer: Csaba Ringhofer Ge= rrit-Reviewer: Lars Volker Gerrit-Reviewer: Matthew Jac= obs Gerrit-Reviewer: Philip Zeyliger Gerrit-Comment-Date: Thu, 12 Oct 2017 19:41:12 +0000 Gerrit-HasCom= ments: Yes --ALHVlz0w3N0=--