You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Will Berkeley (Code Review)" <ge...@cloudera.org> on 2018/06/12 17:37:38 UTC
[kudu-CR] [tools] Add simple util for version parsing
Will Berkeley has uploaded this change for review. ( http://gerrit.cloudera.org:8080/10698
Change subject: [tools] Add simple util for version parsing
......................................................................
[tools] Add simple util for version parsing
This adds a struct and parsing function to parse versions of the form
<major>.<minor>.<maintenance>-<extra>
This can be used along with ksck's version reporting or ad hoc
version-gathering to determine how a tool should function when operating
against a cluster running certain Kudu versions.
Its first application will be in a follow-up.
Change-Id: I0bcf3b10b699e89ad489144611990702dec8af19
---
M src/kudu/tools/CMakeLists.txt
A src/kudu/tools/tool_version_util-test.cc
A src/kudu/tools/tool_version_util.cc
A src/kudu/tools/tool_version_util.h
4 files changed, 209 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/98/10698/1
--
To view, visit http://gerrit.cloudera.org:8080/10698
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0bcf3b10b699e89ad489144611990702dec8af19
Gerrit-Change-Number: 10698
Gerrit-PatchSet: 1
Gerrit-Owner: Will Berkeley <wd...@gmail.com>
[kudu-CR] [tools] Add simple util for version parsing
Posted by "Will Berkeley (Code Review)" <ge...@cloudera.org>.
Will Berkeley has posted comments on this change. ( http://gerrit.cloudera.org:8080/10698 )
Change subject: [tools] Add simple util for version parsing
......................................................................
Patch Set 4: Verified+1
I'm looking into the precommit failure, which looks like some kind of race or memory issue in curl or SSL code, and definitely unrelated to this change.
--
To view, visit http://gerrit.cloudera.org:8080/10698
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0bcf3b10b699e89ad489144611990702dec8af19
Gerrit-Change-Number: 10698
Gerrit-PatchSet: 4
Gerrit-Owner: Will Berkeley <wd...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Thu, 14 Jun 2018 18:39:15 +0000
Gerrit-HasComments: No
[kudu-CR] [tools] Add simple util for version parsing
Posted by "Will Berkeley (Code Review)" <ge...@cloudera.org>.
Hello Mike Percy, Alexey Serbin, Kudu Jenkins, Adar Dembo,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/10698
to look at the new patch set (#4).
Change subject: [tools] Add simple util for version parsing
......................................................................
[tools] Add simple util for version parsing
This adds a struct and parsing function to parse versions of the form
<major>.<minor>.<maintenance>-<extra>
This can be used along with ksck's version reporting or ad hoc
version-gathering to determine how a tool should function when operating
against a cluster running certain Kudu versions.
Its first application will be in a follow-up.
Change-Id: I0bcf3b10b699e89ad489144611990702dec8af19
---
M src/kudu/util/CMakeLists.txt
A src/kudu/util/version_util-test.cc
A src/kudu/util/version_util.cc
A src/kudu/util/version_util.h
4 files changed, 209 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/98/10698/4
--
To view, visit http://gerrit.cloudera.org:8080/10698
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0bcf3b10b699e89ad489144611990702dec8af19
Gerrit-Change-Number: 10698
Gerrit-PatchSet: 4
Gerrit-Owner: Will Berkeley <wd...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
[kudu-CR] [tools] Add simple util for version parsing
Posted by "Will Berkeley (Code Review)" <ge...@cloudera.org>.
Hello Mike Percy, Alexey Serbin, Kudu Jenkins, Adar Dembo,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/10698
to look at the new patch set (#3).
Change subject: [tools] Add simple util for version parsing
......................................................................
[tools] Add simple util for version parsing
This adds a struct and parsing function to parse versions of the form
<major>.<minor>.<maintenance>-<extra>
This can be used along with ksck's version reporting or ad hoc
version-gathering to determine how a tool should function when operating
against a cluster running certain Kudu versions.
Its first application will be in a follow-up.
Change-Id: I0bcf3b10b699e89ad489144611990702dec8af19
---
M src/kudu/util/CMakeLists.txt
A src/kudu/util/version_util-test.cc
A src/kudu/util/version_util.cc
A src/kudu/util/version_util.h
4 files changed, 208 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/98/10698/3
--
To view, visit http://gerrit.cloudera.org:8080/10698
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0bcf3b10b699e89ad489144611990702dec8af19
Gerrit-Change-Number: 10698
Gerrit-PatchSet: 3
Gerrit-Owner: Will Berkeley <wd...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
[kudu-CR] [tools] Add simple util for version parsing
Posted by "Will Berkeley (Code Review)" <ge...@cloudera.org>.
Will Berkeley has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/10698 )
Change subject: [tools] Add simple util for version parsing
......................................................................
[tools] Add simple util for version parsing
This adds a struct and parsing function to parse versions of the form
<major>.<minor>.<maintenance>-<extra>
This can be used along with ksck's version reporting or ad hoc
version-gathering to determine how a tool should function when operating
against a cluster running certain Kudu versions.
Its first application will be in a follow-up.
Change-Id: I0bcf3b10b699e89ad489144611990702dec8af19
Reviewed-on: http://gerrit.cloudera.org:8080/10698
Tested-by: Will Berkeley <wd...@gmail.com>
Reviewed-by: Adar Dembo <ad...@cloudera.com>
---
M src/kudu/util/CMakeLists.txt
A src/kudu/util/version_util-test.cc
A src/kudu/util/version_util.cc
A src/kudu/util/version_util.h
4 files changed, 209 insertions(+), 0 deletions(-)
Approvals:
Will Berkeley: Verified
Adar Dembo: Looks good to me, approved
--
To view, visit http://gerrit.cloudera.org:8080/10698
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I0bcf3b10b699e89ad489144611990702dec8af19
Gerrit-Change-Number: 10698
Gerrit-PatchSet: 5
Gerrit-Owner: Will Berkeley <wd...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
[kudu-CR] [tools] Add simple util for version parsing
Posted by "Will Berkeley (Code Review)" <ge...@cloudera.org>.
Will Berkeley has posted comments on this change. ( http://gerrit.cloudera.org:8080/10698 )
Change subject: [tools] Add simple util for version parsing
......................................................................
Patch Set 3:
(3 comments)
http://gerrit.cloudera.org:8080/#/c/10698/3/src/kudu/util/version_util.h
File src/kudu/util/version_util.h:
http://gerrit.cloudera.org:8080/#/c/10698/3/src/kudu/util/version_util.h@39
PS3, Line 39: friend
> why friend?
It's necessary to declare the overload in the Version struct. But it can also be declared as a function outside.
http://gerrit.cloudera.org:8080/#/c/10698/3/src/kudu/util/version_util.h@53
PS3, Line 53: // Parse 'version_str' into 'tvi'. 'tvi' must not be null.
> Not 'tvi' anymore.
Done
http://gerrit.cloudera.org:8080/#/c/10698/3/src/kudu/util/version_util.cc
File src/kudu/util/version_util.cc:
http://gerrit.cloudera.org:8080/#/c/10698/3/src/kudu/util/version_util.cc@55
PS3, Line 55: Status ParseVersion(const std::string& version_str,
> Don't need std:: prefix.
Done
--
To view, visit http://gerrit.cloudera.org:8080/10698
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0bcf3b10b699e89ad489144611990702dec8af19
Gerrit-Change-Number: 10698
Gerrit-PatchSet: 3
Gerrit-Owner: Will Berkeley <wd...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Thu, 14 Jun 2018 17:19:54 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] Add simple util for version parsing
Posted by "Will Berkeley (Code Review)" <ge...@cloudera.org>.
Will Berkeley has posted comments on this change. ( http://gerrit.cloudera.org:8080/10698 )
Change subject: [tools] Add simple util for version parsing
......................................................................
Patch Set 3: Verified+1
--
To view, visit http://gerrit.cloudera.org:8080/10698
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0bcf3b10b699e89ad489144611990702dec8af19
Gerrit-Change-Number: 10698
Gerrit-PatchSet: 3
Gerrit-Owner: Will Berkeley <wd...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Wed, 13 Jun 2018 07:36:07 +0000
Gerrit-HasComments: No
[kudu-CR] [tools] Add simple util for version parsing
Posted by "Will Berkeley (Code Review)" <ge...@cloudera.org>.
Will Berkeley has posted comments on this change. ( http://gerrit.cloudera.org:8080/10698 )
Change subject: [tools] Add simple util for version parsing
......................................................................
Patch Set 1:
> Do you think util/version_util.{cc,h} would be a better home for
> this?
I intended it to apply only to tools and not more generally. Do you really want it there?
> BTW, for version comparisons we've largely gotten by using
> autodigit_{less,greater} from gutil/strings/numbers.{cc,h}. You can
> find a few examples across the codebase.
I think parsing more stringently works fine here, though it's good to know such a function exists.
--
To view, visit http://gerrit.cloudera.org:8080/10698
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0bcf3b10b699e89ad489144611990702dec8af19
Gerrit-Change-Number: 10698
Gerrit-PatchSet: 1
Gerrit-Owner: Will Berkeley <wd...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Tue, 12 Jun 2018 22:23:50 +0000
Gerrit-HasComments: No
[kudu-CR] [tools] Add simple util for version parsing
Posted by "Will Berkeley (Code Review)" <ge...@cloudera.org>.
Will Berkeley has posted comments on this change. ( http://gerrit.cloudera.org:8080/10698 )
Change subject: [tools] Add simple util for version parsing
......................................................................
Patch Set 1:
> > > Do you think util/version_util.{cc,h} would be a better home
> for this?
> >
> > I intended it to apply only to tools and not more generally. Do
> you really want it there?
>
> I don't see anything tools-specific about the patch though; you've
> defined a version as x.y.z-extra, which is exactly what
> VersionInfo::GetShortVersionInfo() will return. So the fit seems
> pretty clear to me.
Done
--
To view, visit http://gerrit.cloudera.org:8080/10698
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0bcf3b10b699e89ad489144611990702dec8af19
Gerrit-Change-Number: 10698
Gerrit-PatchSet: 1
Gerrit-Owner: Will Berkeley <wd...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Tue, 12 Jun 2018 23:10:57 +0000
Gerrit-HasComments: No
[kudu-CR] [tools] Add simple util for version parsing
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/10698 )
Change subject: [tools] Add simple util for version parsing
......................................................................
Patch Set 4: Code-Review+2
> I'm looking into the precommit failure, which looks like some kind of race or memory issue in curl or SSL code, and definitely unrelated to this change.
Check the curl bug tracker (on github I think); maybe this is a known issue? I don't think we're misusing it in our EasyCurl.
--
To view, visit http://gerrit.cloudera.org:8080/10698
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0bcf3b10b699e89ad489144611990702dec8af19
Gerrit-Change-Number: 10698
Gerrit-PatchSet: 4
Gerrit-Owner: Will Berkeley <wd...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Thu, 14 Jun 2018 18:59:35 +0000
Gerrit-HasComments: No
[kudu-CR] [tools] Add simple util for version parsing
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/10698 )
Change subject: [tools] Add simple util for version parsing
......................................................................
Patch Set 3:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/10698/3/src/kudu/util/version_util.h
File src/kudu/util/version_util.h:
http://gerrit.cloudera.org:8080/#/c/10698/3/src/kudu/util/version_util.h@53
PS3, Line 53: // Parse 'version_str' into 'tvi'. 'tvi' must not be null.
Not 'tvi' anymore.
http://gerrit.cloudera.org:8080/#/c/10698/3/src/kudu/util/version_util.cc
File src/kudu/util/version_util.cc:
http://gerrit.cloudera.org:8080/#/c/10698/3/src/kudu/util/version_util.cc@55
PS3, Line 55: Status ParseVersion(const std::string& version_str,
Don't need std:: prefix.
--
To view, visit http://gerrit.cloudera.org:8080/10698
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0bcf3b10b699e89ad489144611990702dec8af19
Gerrit-Change-Number: 10698
Gerrit-PatchSet: 3
Gerrit-Owner: Will Berkeley <wd...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Wed, 13 Jun 2018 18:56:32 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] Add simple util for version parsing
Posted by "Will Berkeley (Code Review)" <ge...@cloudera.org>.
Will Berkeley has posted comments on this change. ( http://gerrit.cloudera.org:8080/10698 )
Change subject: [tools] Add simple util for version parsing
......................................................................
Patch Set 2:
(3 comments)
http://gerrit.cloudera.org:8080/#/c/10698/2/src/kudu/util/CMakeLists.txt
File src/kudu/util/CMakeLists.txt:
http://gerrit.cloudera.org:8080/#/c/10698/2/src/kudu/util/CMakeLists.txt@475
PS2, Line 475: ADD_KUDU_TEST(version_util-test)
> What's this doing here? Shouldn't it be above with the rest of the regular
Done
http://gerrit.cloudera.org:8080/#/c/10698/2/src/kudu/util/version_util.h
File src/kudu/util/version_util.h:
http://gerrit.cloudera.org:8080/#/c/10698/2/src/kudu/util/version_util.h@35
PS2, Line 35: ToolVersionInfo
> Maybe just Version? The unparsed format is super generic and can be applied
Done
http://gerrit.cloudera.org:8080/#/c/10698/2/src/kudu/util/version_util.cc
File src/kudu/util/version_util.cc:
http://gerrit.cloudera.org:8080/#/c/10698/2/src/kudu/util/version_util.cc@46
PS2, Line 46: return os << Substitute("major: $0, minor: $1, maintenance: $2, extra: $3",
> You wouldn't prefer just spitting out the raw version?
I implemented it for the ASSERT_EQ macros, where it's good to be totally clear about what field is what. Can do just the raw version as well.
--
To view, visit http://gerrit.cloudera.org:8080/10698
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0bcf3b10b699e89ad489144611990702dec8af19
Gerrit-Change-Number: 10698
Gerrit-PatchSet: 2
Gerrit-Owner: Will Berkeley <wd...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Wed, 13 Jun 2018 06:46:22 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] Add simple util for version parsing
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/10698 )
Change subject: [tools] Add simple util for version parsing
......................................................................
Patch Set 1:
Do you think util/version_util.{cc,h} would be a better home for this?
BTW, for version comparisons we've largely gotten by using autodigit_{less,greater} from gutil/strings/numbers.{cc,h}. You can find a few examples across the codebase.
--
To view, visit http://gerrit.cloudera.org:8080/10698
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0bcf3b10b699e89ad489144611990702dec8af19
Gerrit-Change-Number: 10698
Gerrit-PatchSet: 1
Gerrit-Owner: Will Berkeley <wd...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Comment-Date: Tue, 12 Jun 2018 17:45:57 +0000
Gerrit-HasComments: No
[kudu-CR] [tools] Add simple util for version parsing
Posted by "Will Berkeley (Code Review)" <ge...@cloudera.org>.
Will Berkeley has removed a vote on this change.
Change subject: [tools] Add simple util for version parsing
......................................................................
Removed Verified-1 by Kudu Jenkins (120)
--
To view, visit http://gerrit.cloudera.org:8080/10698
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: I0bcf3b10b699e89ad489144611990702dec8af19
Gerrit-Change-Number: 10698
Gerrit-PatchSet: 4
Gerrit-Owner: Will Berkeley <wd...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
[kudu-CR] [tools] Add simple util for version parsing
Posted by "Will Berkeley (Code Review)" <ge...@cloudera.org>.
Hello Mike Percy, Alexey Serbin, Kudu Jenkins, Adar Dembo,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/10698
to look at the new patch set (#2).
Change subject: [tools] Add simple util for version parsing
......................................................................
[tools] Add simple util for version parsing
This adds a struct and parsing function to parse versions of the form
<major>.<minor>.<maintenance>-<extra>
This can be used along with ksck's version reporting or ad hoc
version-gathering to determine how a tool should function when operating
against a cluster running certain Kudu versions.
Its first application will be in a follow-up.
Change-Id: I0bcf3b10b699e89ad489144611990702dec8af19
---
M src/kudu/util/CMakeLists.txt
A src/kudu/util/version_util-test.cc
A src/kudu/util/version_util.cc
A src/kudu/util/version_util.h
4 files changed, 204 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/98/10698/2
--
To view, visit http://gerrit.cloudera.org:8080/10698
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0bcf3b10b699e89ad489144611990702dec8af19
Gerrit-Change-Number: 10698
Gerrit-PatchSet: 2
Gerrit-Owner: Will Berkeley <wd...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
[kudu-CR] [tools] Add simple util for version parsing
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/10698 )
Change subject: [tools] Add simple util for version parsing
......................................................................
Patch Set 1:
> > Do you think util/version_util.{cc,h} would be a better home for this?
>
> I intended it to apply only to tools and not more generally. Do you really want it there?
I don't see anything tools-specific about the patch though; you've defined a version as x.y.z-extra, which is exactly what VersionInfo::GetShortVersionInfo() will return. So the fit seems pretty clear to me.
--
To view, visit http://gerrit.cloudera.org:8080/10698
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0bcf3b10b699e89ad489144611990702dec8af19
Gerrit-Change-Number: 10698
Gerrit-PatchSet: 1
Gerrit-Owner: Will Berkeley <wd...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Tue, 12 Jun 2018 22:51:35 +0000
Gerrit-HasComments: No
[kudu-CR] [tools] Add simple util for version parsing
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/10698 )
Change subject: [tools] Add simple util for version parsing
......................................................................
Patch Set 2:
(3 comments)
http://gerrit.cloudera.org:8080/#/c/10698/2/src/kudu/util/CMakeLists.txt
File src/kudu/util/CMakeLists.txt:
http://gerrit.cloudera.org:8080/#/c/10698/2/src/kudu/util/CMakeLists.txt@475
PS2, Line 475: ADD_KUDU_TEST(version_util-test)
What's this doing here? Shouldn't it be above with the rest of the regular util tests?
http://gerrit.cloudera.org:8080/#/c/10698/2/src/kudu/util/version_util.h
File src/kudu/util/version_util.h:
http://gerrit.cloudera.org:8080/#/c/10698/2/src/kudu/util/version_util.h@35
PS2, Line 35: ToolVersionInfo
Maybe just Version? The unparsed format is super generic and can be applied almost anywhere.
http://gerrit.cloudera.org:8080/#/c/10698/2/src/kudu/util/version_util.cc
File src/kudu/util/version_util.cc:
http://gerrit.cloudera.org:8080/#/c/10698/2/src/kudu/util/version_util.cc@46
PS2, Line 46: return os << Substitute("major: $0, minor: $1, maintenance: $2, extra: $3",
You wouldn't prefer just spitting out the raw version?
Also, I'd implement a ToString() and call out to it here.
--
To view, visit http://gerrit.cloudera.org:8080/10698
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0bcf3b10b699e89ad489144611990702dec8af19
Gerrit-Change-Number: 10698
Gerrit-PatchSet: 2
Gerrit-Owner: Will Berkeley <wd...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Wed, 13 Jun 2018 04:27:57 +0000
Gerrit-HasComments: Yes
[kudu-CR] [tools] Add simple util for version parsing
Posted by "Will Berkeley (Code Review)" <ge...@cloudera.org>.
Will Berkeley has removed a vote on this change.
Change subject: [tools] Add simple util for version parsing
......................................................................
Removed Verified-1 by Kudu Jenkins (120)
--
To view, visit http://gerrit.cloudera.org:8080/10698
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: I0bcf3b10b699e89ad489144611990702dec8af19
Gerrit-Change-Number: 10698
Gerrit-PatchSet: 3
Gerrit-Owner: Will Berkeley <wd...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
[kudu-CR] [tools] Add simple util for version parsing
Posted by "Mike Percy (Code Review)" <ge...@cloudera.org>.
Mike Percy has posted comments on this change. ( http://gerrit.cloudera.org:8080/10698 )
Change subject: [tools] Add simple util for version parsing
......................................................................
Patch Set 3: Code-Review+1
(1 comment)
overall lgtm modulo Adar's comments and the friend question
http://gerrit.cloudera.org:8080/#/c/10698/3/src/kudu/util/version_util.h
File src/kudu/util/version_util.h:
http://gerrit.cloudera.org:8080/#/c/10698/3/src/kudu/util/version_util.h@39
PS3, Line 39: friend
why friend?
--
To view, visit http://gerrit.cloudera.org:8080/10698
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0bcf3b10b699e89ad489144611990702dec8af19
Gerrit-Change-Number: 10698
Gerrit-PatchSet: 3
Gerrit-Owner: Will Berkeley <wd...@gmail.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Will Berkeley <wd...@gmail.com>
Gerrit-Comment-Date: Thu, 14 Jun 2018 07:01:18 +0000
Gerrit-HasComments: Yes