impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Jacobs (Code Review)" <ger...@cloudera.org>
Subject [hs2client-CR] Initial structure for the C++ hiveserver2 client.
Date Fri, 29 Apr 2016 20:23:41 GMT
Matthew Jacobs has posted comments on this change.

Change subject: Initial structure for the C++ hiveserver2 client.
......................................................................


Patch Set 9:

(18 comments)

Looking really good, thanks!

I think just a few small things to address now before trying to get this in.

We will definitely need to add GetResultSetMetadata to Operation, but we can do that in a
follow-up change. I filed https://github.com/cloudera/hs2client/issues/5

http://gerrit.cloudera.org:8080/#/c/2645/9/.gitignore
File .gitignore:

Line 4: Testing
where does this come from?


http://gerrit.cloudera.org:8080/#/c/2645/9/src/hs2client/fetch-results.h
File src/hs2client/fetch-results.h:

Line 24: class RowSet {};
just mention this is empty because it's not supported yet.


http://gerrit.cloudera.org:8080/#/c/2645/9/src/hs2client/hs2service.cc
File src/hs2client/hs2service.cc:

Line 92:   impl_->socket.reset(new TSocket(host_, port_));
I thought we were going to start passing through the timeout?


http://gerrit.cloudera.org:8080/#/c/2645/9/src/hs2client/hs2service.h
File src/hs2client/hs2service.h:

Line 88: serssion
typo lol serssion


http://gerrit.cloudera.org:8080/#/c/2645/9/src/hs2client/operation-test.cc
File src/hs2client/operation-test.cc:

Line 56: hasMoreRows
nit: variable names should be lower case with underscores per the coding style


http://gerrit.cloudera.org:8080/#/c/2645/9/src/hs2client/operation.cc
File src/hs2client/operation.cc:

Line 70: hasMoreRows
nit: style, here and all instances in this file


Line 86: *hasMoreRows = row_set_impl->resp.hasMoreRows;
Same. Sorry, I know it's inconsistent with what comes back with thrift :/


http://gerrit.cloudera.org:8080/#/c/2645/9/src/hs2client/operation.h
File src/hs2client/operation.h:

Line 65:   Status GetState(OperationState* out);
can these Get*, Fetch, and Cancel methods be marked const? I don't see them mutating state.
(Close does).


Line 73: hasMoreRows
same as below


Line 76: hasMoreRows
nit: style wrt naming variables/parameters


Line 78: hasMoreRows
same


Line 89:   bool HasResultSet();
... const;


Line 93:   bool IsColumnar();
... const;


http://gerrit.cloudera.org:8080/#/c/2645/9/src/hs2client/public-api-test.cc
File src/hs2client/public-api-test.cc:

Line 28:   FAIL() << "Thrift headers should not be in the public API";
nice. (I guess we have to find a way to remember to add new headers in the future...)


http://gerrit.cloudera.org:8080/#/c/2645/9/src/hs2client/thrift-internal.cc
File src/hs2client/thrift-internal.cc:

Line 29: Enumeration
nit: typically all caps, e.g. ENUM


Line 30: EnumToInt
fancy


http://gerrit.cloudera.org:8080/#/c/2645/9/src/hs2client/util.h
File src/hs2client/util.h:

Line 26: PrintResults
I think this is fine for now, though I think we may want to distance this further from the
core code. Maybe at some point we reorganize the code into a few folders: core, sample, test.


Line 30: Wait
can you move this to TestUtil as it's only used in a test.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7be82d5897ad6093116915b17924674c4ae508a0
Gerrit-PatchSet: 9
Gerrit-Project: hs2client
Gerrit-Branch: master
Gerrit-Owner: Thomas Tauber-Marshall <tmarshall@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <marcel@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj@cloudera.com>
Gerrit-Reviewer: Thomas Tauber-Marshall <tmarshall@cloudera.com>
Gerrit-Reviewer: Wes McKinney <wes@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message