You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Yingchun Lai (Code Review)" <ge...@cloudera.org> on 2019/04/03 16:32:18 UTC

[kudu-CR] [metrics] Remove incorrect comments

Yingchun Lai has uploaded this change for review. ( http://gerrit.cloudera.org:8080/12921


Change subject: [metrics] Remove incorrect comments
......................................................................

[metrics] Remove incorrect comments

Data store in std::map with key type 'const char*' is not in
alphabetical order, and it's not needed to sort metrics.

Change-Id: Id8788c38b73c623616b3fb2b73fcb6973df4ec87
---
M src/kudu/util/metrics.cc
1 file changed, 4 insertions(+), 7 deletions(-)



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id8788c38b73c623616b3fb2b73fcb6973df4ec87
Gerrit-Change-Number: 12921
Gerrit-PatchSet: 1
Gerrit-Owner: Yingchun Lai <40...@qq.com>

[kudu-CR] [metrics] Remove incorrect comments

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/12921 )

Change subject: [metrics] Remove incorrect comments
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/12921/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/12921/1//COMMIT_MSG@10
PS1, Line 10: and it's not needed to sort metrics.
I see how this was previously broken, but don't we want to sort the output? Why not keep the OrderedMetricsMap and add the right comparator? Or convert the map into a vector of pairs and sort that before printing?


http://gerrit.cloudera.org:8080/#/c/12921/1/src/kudu/util/metrics.cc
File src/kudu/util/metrics.cc:

http://gerrit.cloudera.org:8080/#/c/12921/1/src/kudu/util/metrics.cc@224
PS1, Line 224:         InsertOrDie(&metrics, prototype, metric);
With 'metrics' now being a MetricMap, it may be faster to reduce the amount of time spent holding lock_ by making a complete local copy of metric_map_, then manipulating it to remove unwanted metrics after releasing lock_.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id8788c38b73c623616b3fb2b73fcb6973df4ec87
Gerrit-Change-Number: 12921
Gerrit-PatchSet: 1
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Wed, 03 Apr 2019 17:13:05 +0000
Gerrit-HasComments: Yes

[kudu-CR] [metrics] Remove incorrect comments

Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/12921 )

Change subject: [metrics] Remove incorrect comments
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/12921/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/12921/1//COMMIT_MSG@10
PS1, Line 10: and it's not needed to sort metrics.
> I see how this was previously broken, but don't we want to sort the output?
There are dozens of metrics, and dozens of metric entities on a server, it's hard to check any metric even if they are sorted. I think users may prefer to search a certain metric name when they check the raw metrics output.
For third-party monitor systems, it doesn't matter whether metrics are sorted or not.
This rule seems have been broken for years and nobody complains, it's not a real need in my opinion.


http://gerrit.cloudera.org:8080/#/c/12921/1/src/kudu/util/metrics.cc
File src/kudu/util/metrics.cc:

http://gerrit.cloudera.org:8080/#/c/12921/1/src/kudu/util/metrics.cc@224
PS1, Line 224:         InsertOrDie(&metrics, prototype, metric);
> With 'metrics' now being a MetricMap, it may be faster to reduce the amount
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id8788c38b73c623616b3fb2b73fcb6973df4ec87
Gerrit-Change-Number: 12921
Gerrit-PatchSet: 1
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
Gerrit-Comment-Date: Fri, 05 Apr 2019 14:44:42 +0000
Gerrit-HasComments: Yes

[kudu-CR] [metrics] Remove incorrect comments

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/12921 )

Change subject: [metrics] Remove incorrect comments
......................................................................

[metrics] Remove incorrect comments

Data store in std::map with key type 'const char*' is not in
alphabetical order, and it's not needed to sort metrics.

Change-Id: Id8788c38b73c623616b3fb2b73fcb6973df4ec87
Reviewed-on: http://gerrit.cloudera.org:8080/12921
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <ad...@cloudera.com>
---
M src/kudu/util/metrics.cc
1 file changed, 11 insertions(+), 11 deletions(-)

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

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Id8788c38b73c623616b3fb2b73fcb6973df4ec87
Gerrit-Change-Number: 12921
Gerrit-PatchSet: 3
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>

[kudu-CR] [metrics] Remove incorrect comments

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/12921 )

Change subject: [metrics] Remove incorrect comments
......................................................................


Patch Set 2: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id8788c38b73c623616b3fb2b73fcb6973df4ec87
Gerrit-Change-Number: 12921
Gerrit-PatchSet: 2
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
Gerrit-Comment-Date: Fri, 05 Apr 2019 16:06:29 +0000
Gerrit-HasComments: No

[kudu-CR] [metrics] Remove incorrect comments

Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, Adar Dembo, 

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

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

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

Change subject: [metrics] Remove incorrect comments
......................................................................

[metrics] Remove incorrect comments

Data store in std::map with key type 'const char*' is not in
alphabetical order, and it's not needed to sort metrics.

Change-Id: Id8788c38b73c623616b3fb2b73fcb6973df4ec87
---
M src/kudu/util/metrics.cc
1 file changed, 11 insertions(+), 11 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id8788c38b73c623616b3fb2b73fcb6973df4ec87
Gerrit-Change-Number: 12921
Gerrit-PatchSet: 2
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>