You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Andrew Wong (Code Review)" <ge...@cloudera.org> on 2018/04/04 06:55:02 UTC
[kudu-CR] WIP KUDU-16 pt 4: python client support for limits
Andrew Wong has uploaded this change for review. ( http://gerrit.cloudera.org:8080/9924
Change subject: WIP KUDU-16 pt 4: python client support for limits
......................................................................
WIP KUDU-16 pt 4: python client support for limits
This patch allows python client users to impose a limit on the number of
rows returned by a single scanner.
WIP scan tokens not included
Change-Id: I49e24ff45c7dd359b400e4270fe7573305075b39
---
M python/kudu/client.pyx
M python/kudu/libkudu_client.pxd
M python/kudu/tests/test_scanner.py
3 files changed, 26 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/24/9924/1
--
To view, visit http://gerrit.cloudera.org:8080/9924
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I49e24ff45c7dd359b400e4270fe7573305075b39
Gerrit-Change-Number: 9924
Gerrit-PatchSet: 1
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
[kudu-CR] KUDU-16: python client support for limits
Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/9924 )
Change subject: KUDU-16: python client support for limits
......................................................................
Patch Set 1:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/9924/1/python/kudu/libkudu_client.pxd
File python/kudu/libkudu_client.pxd:
http://gerrit.cloudera.org:8080/#/c/9924/1/python/kudu/libkudu_client.pxd@681
PS1, Line 681: (
> nit: weird spacing
Done
http://gerrit.cloudera.org:8080/#/c/9924/1/python/kudu/libkudu_client.pxd@714
PS1, Line 714: Status SetLimitPerToken(int64_t limit)
> maybe break this into a separate commit?
I'll take this out until we converge on an API for tokens.
--
To view, visit http://gerrit.cloudera.org:8080/9924
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I49e24ff45c7dd359b400e4270fe7573305075b39
Gerrit-Change-Number: 9924
Gerrit-PatchSet: 1
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Wed, 04 Apr 2018 19:44:47 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-16: python client support for limits
Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/9924 )
Change subject: KUDU-16: python client support for limits
......................................................................
Patch Set 2:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/9924/2/python/kudu/tests/test_scanner.py
File python/kudu/tests/test_scanner.py:
http://gerrit.cloudera.org:8080/#/c/9924/2/python/kudu/tests/test_scanner.py@67
PS2, Line 67: self.assertEqual(len(tuples), min(limit, len(self.tuples)))
> I missed this in the first pass. Why is this 'min' necessary here? is this
(len(tuples) <= limit) is definitely correct, but asserting equality is a stricter guarantee that we get exactly as many as we're expecting. In this case, we are testing limits both below and above the total number of rows, and at the higher end, we're capped by the number of rows. I can change it if you'd like, or at the very least make it more obvious what this is testing.
--
To view, visit http://gerrit.cloudera.org:8080/9924
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I49e24ff45c7dd359b400e4270fe7573305075b39
Gerrit-Change-Number: 9924
Gerrit-PatchSet: 2
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Thu, 05 Apr 2018 02:15:21 +0000
Gerrit-HasComments: Yes
[kudu-CR] WIP KUDU-16 pt 4: python client support for limits
Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change. ( http://gerrit.cloudera.org:8080/9924 )
Change subject: WIP KUDU-16 pt 4: python client support for limits
......................................................................
Patch Set 1:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/9924/1/python/kudu/libkudu_client.pxd
File python/kudu/libkudu_client.pxd:
http://gerrit.cloudera.org:8080/#/c/9924/1/python/kudu/libkudu_client.pxd@681
PS1, Line 681: (
nit: weird spacing
http://gerrit.cloudera.org:8080/#/c/9924/1/python/kudu/libkudu_client.pxd@714
PS1, Line 714: Status SetLimitPerToken(int64_t limit)
maybe break this into a separate commit?
--
To view, visit http://gerrit.cloudera.org:8080/9924
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I49e24ff45c7dd359b400e4270fe7573305075b39
Gerrit-Change-Number: 9924
Gerrit-PatchSet: 1
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Wed, 04 Apr 2018 19:27:02 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-16: python client support for limits
Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/9924 )
Change subject: KUDU-16: python client support for limits
......................................................................
Patch Set 4:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/9924/2/python/kudu/tests/test_scanner.py
File python/kudu/tests/test_scanner.py:
http://gerrit.cloudera.org:8080/#/c/9924/2/python/kudu/tests/test_scanner.py@67
PS2, Line 67: scanner.set_limit(limit)
> oh, I missed that it was len(self.tuples) on the right hand and not len(tup
Done
--
To view, visit http://gerrit.cloudera.org:8080/9924
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I49e24ff45c7dd359b400e4270fe7573305075b39
Gerrit-Change-Number: 9924
Gerrit-PatchSet: 4
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Thu, 05 Apr 2018 05:23:51 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-16: python client support for limits
Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, Todd Lipcon,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/9924
to look at the new patch set (#4).
Change subject: KUDU-16: python client support for limits
......................................................................
KUDU-16: python client support for limits
This patch allows python client users to impose a limit on the number of
rows returned by a single scanner.
Change-Id: I49e24ff45c7dd359b400e4270fe7573305075b39
---
M python/kudu/client.pyx
M python/kudu/libkudu_client.pxd
M python/kudu/tests/test_scanner.py
3 files changed, 27 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/24/9924/4
--
To view, visit http://gerrit.cloudera.org:8080/9924
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I49e24ff45c7dd359b400e4270fe7573305075b39
Gerrit-Change-Number: 9924
Gerrit-PatchSet: 4
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] KUDU-16: python client support for limits
Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change. ( http://gerrit.cloudera.org:8080/9924 )
Change subject: KUDU-16: python client support for limits
......................................................................
Patch Set 3:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/9924/2/python/kudu/tests/test_scanner.py
File python/kudu/tests/test_scanner.py:
http://gerrit.cloudera.org:8080/#/c/9924/2/python/kudu/tests/test_scanner.py@67
PS2, Line 67: scanner.set_limit(limit)
> (len(tuples) <= limit) is definitely correct, but asserting equality is a s
oh, I missed that it was len(self.tuples) on the right hand and not len(tuples). Is len(self.tuples) the same as self.nrows here? If so, I think the latter is more obvious
--
To view, visit http://gerrit.cloudera.org:8080/9924
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I49e24ff45c7dd359b400e4270fe7573305075b39
Gerrit-Change-Number: 9924
Gerrit-PatchSet: 3
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Thu, 05 Apr 2018 05:09:55 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-16: python client support for limits
Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change. ( http://gerrit.cloudera.org:8080/9924 )
Change subject: KUDU-16: python client support for limits
......................................................................
Patch Set 4: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/9924
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I49e24ff45c7dd359b400e4270fe7573305075b39
Gerrit-Change-Number: 9924
Gerrit-PatchSet: 4
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Thu, 05 Apr 2018 05:30:06 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-16: python client support for limits
Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, Todd Lipcon,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/9924
to look at the new patch set (#2).
Change subject: KUDU-16: python client support for limits
......................................................................
KUDU-16: python client support for limits
This patch allows python client users to impose a limit on the number of
rows returned by a single scanner.
Change-Id: I49e24ff45c7dd359b400e4270fe7573305075b39
---
M python/kudu/client.pyx
M python/kudu/libkudu_client.pxd
M python/kudu/tests/test_scanner.py
3 files changed, 25 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/24/9924/2
--
To view, visit http://gerrit.cloudera.org:8080/9924
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I49e24ff45c7dd359b400e4270fe7573305075b39
Gerrit-Change-Number: 9924
Gerrit-PatchSet: 2
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] KUDU-16: python client support for limits
Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, Todd Lipcon,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/9924
to look at the new patch set (#3).
Change subject: KUDU-16: python client support for limits
......................................................................
KUDU-16: python client support for limits
This patch allows python client users to impose a limit on the number of
rows returned by a single scanner.
Change-Id: I49e24ff45c7dd359b400e4270fe7573305075b39
---
M python/kudu/client.pyx
M python/kudu/libkudu_client.pxd
M python/kudu/tests/test_scanner.py
3 files changed, 27 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/24/9924/3
--
To view, visit http://gerrit.cloudera.org:8080/9924
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I49e24ff45c7dd359b400e4270fe7573305075b39
Gerrit-Change-Number: 9924
Gerrit-PatchSet: 3
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] KUDU-16: python client support for limits
Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change. ( http://gerrit.cloudera.org:8080/9924 )
Change subject: KUDU-16: python client support for limits
......................................................................
Patch Set 2:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/9924/2/python/kudu/tests/test_scanner.py
File python/kudu/tests/test_scanner.py:
http://gerrit.cloudera.org:8080/#/c/9924/2/python/kudu/tests/test_scanner.py@67
PS2, Line 67: self.assertEqual(len(tuples), min(limit, len(self.tuples)))
I missed this in the first pass. Why is this 'min' necessary here? is this the same as assert(len(tuples) <= limit)? Why wouldn't it be exactly limit? Do we not insert enough rows for that to be true?
--
To view, visit http://gerrit.cloudera.org:8080/9924
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I49e24ff45c7dd359b400e4270fe7573305075b39
Gerrit-Change-Number: 9924
Gerrit-PatchSet: 2
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Thu, 05 Apr 2018 01:25:00 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-16: python client support for limits
Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Grant Henke has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/9924 )
Change subject: KUDU-16: python client support for limits
......................................................................
KUDU-16: python client support for limits
This patch allows python client users to impose a limit on the number of
rows returned by a single scanner.
Change-Id: I49e24ff45c7dd359b400e4270fe7573305075b39
Reviewed-on: http://gerrit.cloudera.org:8080/9924
Reviewed-by: Todd Lipcon <to...@apache.org>
Tested-by: Kudu Jenkins
---
M python/kudu/client.pyx
M python/kudu/libkudu_client.pxd
M python/kudu/tests/test_scanner.py
3 files changed, 27 insertions(+), 0 deletions(-)
Approvals:
Todd Lipcon: Looks good to me, approved
Kudu Jenkins: Verified
--
To view, visit http://gerrit.cloudera.org:8080/9924
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I49e24ff45c7dd359b400e4270fe7573305075b39
Gerrit-Change-Number: 9924
Gerrit-PatchSet: 5
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>