You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Todd Lipcon (Code Review)" <ge...@cloudera.org> on 2016/12/01 00:33:08 UTC

[kudu-CR] KUDU-1422 [java client] modifiable error collector capacity

Todd Lipcon has posted comments on this change.

Change subject: KUDU-1422 [java client] modifiable error collector capacity
......................................................................


Patch Set 1:

(5 comments)

should also add a test case for this patch

http://gerrit.cloudera.org:8080/#/c/5291/1/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduSession.java
File java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduSession.java:

Line 207: 	this.errorCollector.setMaxCapacity(size);
still think it should be a separate setter.


http://gerrit.cloudera.org:8080/#/c/5291/1/java/kudu-client/src/main/java/org/apache/kudu/client/ErrorCollector.java
File java/kudu-client/src/main/java/org/apache/kudu/client/ErrorCollector.java:

Line 69:   
nit: remove trailing whitespace


PS1, Line 73: RuntimeException
should throw illegal argument exception


Line 76:     if (maxCapacity > 0) {
typically we check for error cases first and "early exit", like:

if (maxCapacity <= 0) {
  throw ...
}
this.maxCapacity = maxCapacity

this style makes it so that the "normal path" is the one that's least indented.


PS1, Line 79: 	else {
            :       throw new RuntimeException("Need to be able to store at least one row error");
            : 	}
nit: style issues here (no tabs, fix indentation)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iae382050eb5eaf9c169dd3ef7ed4dbf5b5f1c334
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: eric-maynard <em...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes