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

2016-09-07 Thread Todd Lipcon (Code Review)
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 
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 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Jordan Birdsell 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 


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

2016-09-07 Thread David Ribeiro Alves (Code Review)
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 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Jordan Birdsell 
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

2016-09-07 Thread Jordan Birdsell (Code Review)
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 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Jordan Birdsell 
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

2016-09-07 Thread Jordan Birdsell (Code Review)
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 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Jordan Birdsell 
Gerrit-Reviewer: Kudu Jenkins


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

2016-09-07 Thread Kudu Jenkins (Code Review)
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 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Jordan Birdsell 
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

2016-09-07 Thread David Ribeiro Alves (Code Review)
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 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Jordan Birdsell 
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

2016-09-07 Thread Kudu Jenkins (Code Review)
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 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Jordan Birdsell 
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

2016-09-07 Thread Kudu Jenkins (Code Review)
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 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Jordan Birdsell 
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

2016-09-07 Thread David Ribeiro Alves (Code Review)
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 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Jordan Birdsell 
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

2016-09-07 Thread Jordan Birdsell (Code Review)
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 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Jordan Birdsell 
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

2016-09-07 Thread David Ribeiro Alves (Code Review)
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 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Jordan Birdsell 
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

2016-09-07 Thread Jordan Birdsell (Code Review)
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 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Jordan Birdsell 
Gerrit-Reviewer: Kudu Jenkins


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

2016-09-07 Thread Kudu Jenkins (Code Review)
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 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Jordan Birdsell 
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

2016-09-07 Thread Jordan Birdsell (Code Review)
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 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Jordan Birdsell 
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

2016-09-07 Thread Jordan Birdsell (Code Review)
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 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Jordan Birdsell 
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

2016-09-07 Thread David Ribeiro Alves (Code Review)
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 
Gerrit-Reviewer: David Ribeiro Alves 
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

2016-09-06 Thread Jordan Birdsell (Code Review)
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 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins