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/12/16 09:44:01 UTC
[kudu-CR] [metrics] Add a new metric 'last consult timestamp' for tablet
Yingchun Lai has uploaded this change for review. ( http://gerrit.cloudera.org:8080/14912
Change subject: [metrics] Add a new metric 'last_consult_timestamp' for tablet
......................................................................
[metrics] Add a new metric 'last_consult_timestamp' for tablet
Add a new metric 'last_consult_timestamp' for tablet to indicate the
last write or scan timestamp of the tablet. We can judge whether a
tablet is 'hot' or 'cold' by this metric.
Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
---
M src/kudu/tablet/tablet_metrics.cc
M src/kudu/tablet/tablet_metrics.h
M src/kudu/tserver/tablet_service.cc
M src/kudu/util/metrics.h
4 files changed, 20 insertions(+), 4 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/12/14912/1
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 1
Gerrit-Owner: Yingchun Lai <40...@qq.com>
[kudu-CR] [metrics] Add new metrics to indicate the last read/write time
Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, Adar Dembo, Grant Henke,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/14912
to look at the new patch set (#3).
Change subject: [metrics] Add new metrics to indicate the last read/write time
......................................................................
[metrics] Add new metrics to indicate the last read/write time
Add new metrics 'last_read_elapsed_seconds' and
'last_write_elapsed_seconds' for tablet to indicate the last read or
write operation on the tablet. We can judge whether a tablet is 'hot'
or 'cold' by these metrics.
Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
---
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet.h
M src/kudu/tablet/tablet_metrics.h
M src/kudu/tserver/tablet_service.cc
4 files changed, 54 insertions(+), 15 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/12/14912/3
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 3
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
[kudu-CR] [tablet] Add new metrics to indicate the last read/write time
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/14912 )
Change subject: [tablet] Add new metrics to indicate the last read/write time
......................................................................
Patch Set 10:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/14912/10/src/kudu/tablet/tablet.cc
File src/kudu/tablet/tablet.cc:
http://gerrit.cloudera.org:8080/#/c/14912/10/src/kudu/tablet/tablet.cc@176
PS10, Line 176: wrriten
written
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 10
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
Gerrit-Comment-Date: Tue, 24 Dec 2019 04:44:27 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tablet] Add new metrics to indicate the last read/write time
Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/14912 )
Change subject: [tablet] Add new metrics to indicate the last read/write time
......................................................................
Patch Set 9:
> Patch Set 9:
>
> (1 comment)
>
> As you can see in the failed ASAN tests, the tablet_ access in Tablet::iterator::NextBlock isn't going to work because a concurrent tablet deletion could free the underlying memory. The scan itself is safe because the iterator holds references to all the sub-objects (diskrowsets, deltas, etc.) that are needed to satisfy the scan even if the Tablet itself is freed.
>
> HandleNewScanRequest deals with this with the following code:
>
> // It's important to keep the reference to the tablet for the case when the
> // tablet replica's shutdown is run concurrently with the code below.
> shared_ptr<Tablet> tablet;
> RETURN_NOT_OK(GetTabletRef(replica, &tablet, error_code));
>
> You could upgrade the raw Tablet pointer in Tablet::Iterator to a shared pointer, but I haven't thought through whether that's a good idea or not.
I'm not sure making the Tablet pointer shared is a good idea, given how long-lived scanners can be. Another option might be to move the call into tablet_service.cc around L2695 where we update some other scanner-related metrics.
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 9
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
Gerrit-Comment-Date: Fri, 20 Dec 2019 19:50:28 +0000
Gerrit-HasComments: No
[kudu-CR] [tablet] Add new metrics to indicate the last read/write time
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/14912 )
Change subject: [tablet] Add new metrics to indicate the last read/write time
......................................................................
Patch Set 11: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 11
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
Gerrit-Comment-Date: Sun, 29 Dec 2019 18:36:18 +0000
Gerrit-HasComments: No
[kudu-CR] [tablet] Add new metrics to indicate the last read/write time
Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Alexey Serbin, Kudu Jenkins, Andrew Wong, Adar Dembo, Grant Henke,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/14912
to look at the new patch set (#11).
Change subject: [tablet] Add new metrics to indicate the last read/write time
......................................................................
[tablet] Add new metrics to indicate the last read/write time
Add new metrics 'last_read_elapsed_seconds' and
'last_write_elapsed_seconds' for tablet to indicate the last read and
write operation on the tablet. We can judge whether a tablet is 'hot'
or 'cold' by these metrics.
Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
---
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet.h
M src/kudu/tablet/tablet_metrics.h
M src/kudu/tserver/tablet_service.cc
4 files changed, 78 insertions(+), 17 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/12/14912/11
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 11
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
[kudu-CR] [tablet] Add new metrics to indicate the last read/write time
Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Grant Henke has posted comments on this change. ( http://gerrit.cloudera.org:8080/14912 )
Change subject: [tablet] Add new metrics to indicate the last read/write time
......................................................................
Patch Set 5:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.h
File src/kudu/tablet/tablet.h:
http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.h@663
PS5, Line 663: // uint64_t::max is returned if this tablet hasn't been read since tablet created or tserver
: // restarted.
> My guess is the expected usage of this is to see what tablets have not been
Given that reasoning, I think the best choice is actually 0, given we don't know the last time it was written and therefore it could have been extremely recent.
This would also allow easier filtering of tablets with a long duration since being written since no special value filtering of MAX would be needed.
This also shows a pretty strong weakness of this metric. If it's not persistent or derived from data/metadata all sorts of operations will prevent it from being useful. Restarts, replication, rebalancing, etc. They will all make this metric value hard to trust.
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 5
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
Gerrit-Comment-Date: Wed, 18 Dec 2019 19:46:15 +0000
Gerrit-HasComments: Yes
[kudu-CR] [metrics] Add new metrics to indicate the last read/write time
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/14912 )
Change subject: [metrics] Add new metrics to indicate the last read/write time
......................................................................
Patch Set 3:
(5 comments)
http://gerrit.cloudera.org:8080/#/c/14912/3/src/kudu/tablet/tablet.h
File src/kudu/tablet/tablet.h:
http://gerrit.cloudera.org:8080/#/c/14912/3/src/kudu/tablet/tablet.h@282
PS3, Line 282: // Last read operation elapsed in seconds on this tablet.
: uint64_t LastReadElapsedSeconds() const;
:
: // Last write operation elapsed in seconds on this tablet.
: uint64_t LastWriteElapsedSeconds() const;
:
Can these be private?
http://gerrit.cloudera.org:8080/#/c/14912/3/src/kudu/tablet/tablet.h@761
PS3, Line 761: MonoTime last_write_time_;
: mutable MonoTime last_read_time_;
These need to be protected by a lock, no?
http://gerrit.cloudera.org:8080/#/c/14912/3/src/kudu/tablet/tablet.cc
File src/kudu/tablet/tablet.cc:
PS3:
The new metrics descriptions' should mention what happens when there haven't been any reads/writes, or when the tserver is restarted.
http://gerrit.cloudera.org:8080/#/c/14912/3/src/kudu/tserver/tablet_service.cc
File src/kudu/tserver/tablet_service.cc:
http://gerrit.cloudera.org:8080/#/c/14912/3/src/kudu/tserver/tablet_service.cc@2670
PS3, Line 2670: // Then the number of rows/cells/bytes actually processed. Here we have to dig
As does the beginning of this comment.
http://gerrit.cloudera.org:8080/#/c/14912/3/src/kudu/tserver/tablet_service.cc@2685
PS3, Line 2685: // First, the number of rows/cells/bytes actually returned to the user.
This comment needs to be updated.
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 3
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
Gerrit-Comment-Date: Tue, 17 Dec 2019 19:55:47 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tablet] Add new metrics to indicate the last read/write time
Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/14912 )
Change subject: [tablet] Add new metrics to indicate the last read/write time
......................................................................
Patch Set 11:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/14912/10/src/kudu/tablet/tablet.cc
File src/kudu/tablet/tablet.cc:
http://gerrit.cloudera.org:8080/#/c/14912/10/src/kudu/tablet/tablet.cc@176
PS10, Line 176: written
> written
Done
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 11
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
Gerrit-Comment-Date: Tue, 24 Dec 2019 06:01:43 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tablet] Add new metrics to indicate the last read/write time
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/14912 )
Change subject: [tablet] Add new metrics to indicate the last read/write time
......................................................................
Patch Set 5:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.h
File src/kudu/tablet/tablet.h:
http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.h@663
PS5, Line 663: // uint64_t::max is returned if this tablet hasn't been read since tablet created or tserver
: // restarted.
> Given that reasoning, I think the best choice is actually 0, given we don't
It seems there another pitfall in using these metrics even without replication and rebalancing. What if different tablet replicas are asked about readings of those metrics? E.g., imagine a situation where it's been long time one replica was a leader and maintained the recency of writes metric. Once the leader changed, and the new leader replica have no clue on the times of last updates, right? Even last-read metric values will differ depending on what replica was used for the most recent scan operation.
We could preserve the information on the recency stats in the system catalog, but it would be a bottleneck if we want to keep the information more-or-less up-to-date.
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 5
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
Gerrit-Comment-Date: Wed, 18 Dec 2019 21:16:03 +0000
Gerrit-HasComments: Yes
[kudu-CR] [metrics] Add new metrics to indicate the last read/write time
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/14912 )
Change subject: [metrics] Add new metrics to indicate the last read/write time
......................................................................
Patch Set 4:
(7 comments)
http://gerrit.cloudera.org:8080/#/c/14912/4//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/14912/4//COMMIT_MSG@7
PS4, Line 7: metrics
tablet ?
http://gerrit.cloudera.org:8080/#/c/14912/4//COMMIT_MSG@10
PS4, Line 10: or
and
http://gerrit.cloudera.org:8080/#/c/14912/4/src/kudu/tablet/tablet.h
File src/kudu/tablet/tablet.h:
http://gerrit.cloudera.org:8080/#/c/14912/4/src/kudu/tablet/tablet.h@764
PS4, Line 764: simple_spinlock
Would rw_spinlock be a better option here? For read access, with rw_spinlock it's possible to use shared_lock<rw_spinlock> construct, allowing multiple readers at once.
http://gerrit.cloudera.org:8080/#/c/14912/4/src/kudu/tablet/tablet.cc
File src/kudu/tablet/tablet.cc:
http://gerrit.cloudera.org:8080/#/c/14912/4/src/kudu/tablet/tablet.cc@167
PS4, Line 167: "Last Read Elapsed Seconds"
nit: maybe, "Seconds Since Last Read" for easier comprehension?
http://gerrit.cloudera.org:8080/#/c/14912/4/src/kudu/tablet/tablet.cc@173
PS4, Line 173: "Last Write Elapsed Seconds"
nit: maybe, "Seconds Since Last Write"?
http://gerrit.cloudera.org:8080/#/c/14912/4/src/kudu/tablet/tablet.cc@1993
PS4, Line 1993: MonoTime::Now().GetDeltaSince(last_read_time_).ToSeconds()
Would
(MonoTime::Now() - last_read_time_).ToSeconds()
work here?
http://gerrit.cloudera.org:8080/#/c/14912/4/src/kudu/tablet/tablet.cc@2001
PS4, Line 2001: MonoTime::Now().GetDeltaSince(last_write_time_).ToSeconds()
Would
(MonoTime::Now() - last_write_time_).ToSeconds()
work here?
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 4
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
Gerrit-Comment-Date: Wed, 18 Dec 2019 08:07:16 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tablet] Add new metrics to indicate the last read/write time
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/14912 )
Change subject: [tablet] Add new metrics to indicate the last read/write time
......................................................................
[tablet] Add new metrics to indicate the last read/write time
Add new metrics 'last_read_elapsed_seconds' and
'last_write_elapsed_seconds' for tablet to indicate the last read and
write operation on the tablet. We can judge whether a tablet is 'hot'
or 'cold' by these metrics.
Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Reviewed-on: http://gerrit.cloudera.org:8080/14912
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <ad...@cloudera.com>
---
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet.h
M src/kudu/tablet/tablet_metrics.h
M src/kudu/tserver/tablet_service.cc
4 files changed, 78 insertions(+), 16 deletions(-)
Approvals:
Kudu Jenkins: Verified
Adar Dembo: Looks good to me, approved
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 12
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
[kudu-CR] [tablet] Add new metrics to indicate the last read/write time
Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Alexey Serbin, Kudu Jenkins, Andrew Wong, Adar Dembo, Grant Henke,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/14912
to look at the new patch set (#9).
Change subject: [tablet] Add new metrics to indicate the last read/write time
......................................................................
[tablet] Add new metrics to indicate the last read/write time
Add new metrics 'last_read_elapsed_seconds' and
'last_write_elapsed_seconds' for tablet to indicate the last read and
write operation on the tablet. We can judge whether a tablet is 'hot'
or 'cold' by these metrics.
Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
---
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet.h
M src/kudu/tablet/tablet_metrics.h
M src/kudu/tserver/tablet_service.cc
4 files changed, 77 insertions(+), 17 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/12/14912/9
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 9
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
[kudu-CR] [metrics] Add a new metric 'last consult timestamp' for tablet
Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Grant Henke has posted comments on this change. ( http://gerrit.cloudera.org:8080/14912 )
Change subject: [metrics] Add a new metric 'last_consult_timestamp' for tablet
......................................................................
Patch Set 1:
(3 comments)
http://gerrit.cloudera.org:8080/#/c/14912/1//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/14912/1//COMMIT_MSG@10
PS1, Line 10: last write or scan timestamp of the tablet. We can judge whether a
What will you do with the knowledge of a cold or hot tablet?
http://gerrit.cloudera.org:8080/#/c/14912/1/src/kudu/tablet/tablet_metrics.cc
File src/kudu/tablet/tablet_metrics.cc:
http://gerrit.cloudera.org:8080/#/c/14912/1/src/kudu/tablet/tablet_metrics.cc@136
PS1, Line 136: METRIC_DEFINE_gauge_uint64(tablet, last_consult_timestamp, "Last Consult Timestamp",
Does it make sense to separate this into two metrics? One for writes and one for reads?
http://gerrit.cloudera.org:8080/#/c/14912/1/src/kudu/tablet/tablet_metrics.cc@325
PS1, Line 325: // TODO(yingchun): Should use kMax type.
Did you intend to leave this todo in? And the one below.
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 1
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Mon, 16 Dec 2019 16:33:21 +0000
Gerrit-HasComments: Yes
[kudu-CR] [metrics] Add new metrics to indicate the last read/write time
Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, Adar Dembo, Grant Henke,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/14912
to look at the new patch set (#4).
Change subject: [metrics] Add new metrics to indicate the last read/write time
......................................................................
[metrics] Add new metrics to indicate the last read/write time
Add new metrics 'last_read_elapsed_seconds' and
'last_write_elapsed_seconds' for tablet to indicate the last read or
write operation on the tablet. We can judge whether a tablet is 'hot'
or 'cold' by these metrics.
Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
---
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet.h
M src/kudu/tablet/tablet_metrics.h
M src/kudu/tserver/tablet_service.cc
4 files changed, 72 insertions(+), 16 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/12/14912/4
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 4
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
[kudu-CR] [metrics] Add new metrics to indicate the last read/write time
Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/14912 )
Change subject: [metrics] Add new metrics to indicate the last read/write time
......................................................................
Patch Set 4:
(9 comments)
http://gerrit.cloudera.org:8080/#/c/14912/1//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/14912/1//COMMIT_MSG@10
PS1, Line 10: 'last_write_elapsed_seconds' for tablet to indicate the last read or
> I see, then it's especially important to separate read and write metrics.
Done
http://gerrit.cloudera.org:8080/#/c/14912/3/src/kudu/tablet/tablet.h
File src/kudu/tablet/tablet.h:
http://gerrit.cloudera.org:8080/#/c/14912/3/src/kudu/tablet/tablet.h@282
PS3, Line 282: // Get the total size of all the DMS
: size_t DeltaMemStoresSize() const;
:
: // Same as MemRowSetEmpty(), but for the DMS.
: bool DeltaMemRowSetEmpty() const;
:
> Can these be private?
Done
http://gerrit.cloudera.org:8080/#/c/14912/3/src/kudu/tablet/tablet.h@761
PS3, Line 761: std::vector<MaintenanceOp*> maintenance_ops_;
:
> These need to be protected by a lock, no?
Done
http://gerrit.cloudera.org:8080/#/c/14912/3/src/kudu/tablet/tablet.cc
File src/kudu/tablet/tablet.cc:
PS3:
> The new metrics descriptions' should mention what happens when there haven'
Done
http://gerrit.cloudera.org:8080/#/c/14912/3/src/kudu/tablet/tablet.cc@167
PS3, Line 167: METRIC_DEFINE_gauge_uint64(tablet, last_read_elapsed_time, "Last Read Elapsed Seconds",
> Maybe last_read_elapsed_time? That seems to be more common than listing the
Done
http://gerrit.cloudera.org:8080/#/c/14912/3/src/kudu/tablet/tablet.cc@169
PS3, Line 169: "The elapsed time, in seconds, since the last read operation "
> Maybe rephrase this to "The elapsed time, in seconds, since the last read o
Done
http://gerrit.cloudera.org:8080/#/c/14912/3/src/kudu/tablet/tablet.cc@173
PS3, Line 173: METRIC_DEFINE_gauge_uint64(tablet, last_write_elapsed_time, "Last Write Elapsed Seconds",
> Maybe rephrase this to "The elapsed time, in seconds, since the last write
Done
http://gerrit.cloudera.org:8080/#/c/14912/3/src/kudu/tserver/tablet_service.cc
File src/kudu/tserver/tablet_service.cc:
http://gerrit.cloudera.org:8080/#/c/14912/3/src/kudu/tserver/tablet_service.cc@2670
PS3, Line 2670: // Calculate the number of rows/cells/bytes actually processed. Here we have to dig
> As does the beginning of this comment.
Done
http://gerrit.cloudera.org:8080/#/c/14912/3/src/kudu/tserver/tablet_service.cc@2685
PS3, Line 2685: // The number of rows/cells/bytes actually returned to the user.
> This comment needs to be updated.
Done
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 4
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
Gerrit-Comment-Date: Wed, 18 Dec 2019 06:16:17 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tablet] Add new metrics to indicate the last read/write time
Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Alexey Serbin, Kudu Jenkins, Andrew Wong, Adar Dembo, Grant Henke,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/14912
to look at the new patch set (#6).
Change subject: [tablet] Add new metrics to indicate the last read/write time
......................................................................
[tablet] Add new metrics to indicate the last read/write time
Add new metrics 'last_read_elapsed_seconds' and
'last_write_elapsed_seconds' for tablet to indicate the last read and
write operation on the tablet. We can judge whether a tablet is 'hot'
or 'cold' by these metrics.
Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
---
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet.h
M src/kudu/tablet/tablet_metrics.h
M src/kudu/tserver/tablet_service.cc
4 files changed, 83 insertions(+), 16 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/12/14912/6
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 6
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
[kudu-CR] [tablet] Add new metrics to indicate the last read/write time
Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/14912 )
Change subject: [tablet] Add new metrics to indicate the last read/write time
......................................................................
Patch Set 6:
(4 comments)
http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.h
File src/kudu/tablet/tablet.h:
http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.h@663
PS5, Line 663: // on this tablet. uint64_t::max is returned if this tablet hasn't
: // been read
> Recency of writes is maintained across all replicas because the write metri
When use the metrics, we will merge different replicas' metric of the same tablet(merged by MAX or MIN type), so we can get the tablet's last write and scan time. We can get table's last write and scan time by the same way.
I think 0 for these cases might be confused too. Suppose there are thousands of tablets haven't been wrriten since last restart, we can't distinguish them from recency wrriten ones, and also, can't take any operations on them, like move them to HDFS. If we set it to uint64_t::max, at least we can use a special value to filter them, and the special value is reasonable to set to the last tserver restart time.
http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.cc
File src/kudu/tablet/tablet.cc:
http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.cc@169
PS5, Line 169: since the last read operation "
> nit: "since the last new scan" would be more accurate. We could have create
I want to messure the time since access indeed.
Moved the metric into iterator now, it would be more accurate.
http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.cc@171
PS5, Line 171: since the tablet was created or the most rec
> grammar nit: "since the tablet was created or the most recent tserver resta
Done
http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.cc@177
PS5, Line 177: is tabl
> grammar nit: "written to"
Done
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 6
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
Gerrit-Comment-Date: Thu, 19 Dec 2019 05:41:45 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tablet] Add new metrics to indicate the last read/write time
Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/14912 )
Change subject: [tablet] Add new metrics to indicate the last read/write time
......................................................................
Patch Set 5:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.h
File src/kudu/tablet/tablet.h:
http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.h@663
PS5, Line 663: // uint64_t::max is returned if this tablet hasn't been read since tablet created or tserver
: // restarted.
> It seems there another pitfall in using these metrics even without replicat
Recency of writes is maintained across all replicas because the write metric measures the time since applying a write op, which happens on all replicas during a write.
It's trickier on read though since we only read from a single replica.
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 5
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
Gerrit-Comment-Date: Wed, 18 Dec 2019 21:37:47 +0000
Gerrit-HasComments: Yes
[kudu-CR] [metrics] Add a new metric 'last consult timestamp' for tablet
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/14912 )
Change subject: [metrics] Add a new metric 'last_consult_timestamp' for tablet
......................................................................
Patch Set 1:
(3 comments)
http://gerrit.cloudera.org:8080/#/c/14912/1/src/kudu/tablet/tablet_metrics.cc
File src/kudu/tablet/tablet_metrics.cc:
http://gerrit.cloudera.org:8080/#/c/14912/1/src/kudu/tablet/tablet_metrics.cc@136
PS1, Line 136: METRIC_DEFINE_gauge_uint64(tablet, last_consult_timestamp, "Last Consult Timestamp",
> Does it make sense to separate this into two metrics? One for writes and on
Agreed with Grant.
We should also say something about the units. Is it milliseconds since the UNIX epoch?
http://gerrit.cloudera.org:8080/#/c/14912/1/src/kudu/tablet/tablet_metrics.cc@326
PS1, Line 326: // #define MAXINIT(x) x(METRIC_##x.Instantiate(entity, 0, kMax))
So this speaks to a deeper issue: every tserver has its own clock, and those clocks may not be well-synchronized, either individually with some NTP servers, or with one another.
What are your expectations w.r.t. this metric? It seems like you don't want it to "go backwards" if the system clock changes value. Why is that? How do you expect each tserver's value to correlate to other tserver values?
An alternative that might be cleaner is, rather than storing a timestamp in the metric, to store, as part of the tablet, a MonoTime corresponding to the last write or last scan. Then, you could expose a FunctionGauge for "last consult time" that'd be calculated as Now - time_of_last_write (or time_of_last_scan). I guess the MonoTime part is orthogonal; you could use time() instead. But there's value in using a MonoTime because it's guaranteed not to drop, so you don't have to answer these trickier questions.
http://gerrit.cloudera.org:8080/#/c/14912/1/src/kudu/tserver/tablet_service.cc
File src/kudu/tserver/tablet_service.cc:
http://gerrit.cloudera.org:8080/#/c/14912/1/src/kudu/tserver/tablet_service.cc@2678
PS1, Line 2678: // First, the number of rows/cells/bytes actually returned to the user.
Seems like we could merge this with the code in L2702-2706. It'd be nice to avoid the duplicate checks and cognitive overhead of two separate metric updates.
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 1
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Tue, 17 Dec 2019 00:05:02 +0000
Gerrit-HasComments: Yes
[kudu-CR] [metrics] Add new metrics to indicate the last read/write time
Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Grant Henke has posted comments on this change. ( http://gerrit.cloudera.org:8080/14912 )
Change subject: [metrics] Add new metrics to indicate the last read/write time
......................................................................
Patch Set 3:
(4 comments)
http://gerrit.cloudera.org:8080/#/c/14912/1//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/14912/1//COMMIT_MSG@10
PS1, Line 10: 'last_write_elapsed_seconds' for tablet to indicate the last read or
> As what you wrote in https://kudu.apache.org/2019/03/05/transparent-hierarc
I see, then it's especially important to separate read and write metrics.
http://gerrit.cloudera.org:8080/#/c/14912/3/src/kudu/tablet/tablet.cc
File src/kudu/tablet/tablet.cc:
http://gerrit.cloudera.org:8080/#/c/14912/3/src/kudu/tablet/tablet.cc@167
PS3, Line 167: METRIC_DEFINE_gauge_uint64(tablet, last_read_elapsed_seconds, "Last Read Elapsed Seconds",
Maybe last_read_elapsed_time? That seems to be more common than listing the units in the metric name.
http://gerrit.cloudera.org:8080/#/c/14912/3/src/kudu/tablet/tablet.cc@169
PS3, Line 169: "Last read operation elapsed in seconds on this tablet.",
Maybe rephrase this to "The elapsed time, in seconds, since the last read operation on this tablet." Same with the comment on the LastReadElapsedSeconds function.
http://gerrit.cloudera.org:8080/#/c/14912/3/src/kudu/tablet/tablet.cc@173
PS3, Line 173: "Last write operation elapsed in seconds on this tablet.",
Maybe rephrase this to "The elapsed time, in seconds, since the last write operation on this tablet." Same with the comment on the LastWriteElapsedSeconds function.
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 3
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
Gerrit-Comment-Date: Tue, 17 Dec 2019 15:40:52 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tablet] Add new metrics to indicate the last read/write time
Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Alexey Serbin, Kudu Jenkins, Andrew Wong, Adar Dembo, Grant Henke,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/14912
to look at the new patch set (#8).
Change subject: [tablet] Add new metrics to indicate the last read/write time
......................................................................
[tablet] Add new metrics to indicate the last read/write time
Add new metrics 'last_read_elapsed_seconds' and
'last_write_elapsed_seconds' for tablet to indicate the last read and
write operation on the tablet. We can judge whether a tablet is 'hot'
or 'cold' by these metrics.
Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
---
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet.h
M src/kudu/tablet/tablet_metrics.h
M src/kudu/tserver/tablet_service.cc
4 files changed, 77 insertions(+), 17 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/12/14912/8
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 8
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
[kudu-CR] [tablet] Add new metrics to indicate the last read/write time
Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/14912 )
Change subject: [tablet] Add new metrics to indicate the last read/write time
......................................................................
Patch Set 7:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.h
File src/kudu/tablet/tablet.h:
http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.h@663
PS5, Line 663: // Tablet object was created on current tserver if it hasn't been read since then.
: uint64_t Last
> When use the metrics, we will merge different replicas' metric of the same
I think use the time when the Tablet object was created is more reasonable than either 0 or uint64_t::max, it has been read/wrriten since then indeed.
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 7
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
Gerrit-Comment-Date: Fri, 20 Dec 2019 02:59:29 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tablet] Add new metrics to indicate the last read/write time
Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/14912 )
Change subject: [tablet] Add new metrics to indicate the last read/write time
......................................................................
Patch Set 5:
(7 comments)
http://gerrit.cloudera.org:8080/#/c/14912/4//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/14912/4//COMMIT_MSG@7
PS4, Line 7: tablet]
> tablet ?
Done
http://gerrit.cloudera.org:8080/#/c/14912/4//COMMIT_MSG@10
PS4, Line 10: an
> and
Done
http://gerrit.cloudera.org:8080/#/c/14912/4/src/kudu/tablet/tablet.h
File src/kudu/tablet/tablet.h:
http://gerrit.cloudera.org:8080/#/c/14912/4/src/kudu/tablet/tablet.h@764
PS4, Line 764: rw_spinlock las
> Would rw_spinlock be a better option here? For read access, with rw_spinlo
Done
http://gerrit.cloudera.org:8080/#/c/14912/4/src/kudu/tablet/tablet.cc
File src/kudu/tablet/tablet.cc:
http://gerrit.cloudera.org:8080/#/c/14912/4/src/kudu/tablet/tablet.cc@167
PS4, Line 167: "Seconds Since Last Read",
> nit: maybe, "Seconds Since Last Read" for easier comprehension?
Done
http://gerrit.cloudera.org:8080/#/c/14912/4/src/kudu/tablet/tablet.cc@173
PS4, Line 173: "Seconds Since Last Write",
> nit: maybe, "Seconds Since Last Write"?
Done
http://gerrit.cloudera.org:8080/#/c/14912/4/src/kudu/tablet/tablet.cc@1993
PS4, Line 1993: (MonoTime::Now() - last_read_time_).ToSeconds());
> Would
Done
http://gerrit.cloudera.org:8080/#/c/14912/4/src/kudu/tablet/tablet.cc@2001
PS4, Line 2001: (MonoTime::Now() - last_write_time_).ToSeconds());
> Would
Done
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 5
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
Gerrit-Comment-Date: Wed, 18 Dec 2019 08:27:35 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tablet] Add new metrics to indicate the last read/write time
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/14912 )
Change subject: [tablet] Add new metrics to indicate the last read/write time
......................................................................
Patch Set 9:
(1 comment)
As you can see in the failed ASAN tests, the tablet_ access in Tablet::iterator::NextBlock isn't going to work because a concurrent tablet deletion could free the underlying memory. The scan itself is safe because the iterator holds references to all the sub-objects (diskrowsets, deltas, etc.) that are needed to satisfy the scan even if the Tablet itself is freed.
HandleNewScanRequest deals with this with the following code:
// It's important to keep the reference to the tablet for the case when the
// tablet replica's shutdown is run concurrently with the code below.
shared_ptr<Tablet> tablet;
RETURN_NOT_OK(GetTabletRef(replica, &tablet, error_code));
You could upgrade the raw Tablet pointer in Tablet::Iterator to a shared pointer, but I haven't thought through whether that's a good idea or not.
http://gerrit.cloudera.org:8080/#/c/14912/9/src/kudu/tablet/tablet.cc
File src/kudu/tablet/tablet.cc:
http://gerrit.cloudera.org:8080/#/c/14912/9/src/kudu/tablet/tablet.cc@2534
PS9, Line 2534: tablet_->UpdateLastReadElapsedSeconds();
Do you actually need this now that you're calling it in NextBlock? Doesn't scan creation also invoke NextBlock?
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 9
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
Gerrit-Comment-Date: Fri, 20 Dec 2019 19:31:29 +0000
Gerrit-HasComments: Yes
[kudu-CR] [metrics] Add new metrics to indicate the last read/write time
Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/14912 )
Change subject: [metrics] Add new metrics to indicate the last read/write time
......................................................................
Patch Set 3:
(4 comments)
http://gerrit.cloudera.org:8080/#/c/14912/1//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/14912/1//COMMIT_MSG@10
PS1, Line 10: 'last_write_elapsed_seconds' for tablet to indicate the last read or
> What will you do with the knowledge of a cold or hot tablet?
As what you wrote in https://kudu.apache.org/2019/03/05/transparent-hierarchical-storage-management-with-apache-kudu-and-impala.html, cold data may be copied to HDFS. We can design a reasonable window length if we know when it become cold.
http://gerrit.cloudera.org:8080/#/c/14912/1/src/kudu/tablet/tablet_metrics.cc
File src/kudu/tablet/tablet_metrics.cc:
http://gerrit.cloudera.org:8080/#/c/14912/1/src/kudu/tablet/tablet_metrics.cc@136
PS1, Line 136: METRIC_DEFINE_counter(tablet, bytes_flushed, "Bytes Flushed",
> Agreed with Grant.
Done
http://gerrit.cloudera.org:8080/#/c/14912/1/src/kudu/tablet/tablet_metrics.cc@325
PS1, Line 325: MINIT(rows_updated),
> Did you intend to leave this todo in? And the one below.
I‘ll fix it after another commit (https://gerrit.cloudera.org/c/14903/) merged.
http://gerrit.cloudera.org:8080/#/c/14912/1/src/kudu/tserver/tablet_service.cc
File src/kudu/tserver/tablet_service.cc:
http://gerrit.cloudera.org:8080/#/c/14912/1/src/kudu/tserver/tablet_service.cc@2678
PS1, Line 2678:
> Seems like we could merge this with the code in L2702-2706. It'd be nice to
Done
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 3
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
Gerrit-Comment-Date: Tue, 17 Dec 2019 14:43:56 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tablet] Add new metrics to indicate the last read/write time
Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Alexey Serbin, Kudu Jenkins, Andrew Wong, Adar Dembo, Grant Henke,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/14912
to look at the new patch set (#10).
Change subject: [tablet] Add new metrics to indicate the last read/write time
......................................................................
[tablet] Add new metrics to indicate the last read/write time
Add new metrics 'last_read_elapsed_seconds' and
'last_write_elapsed_seconds' for tablet to indicate the last read and
write operation on the tablet. We can judge whether a tablet is 'hot'
or 'cold' by these metrics.
Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
---
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet.h
M src/kudu/tablet/tablet_metrics.h
M src/kudu/tserver/tablet_service.cc
4 files changed, 78 insertions(+), 17 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/12/14912/10
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 10
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
[kudu-CR] [tablet] Add new metrics to indicate the last read/write time
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/14912 )
Change subject: [tablet] Add new metrics to indicate the last read/write time
......................................................................
Patch Set 5: Code-Review+1
(1 comment)
http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.h
File src/kudu/tablet/tablet.h:
http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.h@663
PS5, Line 663: // uint64_t::max is returned if this tablet hasn't been read since tablet created or tserver
: // restarted.
Curious why you chose to return uint64_t::max and not 0 in these cases.
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 5
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
Gerrit-Comment-Date: Wed, 18 Dec 2019 17:31:36 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tablet] Add new metrics to indicate the last read/write time
Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Alexey Serbin, Kudu Jenkins, Adar Dembo, Grant Henke,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/14912
to look at the new patch set (#5).
Change subject: [tablet] Add new metrics to indicate the last read/write time
......................................................................
[tablet] Add new metrics to indicate the last read/write time
Add new metrics 'last_read_elapsed_seconds' and
'last_write_elapsed_seconds' for tablet to indicate the last read and
write operation on the tablet. We can judge whether a tablet is 'hot'
or 'cold' by these metrics.
Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
---
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet.h
M src/kudu/tablet/tablet_metrics.h
M src/kudu/tserver/tablet_service.cc
4 files changed, 72 insertions(+), 16 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/12/14912/5
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 5
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
[kudu-CR] [tablet] Add new metrics to indicate the last read/write time
Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/14912 )
Change subject: [tablet] Add new metrics to indicate the last read/write time
......................................................................
Patch Set 5:
(4 comments)
http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.h
File src/kudu/tablet/tablet.h:
http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.h@663
PS5, Line 663: // uint64_t::max is returned if this tablet hasn't been read since tablet created or tserver
: // restarted.
> Curious why you chose to return uint64_t::max and not 0 in these cases.
My guess is the expected usage of this is to see what tablets have not been written to recently, but there's a challenge in that if you've just restarted a tserver, this metric would be 0 for all tablets. That implies that they've all been accessed very recently, which is less true than using the max value -- they've never been accessed, so the time since last access is Inf.
http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.cc
File src/kudu/tablet/tablet.cc:
http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.cc@169
PS5, Line 169: since the last read operation "
nit: "since the last new scan" would be more accurate. We could have created a new scanner 10 minutes ago and continue to iterate on it every 5 seconds since then, and this metric would be 10 minutes, right?
If you want to measure time since access, we might have to push the metric into the iterator, but I don't have strong opinions on it, as long as it's clear what this is measuring.
http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.cc@171
PS5, Line 171: since tablet created or tserver restarted.",
grammar nit: "since the tablet was created or the most recent tserver restart."
Same below.
http://gerrit.cloudera.org:8080/#/c/14912/5/src/kudu/tablet/tablet.cc@177
PS5, Line 177: written
grammar nit: "written to"
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 5
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
Gerrit-Comment-Date: Wed, 18 Dec 2019 19:37:36 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tablet] Add new metrics to indicate the last read/write time
Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Alexey Serbin, Kudu Jenkins, Andrew Wong, Adar Dembo, Grant Henke,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/14912
to look at the new patch set (#7).
Change subject: [tablet] Add new metrics to indicate the last read/write time
......................................................................
[tablet] Add new metrics to indicate the last read/write time
Add new metrics 'last_read_elapsed_seconds' and
'last_write_elapsed_seconds' for tablet to indicate the last read and
write operation on the tablet. We can judge whether a tablet is 'hot'
or 'cold' by these metrics.
Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
---
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet.h
M src/kudu/tablet/tablet_metrics.h
M src/kudu/tserver/tablet_service.cc
4 files changed, 78 insertions(+), 17 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/12/14912/7
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 7
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <40...@qq.com>
[kudu-CR] [metrics] Add new metrics to indicate the last read/write time
Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Kudu Jenkins, Adar Dembo, Grant Henke,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/14912
to look at the new patch set (#2).
Change subject: [metrics] Add new metrics to indicate the last read/write time
......................................................................
[metrics] Add new metrics to indicate the last read/write time
Add new metrics 'last_read_elapsed_seconds' and
'last_write_elapsed_seconds' for tablet to indicate the last read or
write operation on the tablet. We can judge whether a tablet is 'hot'
or 'cold' by these metrics.
Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
---
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet.h
M src/kudu/tablet/tablet_metrics.h
M src/kudu/tserver/tablet_service.cc
4 files changed, 52 insertions(+), 15 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/12/14912/2
--
To view, visit http://gerrit.cloudera.org:8080/14912
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I90738ba90eaa8f78c8d721dde2eed2b723d5572d
Gerrit-Change-Number: 14912
Gerrit-PatchSet: 2
Gerrit-Owner: Yingchun Lai <40...@qq.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)