[Impala-ASF-CR] IMPALA-6805: Show current database in Impala shell prompt

2018-04-10 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/9927 )

Change subject: IMPALA-6805: Show current database in Impala shell prompt
..

IMPALA-6805: Show current database in Impala shell prompt

Prompt format:
[host:port] db_name>

Testing:
- Added new shell tests
- Ran end-to-end shell tests

Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
Reviewed-on: http://gerrit.cloudera.org:8080/9927
Reviewed-by: Fredy Wijaya 
Reviewed-by: Michael Brown 
Tested-by: Impala Public Jenkins 
---
M shell/impala_shell.py
M tests/shell/test_shell_interactive.py
2 files changed, 50 insertions(+), 7 deletions(-)

Approvals:
  Fredy Wijaya: Looks good to me, but someone else must approve
  Michael Brown: Looks good to me, approved
  Impala Public Jenkins: Verified

--
To view, visit http://gerrit.cloudera.org:8080/9927
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
Gerrit-Change-Number: 9927
Gerrit-PatchSet: 9
Gerrit-Owner: Fredy Wijaya 
Gerrit-Reviewer: David Knupp 
Gerrit-Reviewer: Fredy Wijaya 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Michael Brown 
Gerrit-Reviewer: Taras Bobrovytsky 


[Impala-ASF-CR] IMPALA-6805: Show current database in Impala shell prompt

2018-04-10 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9927 )

Change subject: IMPALA-6805: Show current database in Impala shell prompt
..


Patch Set 8: Verified+1


--
To view, visit http://gerrit.cloudera.org:8080/9927
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
Gerrit-Change-Number: 9927
Gerrit-PatchSet: 8
Gerrit-Owner: Fredy Wijaya 
Gerrit-Reviewer: David Knupp 
Gerrit-Reviewer: Fredy Wijaya 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Michael Brown 
Gerrit-Reviewer: Taras Bobrovytsky 
Gerrit-Comment-Date: Tue, 10 Apr 2018 20:52:47 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-6805: Show current database in Impala shell prompt

2018-04-10 Thread Michael Brown (Code Review)
Michael Brown has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9927 )

Change subject: IMPALA-6805: Show current database in Impala shell prompt
..


Patch Set 8: Code-Review+2


--
To view, visit http://gerrit.cloudera.org:8080/9927
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
Gerrit-Change-Number: 9927
Gerrit-PatchSet: 8
Gerrit-Owner: Fredy Wijaya 
Gerrit-Reviewer: David Knupp 
Gerrit-Reviewer: Fredy Wijaya 
Gerrit-Reviewer: Michael Brown 
Gerrit-Reviewer: Taras Bobrovytsky 
Gerrit-Comment-Date: Tue, 10 Apr 2018 17:07:08 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-6805: Show current database in Impala shell prompt

2018-04-10 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9927 )

Change subject: IMPALA-6805: Show current database in Impala shell prompt
..


Patch Set 8:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/2273/


--
To view, visit http://gerrit.cloudera.org:8080/9927
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
Gerrit-Change-Number: 9927
Gerrit-PatchSet: 8
Gerrit-Owner: Fredy Wijaya 
Gerrit-Reviewer: David Knupp 
Gerrit-Reviewer: Fredy Wijaya 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Michael Brown 
Gerrit-Reviewer: Taras Bobrovytsky 
Gerrit-Comment-Date: Tue, 10 Apr 2018 17:07:35 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-6805: Show current database in Impala shell prompt

2018-04-09 Thread Fredy Wijaya (Code Review)
Fredy Wijaya has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9927 )

Change subject: IMPALA-6805: Show current database in Impala shell prompt
..


Patch Set 8: Code-Review+1

(1 comment)

Carry +1

http://gerrit.cloudera.org:8080/#/c/9927/6/tests/shell/test_shell_interactive.py
File tests/shell/test_shell_interactive.py:

