You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Jordan Birdsell (Code Review)" <ge...@cloudera.org> on 2016/10/08 21:51:31 UTC

[kudu-CR] KUDU-1684 - [python] Add Scan Resource Metrics Capabilities

Jordan Birdsell has uploaded a new change for review.

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

Change subject: KUDU-1684 - [python] Add Scan Resource Metrics Capabilities
......................................................................

KUDU-1684 - [python] Add Scan Resource Metrics Capabilities

Currently, the python client doesn't expose scanner resource metrics.
This patch enables this ability and includes tests.

Change-Id: Ib6c4057bd2644e46bdbf8bae0d4a768306e2dbd9
---
M python/kudu/client.pyx
M python/kudu/libkudu_client.pxd
M python/kudu/tests/test_scanner.py
M python/kudu/tests/test_scantoken.py
4 files changed, 103 insertions(+), 0 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib6c4057bd2644e46bdbf8bae0d4a768306e2dbd9
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jordan Birdsell <jo...@gmail.com>

[kudu-CR] KUDU-1684 - [python] Add Scan Resource Metrics Capabilities

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

Change subject: KUDU-1684 - [python] Add Scan Resource Metrics Capabilities
......................................................................


Patch Set 2:

(2 comments)

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

PS2, Line 233: returns 0.
this part of the test doesn't seem that relevant anymore


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

Line 216:     def test_resource_metrics(self):
this test seems pretty redundant with the other scanner test -- isn't it a safe assumption that once you create a scanner from a token that it acts the same as any other scanner?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib6c4057bd2644e46bdbf8bae0d4a768306e2dbd9
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-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR] KUDU-1684 - [python] Add Scan Resource Metrics Capabilities

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

Change subject: KUDU-1684 - [python] Add Scan Resource Metrics Capabilities
......................................................................


Patch Set 2:

(2 comments)

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

Line 2128:         return UnixtimeMicrosVal(o)
> this is dangerous, since you aren't holding onto the Scanner object, and th
Removed this class altogether, since all this class is intended to do is provide an interface to a map, I switched this patch to just return a dictionary in the scanner.get_resource_metrics() method.  Only downside to this approach is that we can't implement the increment_metric resource, however I didn't intend to expose that to the Python client anyways.


PS1, Line 2137: 
> would say metric value, since not all metrics are necessarily counts
see above


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib6c4057bd2644e46bdbf8bae0d4a768306e2dbd9
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-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR] KUDU-1684 - [python] Add Scan Resource Metrics Capabilities

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

Change subject: KUDU-1684 - [python] Add Scan Resource Metrics Capabilities
......................................................................


KUDU-1684 - [python] Add Scan Resource Metrics Capabilities

Currently, the python client doesn't expose scanner resource metrics.
This patch enables this ability and includes tests.

Change-Id: Ib6c4057bd2644e46bdbf8bae0d4a768306e2dbd9
Reviewed-on: http://gerrit.cloudera.org:8080/4675
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <to...@apache.org>
---
M python/kudu/client.pyx
M python/kudu/libkudu_client.pxd
M python/kudu/tests/test_scanner.py
3 files changed, 42 insertions(+), 0 deletions(-)

Approvals:
  Todd Lipcon: Looks good to me, approved
  Kudu Jenkins: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib6c4057bd2644e46bdbf8bae0d4a768306e2dbd9
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-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] KUDU-1684 - [python] Add Scan Resource Metrics Capabilities

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/4675

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

Change subject: KUDU-1684 - [python] Add Scan Resource Metrics Capabilities
......................................................................

KUDU-1684 - [python] Add Scan Resource Metrics Capabilities

Currently, the python client doesn't expose scanner resource metrics.
This patch enables this ability and includes tests.

Change-Id: Ib6c4057bd2644e46bdbf8bae0d4a768306e2dbd9
---
M python/kudu/client.pyx
M python/kudu/libkudu_client.pxd
M python/kudu/tests/test_scanner.py
M python/kudu/tests/test_scantoken.py
4 files changed, 67 insertions(+), 0 deletions(-)


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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib6c4057bd2644e46bdbf8bae0d4a768306e2dbd9
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-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] KUDU-1684 - [python] Add Scan Resource Metrics Capabilities

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/4675

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

Change subject: KUDU-1684 - [python] Add Scan Resource Metrics Capabilities
......................................................................

KUDU-1684 - [python] Add Scan Resource Metrics Capabilities

Currently, the python client doesn't expose scanner resource metrics.
This patch enables this ability and includes tests.

Change-Id: Ib6c4057bd2644e46bdbf8bae0d4a768306e2dbd9
---
M python/kudu/client.pyx
M python/kudu/libkudu_client.pxd
M python/kudu/tests/test_scanner.py
3 files changed, 42 insertions(+), 0 deletions(-)


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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib6c4057bd2644e46bdbf8bae0d4a768306e2dbd9
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-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] KUDU-1684 - [python] Add Scan Resource Metrics Capabilities

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

Change subject: KUDU-1684 - [python] Add Scan Resource Metrics Capabilities
......................................................................


Patch Set 3: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib6c4057bd2644e46bdbf8bae0d4a768306e2dbd9
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-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] KUDU-1684 - [python] Add Scan Resource Metrics Capabilities

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

Change subject: KUDU-1684 - [python] Add Scan Resource Metrics Capabilities
......................................................................


Patch Set 3:

(2 comments)

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

PS2, Line 233: ds, row_in
> this part of the test doesn't seem that relevant anymore
Done


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

Line 216:     def verify_pred_type_scans(self, preds, row_indexes, count_only=False):
> this test seems pretty redundant with the other scanner test -- isn't it a 
Agreed, done.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib6c4057bd2644e46bdbf8bae0d4a768306e2dbd9
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-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR] KUDU-1684 - [python] Add Scan Resource Metrics Capabilities

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

Change subject: KUDU-1684 - [python] Add Scan Resource Metrics Capabilities
......................................................................


Patch Set 1:

(2 comments)

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

Line 2128:         const ResourceMetrics* _metrics
this is dangerous, since you aren't holding onto the Scanner object, and the ResourceMetrics are only live as long as the Scanner is. I think you either need to somehow reference the Scanner, or should extract all the values at construction time. Otherwise it's very easy for a user to accidentally write a use-after-free


PS1, Line 2137:  count
would say metric value, since not all metrics are necessarily counts


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib6c4057bd2644e46bdbf8bae0d4a768306e2dbd9
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-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes