You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Dan Burkert (Code Review)" <ge...@cloudera.org> on 2017/02/16 21:02:18 UTC

[kudu-CR] KUDU-1881: Deserializing scan token should check nullability of column

Hello Matthew Jacobs, Adar Dembo, Todd Lipcon,

I'd like you to do a code review.  Please visit

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

to review the following change.

Change subject: KUDU-1881: Deserializing scan token should check nullability of column
......................................................................

KUDU-1881: Deserializing scan token should check nullability of column

Adds test cases for mismatched types and nullability on columns, and
changes the error return to InvalidStatus, since the mismatches are
indicative of changed state, and not necessarily an invalid argument.

Change-Id: I6b4c835c948723eb9bc47131e894971b8e1a2c44
---
M java/kudu-client/src/main/java/org/apache/kudu/client/KuduScanToken.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduClient.java
M src/kudu/client/scan_token-internal.cc
M src/kudu/client/scan_token-test.cc
4 files changed, 181 insertions(+), 12 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b4c835c948723eb9bc47131e894971b8e1a2c44
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] KUDU-1881: Deserializing scan token should check nullability of column

Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Hello Matthew Jacobs, Kudu Jenkins,

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

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

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

Change subject: KUDU-1881: Deserializing scan token should check nullability of column
......................................................................

KUDU-1881: Deserializing scan token should check nullability of column

Adds test cases for mismatched types and nullability on columns, and
changes the error return to InvalidStatus, since the mismatches are
indicative of changed state, and not necessarily an invalid argument.

Change-Id: I6b4c835c948723eb9bc47131e894971b8e1a2c44
---
M java/kudu-client/src/main/java/org/apache/kudu/client/KuduScanToken.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduClient.java
M src/kudu/client/scan_token-internal.cc
M src/kudu/client/scan_token-test.cc
4 files changed, 180 insertions(+), 12 deletions(-)


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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6b4c835c948723eb9bc47131e894971b8e1a2c44
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] KUDU-1881: Deserializing scan token should check nullability of column

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

Change subject: KUDU-1881: Deserializing scan token should check nullability of column
......................................................................


Patch Set 1: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6b4c835c948723eb9bc47131e894971b8e1a2c44
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] KUDU-1881: Deserializing scan token should check nullability of column

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

Change subject: KUDU-1881: Deserializing scan token should check nullability of column
......................................................................


KUDU-1881: Deserializing scan token should check nullability of column

Adds test cases for mismatched types and nullability on columns, and
changes the error return to InvalidStatus, since the mismatches are
indicative of changed state, and not necessarily an invalid argument.

Change-Id: I6b4c835c948723eb9bc47131e894971b8e1a2c44
Reviewed-on: http://gerrit.cloudera.org:8080/6040
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Tested-by: Kudu Jenkins
---
M java/kudu-client/src/main/java/org/apache/kudu/client/KuduScanToken.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduClient.java
M src/kudu/client/scan_token-internal.cc
M src/kudu/client/scan_token-test.cc
4 files changed, 180 insertions(+), 12 deletions(-)

Approvals:
  Adar Dembo: Looks good to me, approved
  Kudu Jenkins: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6b4c835c948723eb9bc47131e894971b8e1a2c44
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] KUDU-1881: Deserializing scan token should check nullability of column

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

Change subject: KUDU-1881: Deserializing scan token should check nullability of column
......................................................................


Patch Set 1:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/6040/1/java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduClient.java
File java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduClient.java:

Line 663:       throw new AssertionError();
I think just calling Assert.fail() is more idiomatic. Below too.


http://gerrit.cloudera.org:8080/#/c/6040/1/src/kudu/client/scan_token-internal.cc
File src/kudu/client/scan_token-internal.cc:

Line 95:       return Status::IllegalState("unknown column in scan token", column.name());
Curious, what was your justification for converting these InvalidArgument errors into IllegalState? I can see an argument for either: the scan token is certainly an "argument" to this function, but it's also a piece of state that has been constructed well before this particular function call.


