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 03AF6200D3C for ; Tue, 14 Nov 2017 16:34:12 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 0249D160BF4; Tue, 14 Nov 2017 15:34:12 +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 511E41609EF for ; Tue, 14 Nov 2017 16:34:11 +0100 (CET) Received: (qmail 10796 invoked by uid 500); 14 Nov 2017 15:34:10 -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 10785 invoked by uid 99); 14 Nov 2017 15:34:10 -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; Tue, 14 Nov 2017 15:34:10 +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 4A23B1A0181 for ; Tue, 14 Nov 2017 15:34:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.363 X-Spam-Level: ** X-Spam-Status: No, score=2.363 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, RDNS_DYNAMIC=0.363, SPF_PASS=-0.001, URIBL_BLOCKED=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 usK2FWCy2VEl for ; Tue, 14 Nov 2017 15:34:07 +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-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 80DEA5FDB9 for ; Tue, 14 Nov 2017 15:34:07 +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 vAEFY5Nm029769; Tue, 14 Nov 2017 15:34:05 GMT Message-Id: <201711141534.vAEFY5Nm029769@ip-10-146-233-104.ec2.internal> X-Gerrit-PatchSet: 4 Date: Tue, 14 Nov 2017 15:34:03 +0000 From: "Zoltan Borok-Nagy (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Tim Armstrong , Philip Zeyliger X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-2235=3A_Fix_current_db_when_shell_auto-reconnects=0A?= X-Gerrit-Change-Id: I40dfa00ba0314d356fe8617446f516505c925e5e X-Gerrit-Change-Number: 8368 X-Gerrit-ChangeURL: X-Gerrit-Commit: 3e8105605f958ce54c1bb431407d1dfe67b10943 In-Reply-To: References: X-Gerrit-Comment-Date: Tue, 14 Nov 2017 15:34:03 +0000 Reply-To: boroknagyz@cloudera.com, impala-cr@cloudera.com, marcelk@gmail.com, tarmstrong@cloudera.com, philip@cloudera.com, reviews@impala.incubator.apache.org MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.14.2 Content-Type: multipart/alternative; boundary="XY3zrMt8vZY="; charset=UTF-8 archived-at: Tue, 14 Nov 2017 15:34:12 -0000 --XY3zrMt8vZY= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Zoltan Borok-Nagy has posted comments on this change=2E ( http://gerrit=2Ec= loudera=2Eorg:8080/8368 ) Change subject: IMPALA-2235: Fix current db when= shell auto-reconnects =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: (3 comments) Thanks for the review=2E In additi= on I also added a time=2Esleep(1) to the test case test_auto_reconnect beca= use I noticed that it wasn't stable=2E This sleep gives time for the Impala= Shell to successfully start and connect to the Impala daemon before we rest= art the cluster=2E http://gerrit=2Ecloudera=2Eorg:8080/#/c/8368/3//COMMIT_= MSG Commit Message: http://gerrit=2Ecloudera=2Eorg:8080/#/c/8368/3//COMMIT= _MSG@9 PS3, Line 9: The ImpalaShell didn't issue the 'USE ' com= mand after > This sentence didn't parse for me=2E Specifically, I'm not sur= e what "that" i I rephrased the beginning of the commit=2E I hope it is eas= ier to understand now=2E http://gerrit=2Ecloudera=2Eorg:8080/#/c/8368/3/t= ests/custom_cluster/test_shell_interactive_reconnect=2Epy File tests/custom= _cluster/test_shell_interactive_reconnect=2Epy: http://gerrit=2Ecloudera= =2Eorg:8080/#/c/8368/3/tests/custom_cluster/test_shell_interactive_reconnec= t=2Epy@36 PS3, Line 36: : cls=2Etempfile_name =3D tempfile= =2Emktemp() : move_shell_history(cls=2Etempfile_n > Minor: = I think this is just: I only used NamedTemporaryFile because mktemp is mark= ed as deprecated: https://docs=2Epython=2Eorg/2/library/tempfile=2Ehtml#tem= pfile=2Emktemp tempfile=2Emkstemp() could have also been used, but it also= creates a file, and returns an open file descriptor for that=2E Anyway, s= ince it is in a test case, I don't see that mktemp() would cause a vulnerab= ility issue, so now I use it for brevity and better readability=2E Done=2E = http://gerrit=2Ecloudera=2Eorg:8080/#/c/8368/3/tests/shell/util=2Epy File= tests/shell/util=2Epy: http://gerrit=2Ecloudera=2Eorg:8080/#/c/8368/3/tes= ts/shell/util=2Epy@121 PS3, Line 121: def restore_shell_history(filepath): = > mention that this is a no-op if filepath doesn't exist=2E Done=2E -- = To view, visit http://gerrit=2Ecloudera=2Eorg:8080/8368 To unsubscribe, vis= it http://gerrit=2Ecloudera=2Eorg:8080/settings Gerrit-Project: Impala-ASF= Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I40dfa= 00ba0314d356fe8617446f516505c925e5e Gerrit-Change-Number: 8368 Gerrit-Patch= Set: 4 Gerrit-Owner: Zoltan Borok-Nagy Gerrit-R= eviewer: Philip Zeyliger Gerrit-Reviewer: Tim Armst= rong Gerrit-Reviewer: Zoltan Borok-Nagy Gerrit-Comment-Date: Tue, 14 Nov 2017 15:34:03 +0000 G= errit-HasComments: Yes --XY3zrMt8vZY=--