http://gerrit.cloudera.org:8080/#/c/9927/6/tests/shell/test_shell_interactive.py@520
PS6, Line 520: proc.expect(":21000] functional>")
> Can you add some more test cases? This might be too exhaustive in some case
- For items 1-2, I added new tests.
- For item 3, there's already an existing test for it: 
https://github.com/apache/impala/blob/master/tests/shell/test_shell_interactive.py#L144.
- For item 4, I don't really know how to simulate this unless we kill the 
coordinator. Although I'm fairly certain the behavior is the same as item 3.
- For item 5, I added another assert in the existing test_reconnect() test.
- For item 5, I also don't quite know how to test this.



--
To view, visit http://gerrit.cloudera.org:8080/9927
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
Gerrit-Change-Number: 9927
Gerrit-PatchSet: 8
Gerrit-Owner: Fredy Wijaya 
Gerrit-Reviewer: David Knupp 
Gerrit-Reviewer: Fredy Wijaya 
Gerrit-Reviewer: Michael Brown 
Gerrit-Reviewer: Taras Bobrovytsky 
Gerrit-Comment-Date: Tue, 10 Apr 2018 03:02:57 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6805: Show current database in Impala shell prompt

2018-04-09 Thread Fredy Wijaya (Code Review)
Fredy Wijaya has uploaded a new patch set (#8). ( 
http://gerrit.cloudera.org:8080/9927 )

Change subject: IMPALA-6805: Show current database in Impala shell prompt
..

IMPALA-6805: Show current database in Impala shell prompt

Prompt format:
[host:port] db_name>

Testing:
- Added new shell tests
- Ran end-to-end shell tests

Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
---
M shell/impala_shell.py
M tests/shell/test_shell_interactive.py
2 files changed, 50 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/27/9927/8
--
To view, visit http://gerrit.cloudera.org:8080/9927
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
Gerrit-Change-Number: 9927
Gerrit-PatchSet: 8
Gerrit-Owner: Fredy Wijaya 
Gerrit-Reviewer: David Knupp 
Gerrit-Reviewer: Fredy Wijaya 
Gerrit-Reviewer: Michael Brown 
Gerrit-Reviewer: Taras Bobrovytsky 


[Impala-ASF-CR] IMPALA-6805: Show current database in Impala shell prompt

2018-04-09 Thread Michael Brown (Code Review)
Michael Brown has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9927 )

Change subject: IMPALA-6805: Show current database in Impala shell prompt
..


Patch Set 6:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/9927/6/tests/shell/test_shell_interactive.py
File tests/shell/test_shell_interactive.py:

http://gerrit.cloudera.org:8080/#/c/9927/6/tests/shell/test_shell_interactive.py@520
PS6, Line 520:
Can you add some more test cases? This might be too exhaustive in some cases, 
so feel free to do a little pushback, but I'm thinking as a user here:

1. Using backticks, which you've coded for but not tested.