http://gerrit.cloudera.org:8080/#/c/6040/1/src/kudu/client/scan_token-test.cc
File src/kudu/client/scan_token-test.cc:

Line 496:   ASSERT_STR_MATCHES(s.ToString(), ".*unknown column 'a' in scan token");
How about before matching the string, you first ASSERT that you got a Status of a particular type (i.e. invalid argument, etc)?


Line 506:   ASSERT_STR_MATCHES(s.ToString(),
I think your regexes are failing in the test. Probably below too.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6b4c835c948723eb9bc47131e894971b8e1a2c44
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR] KUDU-1881: Deserializing scan token should check nullability of column

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

Change subject: KUDU-1881: Deserializing scan token should check nullability of column
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/6040/2/java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduClient.java
File java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduClient.java:

Line 663:       Assert.fail();
Assert.fail() is imported statically so you can drop the prefix.


http://gerrit.cloudera.org:8080/#/c/6040/1/src/kudu/client/scan_token-internal.cc
File src/kudu/client/scan_token-internal.cc:

Line 95:       return Status::IllegalState("unknown column in scan token", column.name());
> I put the reasoning in the commit message, but basically it's not necessari
Whoops, missed it in the commit message. Your argument makes sense.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6b4c835c948723eb9bc47131e894971b8e1a2c44
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR] KUDU-1881: Deserializing scan token should check nullability of column

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

Change subject: KUDU-1881: Deserializing scan token should check nullability of column
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/6040/2/java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduClient.java
File java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduClient.java:

Line 663:       fail();
> Assert.fail() is imported statically so you can drop the prefix.
Done


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6b4c835c948723eb9bc47131e894971b8e1a2c44
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR] KUDU-1881: Deserializing scan token should check nullability of column

Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Hello Matthew Jacobs, Kudu Jenkins,

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

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

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

Change subject: KUDU-1881: Deserializing scan token should check nullability of column
......................................................................

KUDU-1881: Deserializing scan token should check nullability of column

Adds test cases for mismatched types and nullability on columns, and
changes the error return to InvalidStatus, since the mismatches are
indicative of changed state, and not necessarily an invalid argument.

Change-Id: I6b4c835c948723eb9bc47131e894971b8e1a2c44
---
M java/kudu-client/src/main/java/org/apache/kudu/client/KuduScanToken.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduClient.java
M src/kudu/client/scan_token-internal.cc
M src/kudu/client/scan_token-test.cc
4 files changed, 180 insertions(+), 12 deletions(-)


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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6b4c835c948723eb9bc47131e894971b8e1a2c44
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] KUDU-1881: Deserializing scan token should check nullability of column

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

Change subject: KUDU-1881: Deserializing scan token should check nullability of column
......................................................................


Patch Set 3: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6b4c835c948723eb9bc47131e894971b8e1a2c44
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] KUDU-1881: Deserializing scan token should check nullability of column

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

Change subject: KUDU-1881: Deserializing scan token should check nullability of column
......................................................................


Patch Set 1:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/6040/1/java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduClient.java
File java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduClient.java:

Line 663:       throw new AssertionError();
> I think just calling Assert.fail() is more idiomatic. Below too.
Done


http://gerrit.cloudera.org:8080/#/c/6040/1/src/kudu/client/scan_token-internal.cc
File src/kudu/client/scan_token-internal.cc:

Line 95:       return Status::IllegalState("unknown column in scan token", column.name());
> Curious, what was your justification for converting these InvalidArgument e
I put the reasoning in the commit message, but basically it's not necessarily the fault of the caller, it could just be down to a race between someone else concurrently updating the table.


http://gerrit.cloudera.org:8080/#/c/6040/1/src/kudu/client/scan_token-test.cc
File src/kudu/client/scan_token-test.cc:

Line 496:   ASSERT_STR_MATCHES(s.ToString(), ".*unknown column 'a' in scan token");
> How about before matching the string, you first ASSERT that you got a Statu
Done


Line 506:   ASSERT_STR_MATCHES(s.ToString(),
> I think your regexes are failing in the test. Probably below too.
Done


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6b4c835c948723eb9bc47131e894971b8e1a2c44
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes