You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Anonymous Coward (Code Review)" <ge...@cloudera.org> on 2016/09/06 13:38:11 UTC

[kudu-CR] Patch resolves KUDU-1593. Modified Client.create table to expose the num replicas method of the KuduTableCreator class.

jordantbirdsell@gmail.com has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/4315

Change subject: Patch resolves KUDU-1593. Modified Client.create_table to expose the num_replicas method of the KuduTableCreator class.
......................................................................

Patch resolves KUDU-1593.
Modified Client.create_table to expose the num_replicas method of
the KuduTableCreator class.

Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
---
M python/kudu/client.pyx
M python/kudu/tests/test_client.py
2 files changed, 29 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/15/4315/1
-- 
To view, visit http://gerrit.cloudera.org:8080/4315
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: jordantbirdsell@gmail.com

[kudu-CR] KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has submitted this change and it was merged.

Change subject: KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time
......................................................................


KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Currently the Kudu Python client does not allow for the number of replicas to be set at
table creation time because the num_replicas method of the KuduTableCreator is not
exposed to the Python class. This patch exposes that method as well as it exposes the
num_replicas method of the KuduTable class so that the number of replicas for a table
can be retrieved from the cluster.  This patch includes a test.

Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Reviewed-on: http://gerrit.cloudera.org:8080/4315
Reviewed-by: David Ribeiro Alves <dr...@apache.org>
Tested-by: Kudu Jenkins
---
M python/kudu/client.pyx
M python/kudu/libkudu_client.pxd
M python/kudu/tests/test_client.py
3 files changed, 28 insertions(+), 1 deletion(-)

Approvals:
  David Ribeiro Alves: Looks good to me, approved
  Kudu Jenkins: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Gerrit-PatchSet: 7
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change.

Change subject: KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time
......................................................................


Patch Set 5:

Build Started http://104.196.14.100/job/kudu-gerrit/3260/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Gerrit-PatchSet: 5
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: No

[kudu-CR] KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Posted by "Jordan Birdsell (Code Review)" <ge...@cloudera.org>.
Jordan Birdsell has posted comments on this change.

Change subject: KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time
......................................................................


Patch Set 6:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/4315/4/python/kudu/tests/test_client.py
File python/kudu/tests/test_client.py:

Line 94
> why delete this test?
fat fingered, added it back


Line 93:     def test_table_nonexistent(self):
> need to change the test name: something like: test_create_table_with_differ
Done


Line 97:     def test_create_table_with_different_replication_factors(self):
> nice, thanks for doing this. I completely forgot about the total number of 
I was considering testing all odd integers up to the number of tservers configured, however didn't want the test to take to long. We could do a random selection of tests within that range, but didn't want to overkill it just to verify that its appropriately setting the number of replicas.


Line 110: 
> why not just have the finally block, like before, and do a single delete_ta
Done


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Gerrit-PatchSet: 6
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: Yes

[kudu-CR] KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Posted by "Jordan Birdsell (Code Review)" <ge...@cloudera.org>.
Jordan Birdsell has posted comments on this change.

Change subject: KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time
......................................................................


Patch Set 5:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/4315/2/python/kudu/tests/test_client.py
File python/kudu/tests/test_client.py:

Line 98:         name = "no_replica_table"
> what I mean was to wrap this in something like "for num_replicas in [1,3,5]
Done, I added the iterative test for 1,3,5 provided they dont exceed the configured number of tservers which isnt allowed


Line 111:                 self.client.delete_table(name)
> I'm not a python expert, but isn't a finally block always executed? even if
Fair point, changed it to catch the assertion error if the test fails.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Gerrit-PatchSet: 5
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: Yes

[kudu-CR] KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Posted by "Jordan Birdsell (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/4315

to look at the new patch set (#2).

Change subject: KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time
......................................................................

KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Currently the Kudu Python client does not allow for the number of replicas to be set at
table creation time because the num_replicas method of the KuduTableCreator is not
exposed to the Python class. This patch exposes that method as well as it exposes the
num_replicas method of the KuduTable class so that the number of replicas for a table
can be retrieved from the cluster.  This patch includes a test.

Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
---
M python/kudu/client.pyx
M python/kudu/libkudu_client.pxd
M python/kudu/tests/test_client.py
3 files changed, 28 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/15/4315/2
-- 
To view, visit http://gerrit.cloudera.org:8080/4315
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins

[kudu-CR] KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change.

Change subject: KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time
......................................................................


Patch Set 6:

Build Started http://104.196.14.100/job/kudu-gerrit/3261/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Gerrit-PatchSet: 6
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: No

[kudu-CR] KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Posted by "Jordan Birdsell (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/4315

to look at the new patch set (#5).

Change subject: KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time
......................................................................

KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Currently the Kudu Python client does not allow for the number of replicas to be set at
table creation time because the num_replicas method of the KuduTableCreator is not
exposed to the Python class. This patch exposes that method as well as it exposes the
num_replicas method of the KuduTable class so that the number of replicas for a table
can be retrieved from the cluster.  This patch includes a test.

Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
---
M python/kudu/client.pyx
M python/kudu/libkudu_client.pxd
M python/kudu/tests/test_client.py
3 files changed, 27 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/15/4315/5
-- 
To view, visit http://gerrit.cloudera.org:8080/4315
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Gerrit-PatchSet: 5
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins

[kudu-CR] KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has posted comments on this change.

Change subject: KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time
......................................................................


Patch Set 2:

(2 comments)

looks mostly good, just a couple more nits and should be gtg

http://gerrit.cloudera.org:8080/#/c/4315/2/python/kudu/libkudu_client.pxd
File python/kudu/libkudu_client.pxd:

Line 526:         # in the Python client.
this is internal so likely no need for this comment.


http://gerrit.cloudera.org:8080/#/c/4315/2/python/kudu/tests/test_client.py
File python/kudu/tests/test_client.py:

Line 98:         name = "no_replica_table"
final nit: could you iterate and create tables with 1,3 and 5 replicas (just so that if we ever change the default this test will still test something)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: Yes

[kudu-CR] KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has posted comments on this change.

Change subject: KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/4315/2/python/kudu/tests/test_client.py
File python/kudu/tests/test_client.py:

Line 111:                 self.client.delete_table(name)
> In case the assertion fails, this makes sure we still delete the table.
I'm not a python expert, but isn't a finally block always executed? even if the assertion passes this would still be executed right? or is this some python idiom that I'm ignorant about?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: Yes

[kudu-CR] KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has posted comments on this change.

Change subject: KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time
......................................................................


Patch Set 6: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Gerrit-PatchSet: 6
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: No

[kudu-CR] KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change.

Change subject: KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time
......................................................................


Patch Set 2:

Build Started http://104.196.14.100/job/kudu-gerrit/3241/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: No

[kudu-CR] KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change.

Change subject: KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time
......................................................................


Patch Set 4:

Build Started http://104.196.14.100/job/kudu-gerrit/3259/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: No

[kudu-CR] KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has posted comments on this change.

Change subject: KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time
......................................................................


Patch Set 4:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/4315/4/python/kudu/tests/test_client.py
File python/kudu/tests/test_client.py:

Line 94
why delete this test?


Line 93:     def test_create_non_replicated_table(self):
need to change the test name: something like: test_create_table_with_different_replication_factors


Line 97:         # number does not exceed the number of tservers
nice, thanks for doing this. I completely forgot about the total number of tablet servers. I can follow on to try with higher replica numbers.


Line 110:                 self.client.delete_table(name)
why not just have the finally block, like before, and do a single delete_table there, independently of the assertion result?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: Yes

[kudu-CR] KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Posted by "Jordan Birdsell (Code Review)" <ge...@cloudera.org>.
Jordan Birdsell has posted comments on this change.

Change subject: KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/4315/2/python/kudu/libkudu_client.pxd
File python/kudu/libkudu_client.pxd:

Line 526: 
> this is internal so likely no need for this comment.
Done


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: Yes

[kudu-CR] Patch resolves KUDU-1593. Modified Client.create table to expose the num replicas method of the KuduTableCreator class.

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change.

Change subject: Patch resolves KUDU-1593. Modified Client.create_table to expose the num_replicas method of the KuduTableCreator class.
......................................................................


Patch Set 1:

Build Started http://104.196.14.100/job/kudu-gerrit/3233/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: jordantbirdsell@gmail.com
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: No

[kudu-CR] KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Posted by "Jordan Birdsell (Code Review)" <ge...@cloudera.org>.
Jordan Birdsell has posted comments on this change.

Change subject: KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/4315/2/python/kudu/tests/test_client.py
File python/kudu/tests/test_client.py:

Line 111:                 self.client.delete_table(name)
> missed this before: why the double delete_table?
In case the assertion fails, this makes sure we still delete the table.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: Yes

[kudu-CR] KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Posted by "Jordan Birdsell (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/4315

to look at the new patch set (#3).

Change subject: KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time
......................................................................

KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Currently the Kudu Python client does not allow for the number of replicas to be set at
table creation time because the num_replicas method of the KuduTableCreator is not
exposed to the Python class. This patch exposes that method as well as it exposes the
num_replicas method of the KuduTable class so that the number of replicas for a table
can be retrieved from the cluster.  This patch includes a test.

Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
---
M python/kudu/client.pyx
M python/kudu/libkudu_client.pxd
M python/kudu/tests/test_client.py
3 files changed, 26 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/15/4315/3
-- 
To view, visit http://gerrit.cloudera.org:8080/4315
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins

[kudu-CR] Patch resolves KUDU-1593. Modified Client.create table to expose the num replicas method of the KuduTableCreator class.

Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has posted comments on this change.

Change subject: Patch resolves KUDU-1593. Modified Client.create_table to expose the num_replicas method of the KuduTableCreator class.
......................................................................


Patch Set 1:

(6 comments)

http://gerrit.cloudera.org:8080/#/c/4315/1//COMMIT_MSG
Commit Message:

Line 7: Patch resolves KUDU-1593.
mention what the patch does. look at other patches, it's usually something like:
KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time


Line 8: Modified Client.create_table to expose the num_replicas method of
empty line between the title and the commit message, mention the test and possibly the motivation for the patch (short message, something like: "currently Kudu can't do X because of such and such. This patch does Y to solve it and includes a test.)


http://gerrit.cloudera.org:8080/#/c/4315/1/python/kudu/client.pyx
File python/kudu/client.pyx:

Line 239:         n_replicas : int
mention what the new variable refers to


http://gerrit.cloudera.org:8080/#/c/4315/1/python/kudu/tests/test_client.py
File python/kudu/tests/test_client.py:

Line 97:     def test_create_non_replicated_table(self):
would there be a way to verify the number of replicas of the created table? right now if you just dropped the new argument this test would still pass.


Line 114:         n_replicas = 2 ** 15 - 1
I don't think we need to test this, though I'm curious: where did you get this number?


Line 115:         
remove whitespace


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: Yes

[kudu-CR] KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change.

Change subject: KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time
......................................................................


Patch Set 3:

Build Started http://104.196.14.100/job/kudu-gerrit/3256/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: No

[kudu-CR] KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Posted by "Jordan Birdsell (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/4315

to look at the new patch set (#6).

Change subject: KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time
......................................................................

KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Currently the Kudu Python client does not allow for the number of replicas to be set at
table creation time because the num_replicas method of the KuduTableCreator is not
exposed to the Python class. This patch exposes that method as well as it exposes the
num_replicas method of the KuduTable class so that the number of replicas for a table
can be retrieved from the cluster.  This patch includes a test.

Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
---
M python/kudu/client.pyx
M python/kudu/libkudu_client.pxd
M python/kudu/tests/test_client.py
3 files changed, 28 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/15/4315/6
-- 
To view, visit http://gerrit.cloudera.org:8080/4315
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Gerrit-PatchSet: 6
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins

[kudu-CR] KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Posted by "Jordan Birdsell (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/4315

to look at the new patch set (#4).

Change subject: KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time
......................................................................

KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Currently the Kudu Python client does not allow for the number of replicas to be set at
table creation time because the num_replicas method of the KuduTableCreator is not
exposed to the Python class. This patch exposes that method as well as it exposes the
num_replicas method of the KuduTable class so that the number of replicas for a table
can be retrieved from the cluster.  This patch includes a test.

Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
---
M python/kudu/client.pyx
M python/kudu/libkudu_client.pxd
M python/kudu/tests/test_client.py
3 files changed, 26 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/15/4315/4
-- 
To view, visit http://gerrit.cloudera.org:8080/4315
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins

[kudu-CR] KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has posted comments on this change.

Change subject: KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/4315/2/python/kudu/tests/test_client.py
File python/kudu/tests/test_client.py:

Line 98:         name = "no_replica_table"
> Since the test is setup up for 3 tservers today, if its ever increased/decr
what I mean was to wrap this in something like "for num_replicas in [1,3,5]:" plus exercise the create table path a little more.

That would cover that case even if we ever change the defaults (which we might do for test purposes or something).


Line 111:                 self.client.delete_table(name)
missed this before: why the double delete_table?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: Yes

[kudu-CR] KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time

Posted by "Jordan Birdsell (Code Review)" <ge...@cloudera.org>.
Jordan Birdsell has posted comments on this change.

Change subject: KUDU-1593 - [python] Allow to set the number of replicas per tablet at table creation time
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/4315/1/python/kudu/tests/test_client.py
File python/kudu/tests/test_client.py:

Line 114: 
> I don't think we need to test this, though I'm curious: where did you get t
I removed the test, the thought was that we could ensure that proper error handling was in place when the number of replicas exceeded the number of tservers.  As for the number, since the number of tservers in the test could be changed, I wanted to be sure that this test would pass regardless of how many tservers are configured, so I chose the max value for a signed 16 bit int.


http://gerrit.cloudera.org:8080/#/c/4315/2/python/kudu/tests/test_client.py
File python/kudu/tests/test_client.py:

Line 98:         name = "no_replica_table"
> final nit: could you iterate and create tables with 1,3 and 5 replicas (jus
Since the test is setup up for 3 tservers today, if its ever increased/decreased, having this set to 1 will always effectively test this, no?  If its decreased to 1, there would be no test to be had really since you cant got any lower.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9dcac887029ef22e850ea8be72e71b684e6bee05
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Jordan Birdsell <jo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: Yes