You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Alexey Serbin (Code Review)" <ge...@cloudera.org> on 2017/12/01 20:04:12 UTC

[kudu-CR] [util] operators for MonoDelta addition/subtraction

Alexey Serbin has uploaded this change for review. ( http://gerrit.cloudera.org:8080/8717


Change subject: [util] operators for MonoDelta addition/subtraction
......................................................................

[util] operators for MonoDelta addition/subtraction

Introduced a pair of operators to add and subtract MonoDelta instances.
The result is a MonoDelta representing the result time interval.

Change-Id: Idc1fe1e2dd3b47b6a0d9ef977749c7c27dbf168c
---
M src/kudu/util/monotime-test.cc
M src/kudu/util/monotime.cc
M src/kudu/util/monotime.h
3 files changed, 79 insertions(+), 0 deletions(-)



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc1fe1e2dd3b47b6a0d9ef977749c7c27dbf168c
Gerrit-Change-Number: 8717
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>

[kudu-CR] [util] operators for MonoDelta addition/subtraction

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

Change subject: [util] operators for MonoDelta addition/subtraction
......................................................................


Patch Set 2: Code-Review+1

(2 comments)

http://gerrit.cloudera.org:8080/#/c/8717/2/src/kudu/util/monotime.h
File src/kudu/util/monotime.h:

http://gerrit.cloudera.org:8080/#/c/8717/2/src/kudu/util/monotime.h@323
PS2, Line 323: MonoDelta KUDU_EXPORT operator-(const MonoDelta& lhs, const MonoDelta& rhs);
> warning: redundant 'operator-' declaration [readability-redundant-declarati
this looks like a clang-tidy bug and we should add // NOLINT(readability-redundant-declaration)


http://gerrit.cloudera.org:8080/#/c/8717/2/src/kudu/util/monotime.h@330
PS2, Line 330: MonoDelta KUDU_EXPORT operator+(const MonoDelta& lhs, const MonoDelta& rhs);
> warning: redundant 'operator+' declaration [readability-redundant-declarati
and here



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc1fe1e2dd3b47b6a0d9ef977749c7c27dbf168c
Gerrit-Change-Number: 8717
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Comment-Date: Mon, 04 Dec 2017 23:43:43 +0000
Gerrit-HasComments: Yes

[kudu-CR] [util] operators for MonoDelta addition/subtraction

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

Change subject: [util] operators for MonoDelta addition/subtraction
......................................................................

[util] operators for MonoDelta addition/subtraction

Introduced a pair of operators to add and subtract MonoDelta instances.
The result is a MonoDelta representing the result time interval.

I'm going to use the newly introduced functionality in follow-up
patches.

Change-Id: Idc1fe1e2dd3b47b6a0d9ef977749c7c27dbf168c
Reviewed-on: http://gerrit.cloudera.org:8080/8717
Reviewed-by: Andrew Wong <aw...@cloudera.com>
Tested-by: Kudu Jenkins
---
M src/kudu/util/monotime-test.cc
M src/kudu/util/monotime.cc
M src/kudu/util/monotime.h
3 files changed, 81 insertions(+), 0 deletions(-)

Approvals:
  Andrew Wong: Looks good to me, approved
  Kudu Jenkins: Verified

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Idc1fe1e2dd3b47b6a0d9ef977749c7c27dbf168c
Gerrit-Change-Number: 8717
Gerrit-PatchSet: 5
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot (241)

[kudu-CR] [util] operators for MonoDelta addition/subtraction

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

Change subject: [util] operators for MonoDelta addition/subtraction
......................................................................


Patch Set 4: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc1fe1e2dd3b47b6a0d9ef977749c7c27dbf168c
Gerrit-Change-Number: 8717
Gerrit-PatchSet: 4
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Fri, 14 Aug 2020 22:49:20 +0000
Gerrit-HasComments: No

[kudu-CR] [util] operators for MonoDelta addition/subtraction

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

Change subject: [util] operators for MonoDelta addition/subtraction
......................................................................


Patch Set 1: Code-Review+1

(1 comment)

http://gerrit.cloudera.org:8080/#/c/8717/1/src/kudu/util/monotime-test.cc
File src/kudu/util/monotime-test.cc:

http://gerrit.cloudera.org:8080/#/c/8717/1/src/kudu/util/monotime-test.cc@295
PS1, Line 295: EXPECT_TRUE
EXPECT_EQ ?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc1fe1e2dd3b47b6a0d9ef977749c7c27dbf168c
Gerrit-Change-Number: 8717
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Comment-Date: Fri, 01 Dec 2017 20:21:46 +0000
Gerrit-HasComments: Yes

[kudu-CR] [util] operators for MonoDelta addition/subtraction

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Mike Percy, Kudu Jenkins, Andrew Wong, 

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

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

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

Change subject: [util] operators for MonoDelta addition/subtraction
......................................................................

[util] operators for MonoDelta addition/subtraction

Introduced a pair of operators to add and subtract MonoDelta instances.
The result is a MonoDelta representing the result time interval.

I'm going to use the newly introduced functionality in follow-up
patches.

Change-Id: Idc1fe1e2dd3b47b6a0d9ef977749c7c27dbf168c
---
M src/kudu/util/monotime-test.cc
M src/kudu/util/monotime.cc
M src/kudu/util/monotime.h
3 files changed, 81 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/17/8717/4
-- 
To view, visit http://gerrit.cloudera.org:8080/8717
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idc1fe1e2dd3b47b6a0d9ef977749c7c27dbf168c
Gerrit-Change-Number: 8717
Gerrit-PatchSet: 4
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot (241)

[kudu-CR] [util] operators for MonoDelta addition/subtraction

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

Change subject: [util] operators for MonoDelta addition/subtraction
......................................................................


Patch Set 3: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc1fe1e2dd3b47b6a0d9ef977749c7c27dbf168c
Gerrit-Change-Number: 8717
Gerrit-PatchSet: 3
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Fri, 14 Aug 2020 22:41:12 +0000
Gerrit-HasComments: No

[kudu-CR] [util] operators for MonoDelta addition/subtraction

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

Change subject: [util] operators for MonoDelta addition/subtraction
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/8717/1/src/kudu/util/monotime.h
File src/kudu/util/monotime.h:

http://gerrit.cloudera.org:8080/#/c/8717/1/src/kudu/util/monotime.h@136
PS1, Line 136:   friend MonoDelta operator-(const MonoDelta&, const MonoDelta&);
             :   friend MonoDelta operator+(const MonoDelta&, const MonoDelta&);
not needed?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc1fe1e2dd3b47b6a0d9ef977749c7c27dbf168c
Gerrit-Change-Number: 8717
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Comment-Date: Fri, 01 Dec 2017 20:19:13 +0000
Gerrit-HasComments: Yes

[kudu-CR] [util] operators for MonoDelta addition/subtraction

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

Change subject: [util] operators for MonoDelta addition/subtraction
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/8717/2/src/kudu/util/monotime.h
File src/kudu/util/monotime.h:

http://gerrit.cloudera.org:8080/#/c/8717/2/src/kudu/util/monotime.h@323
PS2, Line 323: MonoDelta KUDU_EXPORT operator-(const MonoDelta& lhs, const MonoDelta& rhs);
> this looks like a clang-tidy bug and we should add // NOLINT(readability-re
It seems current version of clang-tidy is no longer affected by such a bug.


http://gerrit.cloudera.org:8080/#/c/8717/2/src/kudu/util/monotime.h@330
PS2, Line 330: MonoDelta KUDU_EXPORT operator+(const MonoDelta& lhs, const MonoDelta& rhs);
> and here
ditto



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc1fe1e2dd3b47b6a0d9ef977749c7c27dbf168c
Gerrit-Change-Number: 8717
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Fri, 14 Aug 2020 22:37:30 +0000
Gerrit-HasComments: Yes

[kudu-CR] [util] operators for MonoDelta addition/subtraction

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Mike Percy, Kudu Jenkins, Andrew Wong, 

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

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

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

Change subject: [util] operators for MonoDelta addition/subtraction
......................................................................

[util] operators for MonoDelta addition/subtraction

Introduced a pair of operators to add and subtract MonoDelta instances.
The result is a MonoDelta representing the result time interval.

Change-Id: Idc1fe1e2dd3b47b6a0d9ef977749c7c27dbf168c
---
M src/kudu/util/monotime-test.cc
M src/kudu/util/monotime.cc
M src/kudu/util/monotime.h
3 files changed, 79 insertions(+), 0 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idc1fe1e2dd3b47b6a0d9ef977749c7c27dbf168c
Gerrit-Change-Number: 8717
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot

[kudu-CR] [util] operators for MonoDelta addition/subtraction

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

Change subject: [util] operators for MonoDelta addition/subtraction
......................................................................


Patch Set 1: Code-Review+1


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc1fe1e2dd3b47b6a0d9ef977749c7c27dbf168c
Gerrit-Change-Number: 8717
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Comment-Date: Fri, 01 Dec 2017 20:26:44 +0000
Gerrit-HasComments: No

[kudu-CR] [util] operators for MonoDelta addition/subtraction

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

Change subject: [util] operators for MonoDelta addition/subtraction
......................................................................


Patch Set 1:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/8717/1/src/kudu/util/monotime-test.cc
File src/kudu/util/monotime-test.cc:

http://gerrit.cloudera.org:8080/#/c/8717/1/src/kudu/util/monotime-test.cc@295
PS1, Line 295: EXPECT_TRUE
> EXPECT_EQ ?
Done


http://gerrit.cloudera.org:8080/#/c/8717/1/src/kudu/util/monotime.h
File src/kudu/util/monotime.h:

http://gerrit.cloudera.org:8080/#/c/8717/1/src/kudu/util/monotime.h@136
PS1, Line 136:   friend MonoDelta operator-(const MonoDelta&, const MonoDelta&);
             :   friend MonoDelta operator+(const MonoDelta&, const MonoDelta&);
> not needed?
It's needed because those operators use the private constructor of the class: MonoDelta(int64_t)


http://gerrit.cloudera.org:8080/#/c/8717/1/src/kudu/util/monotime.h@323
PS1, Line 323: MonoDelta KUDU_EXPORT operator-(const MonoDelta& lhs, const MonoDelta& rhs);
> warning: redundant 'operator-' declaration [readability-redundant-declarati
I'm curious what's redundant here?  The previous declaration was in the context of the friendship.

I'm going to ignore this clang-tidy warning.


http://gerrit.cloudera.org:8080/#/c/8717/1/src/kudu/util/monotime.h@330
PS1, Line 330: MonoDelta KUDU_EXPORT operator+(const MonoDelta& lhs, const MonoDelta& rhs);
> warning: redundant 'operator+' declaration [readability-redundant-declarati
ditto



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc1fe1e2dd3b47b6a0d9ef977749c7c27dbf168c
Gerrit-Change-Number: 8717
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-Comment-Date: Fri, 01 Dec 2017 21:31:55 +0000
Gerrit-HasComments: Yes

[kudu-CR] [util] operators for MonoDelta addition/subtraction

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Mike Percy, Kudu Jenkins, Andrew Wong, 

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

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

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

Change subject: [util] operators for MonoDelta addition/subtraction
......................................................................

[util] operators for MonoDelta addition/subtraction

Introduced a pair of operators to add and subtract MonoDelta instances.
The result is a MonoDelta representing the result time interval.

I'm going to use the newly introduced functionality in follow-up
patches.

Change-Id: Idc1fe1e2dd3b47b6a0d9ef977749c7c27dbf168c
---
M src/kudu/util/monotime-test.cc
M src/kudu/util/monotime.cc
M src/kudu/util/monotime.h
3 files changed, 81 insertions(+), 0 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idc1fe1e2dd3b47b6a0d9ef977749c7c27dbf168c
Gerrit-Change-Number: 8717
Gerrit-PatchSet: 3
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Tidy Bot (241)