2. Including whitespace both without and with backticks, e.g., "use `  tpch 
`;"

3. When using impala-shell -i invalid_host, what is the database printed? Does 
this make sense from a user's perspective?

4. When the shell becomes disconnected, what is the database printed? Does this 
make sense from a user's perspective?

5. When issuing "connect" to connect to a different coordinator, what is the 
database printed?

6. When doing 5 above, if you do this on a coordinator that doesn't have the 
database known to the first coordinator, what is the database printed?



--
To view, visit http://gerrit.cloudera.org:8080/9927
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
Gerrit-Change-Number: 9927
Gerrit-PatchSet: 6
Gerrit-Owner: Fredy Wijaya 
Gerrit-Reviewer: David Knupp 
Gerrit-Reviewer: Fredy Wijaya 
Gerrit-Reviewer: Michael Brown 
Gerrit-Reviewer: Taras Bobrovytsky 
Gerrit-Comment-Date: Tue, 10 Apr 2018 01:18:06 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6805: Show current database in Impala shell prompt

2018-04-05 Thread Taras Bobrovytsky (Code Review)
Taras Bobrovytsky has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9927 )

Change subject: IMPALA-6805: Show current database in Impala shell prompt
..


Patch Set 6: Code-Review+1

Looks good to me. David, do you want to give the final +2?


--
To view, visit http://gerrit.cloudera.org:8080/9927
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
Gerrit-Change-Number: 9927
Gerrit-PatchSet: 6
Gerrit-Owner: Fredy Wijaya 
Gerrit-Reviewer: David Knupp 
Gerrit-Reviewer: Fredy Wijaya 
Gerrit-Reviewer: Taras Bobrovytsky 
Gerrit-Comment-Date: Fri, 06 Apr 2018 05:17:26 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-6805: Show current database in Impala shell prompt

2018-04-05 Thread Fredy Wijaya (Code Review)
Fredy Wijaya has uploaded a new patch set (#6). ( 
http://gerrit.cloudera.org:8080/9927 )

Change subject: IMPALA-6805: Show current database in Impala shell prompt
..

IMPALA-6805: Show current database in Impala shell prompt

Prompt format:
[host:port] db_name>

Testing:
- Added new shell tests
- Ran end-to-end shell tests

Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
---
M shell/impala_shell.py
M tests/shell/test_shell_interactive.py
2 files changed, 39 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/27/9927/6
--
To view, visit http://gerrit.cloudera.org:8080/9927
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
Gerrit-Change-Number: 9927
Gerrit-PatchSet: 6
Gerrit-Owner: Fredy Wijaya 
Gerrit-Reviewer: David Knupp 
Gerrit-Reviewer: Fredy Wijaya 
Gerrit-Reviewer: Taras Bobrovytsky 


[Impala-ASF-CR] IMPALA-6805: Show current database in Impala shell prompt

2018-04-05 Thread Taras Bobrovytsky (Code Review)
Taras Bobrovytsky has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9927 )

Change subject: IMPALA-6805: Show current database in Impala shell prompt
..


Patch Set 5:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/9927/5/shell/impala_shell.py
File shell/impala_shell.py:

http://gerrit.cloudera.org:8080/#/c/9927/5/shell/impala_shell.py@1150
PS5, Line 1150: # args == current_db means -d option was passed but the 
"use [db]" operation failed.
This comments needs to be updated. Move this comment under elif.



--
To view, visit http://gerrit.cloudera.org:8080/9927
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
Gerrit-Change-Number: 9927
Gerrit-PatchSet: 5
Gerrit-Owner: Fredy Wijaya 
Gerrit-Reviewer: David Knupp 
Gerrit-Reviewer: Fredy Wijaya 
Gerrit-Reviewer: Taras Bobrovytsky 
Gerrit-Comment-Date: Fri, 06 Apr 2018 00:21:19 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6805: Show current database in Impala shell prompt

2018-04-04 Thread Fredy Wijaya (Code Review)
Fredy Wijaya has uploaded a new patch set (#5). ( 
http://gerrit.cloudera.org:8080/9927 )

Change subject: IMPALA-6805: Show current database in Impala shell prompt
..

IMPALA-6805: Show current database in Impala shell prompt

Prompt format:
[host:port] db_name>

Testing:
- Added new shell tests
- Ran end-to-end shell tests

Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
---
M shell/impala_shell.py
M tests/shell/test_shell_interactive.py
2 files changed, 39 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/27/9927/5
--
To view, visit http://gerrit.cloudera.org:8080/9927
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
Gerrit-Change-Number: 9927
Gerrit-PatchSet: 5
Gerrit-Owner: Fredy Wijaya 
Gerrit-Reviewer: David Knupp 
Gerrit-Reviewer: Fredy Wijaya 
Gerrit-Reviewer: Taras Bobrovytsky 


[Impala-ASF-CR] IMPALA-6805: Show current database in Impala shell prompt

2018-04-04 Thread Taras Bobrovytsky (Code Review)
Taras Bobrovytsky has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9927 )

Change subject: IMPALA-6805: Show current database in Impala shell prompt
..


Patch Set 4:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/9927/4/shell/impala_shell.py
File shell/impala_shell.py:

http://gerrit.cloudera.org:8080/#/c/9927/4/shell/impala_shell.py@781
PS4, Line 781: db=self.current_db if self.current_db else 
ImpalaShell.DEFAULT_DB)
At this point we don't know if current_db exists or not. I think we should 
always set db to ImpalaShell.DEFAULT_DB here. It will get updated later.


http://gerrit.cloudera.org:8080/#/c/9927/4/shell/impala_shell.py@1148
PS4, Line 1148: args
Why not args.strip() here?


http://gerrit.cloudera.org:8080/#/c/9927/4/shell/impala_shell.py@1156
PS4, Line 1156:   if args.strip('`') == self.current_db:
Make this an "elif".

Also, prompt does not need to be updated because of my first comment. It's a 
good idea to set self.current_db = None here.



--
To view, visit http://gerrit.cloudera.org:8080/9927
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
Gerrit-Change-Number: 9927
Gerrit-PatchSet: 4
Gerrit-Owner: Fredy Wijaya 
Gerrit-Reviewer: David Knupp 
Gerrit-Reviewer: Fredy Wijaya 
Gerrit-Reviewer: Taras Bobrovytsky 
Gerrit-Comment-Date: Thu, 05 Apr 2018 01:33:49 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6805: Show current database in Impala shell prompt

2018-04-04 Thread Fredy Wijaya (Code Review)
Fredy Wijaya has uploaded a new patch set (#4). ( 
http://gerrit.cloudera.org:8080/9927 )

Change subject: IMPALA-6805: Show current database in Impala shell prompt
..

IMPALA-6805: Show current database in Impala shell prompt

Prompt format:
[host:port] db_name>

Testing:
- Added new shell tests
- Ran end-to-end shell tests

Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
---
M shell/impala_shell.py
M tests/shell/test_shell_interactive.py
2 files changed, 41 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/27/9927/4
--
To view, visit http://gerrit.cloudera.org:8080/9927
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
Gerrit-Change-Number: 9927
Gerrit-PatchSet: 4
Gerrit-Owner: Fredy Wijaya 
Gerrit-Reviewer: David Knupp 
Gerrit-Reviewer: Fredy Wijaya 
Gerrit-Reviewer: Taras Bobrovytsky 


[Impala-ASF-CR] IMPALA-6805: Show current database in Impala shell prompt

2018-04-04 Thread Taras Bobrovytsky (Code Review)
Taras Bobrovytsky has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9927 )

Change subject: IMPALA-6805: Show current database in Impala shell prompt
..


Patch Set 3:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/9927/3/shell/impala_shell.py
File shell/impala_shell.py:

http://gerrit.cloudera.org:8080/#/c/9927/3/shell/impala_shell.py@1151
PS3, Line 1151: strip('`')
why do we strip() here, but not on line 781?


http://gerrit.cloudera.org:8080/#/c/9927/3/shell/impala_shell.py@1153
PS3, Line 1153:   # args == current_db means -d option was passed but the 
database does not exist.
It's confusing to me why args == current_db means that the db does not exist. 
Can you explain this a little better? What are the contents of args and 
current_db?



--
To view, visit http://gerrit.cloudera.org:8080/9927
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
Gerrit-Change-Number: 9927
Gerrit-PatchSet: 3
Gerrit-Owner: Fredy Wijaya 
Gerrit-Reviewer: David Knupp 
Gerrit-Reviewer: Fredy Wijaya 
Gerrit-Reviewer: Taras Bobrovytsky 
Gerrit-Comment-Date: Wed, 04 Apr 2018 23:43:57 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6805: Show current database in Impala shell prompt

2018-04-04 Thread Fredy Wijaya (Code Review)
Fredy Wijaya has uploaded a new patch set (#3). ( 
http://gerrit.cloudera.org:8080/9927 )

Change subject: IMPALA-6805: Show current database in Impala shell prompt
..

IMPALA-6805: Show current database in Impala shell prompt

Prompt format:
[host:port] db_name>

Testing:
- Added new shell tests
- Ran end-to-end shell tests

Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
---
M shell/impala_shell.py
M tests/shell/test_shell_interactive.py
2 files changed, 40 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/27/9927/3
--
To view, visit http://gerrit.cloudera.org:8080/9927
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
Gerrit-Change-Number: 9927
Gerrit-PatchSet: 3
Gerrit-Owner: Fredy Wijaya 
Gerrit-Reviewer: David Knupp 
Gerrit-Reviewer: Fredy Wijaya 
Gerrit-Reviewer: Taras Bobrovytsky 


[Impala-ASF-CR] IMPALA-6805: Show current database in Impala shell prompt

2018-04-04 Thread David Knupp (Code Review)
David Knupp has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9927 )

Change subject: IMPALA-6805: Show current database in Impala shell prompt
..


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/9927/2/shell/impala_shell.py
File shell/impala_shell.py:

http://gerrit.cloudera.org:8080/#/c/9927/2/shell/impala_shell.py@1147
PS2, Line 1147: [%s:%s] %s>
> Since this is used several times, this template should be a constant declar
Good suggestion. Note L108:

  DISCONNECTED_PROMPT = "[Not connected] > "



--
To view, visit http://gerrit.cloudera.org:8080/9927
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
Gerrit-Change-Number: 9927
Gerrit-PatchSet: 2
Gerrit-Owner: Fredy Wijaya 
Gerrit-Reviewer: David Knupp 
Gerrit-Reviewer: Fredy Wijaya 
Gerrit-Reviewer: Taras Bobrovytsky 
Gerrit-Comment-Date: Wed, 04 Apr 2018 22:09:04 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6805: Show current database in Impala shell prompt

2018-04-04 Thread Taras Bobrovytsky (Code Review)
Taras Bobrovytsky has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9927 )

Change subject: IMPALA-6805: Show current database in Impala shell prompt
..


Patch Set 2:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/9927/2/shell/impala_shell.py
File shell/impala_shell.py:

http://gerrit.cloudera.org:8080/#/c/9927/2/shell/impala_shell.py@777
PS2, Line 777: [%s:%s] %s
I would prefer to change this to use the format() function. Something like 
"[{host}:{port}] {db}> ".format(host=self.impalad[0], port=self.impalad[1], db 
=...


http://gerrit.cloudera.org:8080/#/c/9927/2/shell/impala_shell.py@1147
PS2, Line 1147: [%s:%s] %s>
Since this is used several times, this template should be a constant declared 
somewhere around line 137.


http://gerrit.cloudera.org:8080/#/c/9927/2/tests/shell/test_shell_interactive.py
File tests/shell/test_shell_interactive.py:

http://gerrit.cloudera.org:8080/#/c/9927/2/tests/shell/test_shell_interactive.py@62
PS2, Line 62:  %s>" % db
it's better to use format() here too.



--
To view, visit http://gerrit.cloudera.org:8080/9927
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
Gerrit-Change-Number: 9927
Gerrit-PatchSet: 2
Gerrit-Owner: Fredy Wijaya 
Gerrit-Reviewer: Fredy Wijaya 
Gerrit-Reviewer: Taras Bobrovytsky 
Gerrit-Comment-Date: Wed, 04 Apr 2018 22:03:25 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-6805: Show current database in Impala shell prompt

2018-04-04 Thread Fredy Wijaya (Code Review)
Fredy Wijaya has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/9927


Change subject: IMPALA-6805: Show current database in Impala shell prompt
..

IMPALA-6805: Show current database in Impala shell prompt

Prompt format:
[host:port] db_name>

Testing:
- Added new shell tests
- Ran end-to-end shell tests

Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
---
M shell/impala_shell.py
M tests/shell/test_shell_interactive.py
2 files changed, 36 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/27/9927/2
--
To view, visit http://gerrit.cloudera.org:8080/9927
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc
Gerrit-Change-Number: 9927
Gerrit-PatchSet: 2
Gerrit-Owner: Fredy Wijaya