[kudu-CR] gutil: remove use of deprecated headers

2017-08-16 Thread Todd Lipcon (Code Review)
Todd Lipcon has submitted this change and it was merged.

Change subject: gutil: remove use of deprecated headers
..


gutil: remove use of deprecated headers

We've been on C++11 for a long time now. This commit removes usage of
ext/hash_map and ext/hash_set headers in favor of the now-standardized
unordered_map and unordered_set.

Additionally, it removes our specializations of __gnucxx::hash<> and
instead changes to specializing std::hash<> where appropriate. Some of
those specializations are now part of the standard and have been removed
as necessary to fix compilation.

This does not yet remove the -Wno-deprecated setting in the top-level
CMakeLists.txt, since it appears we have a lot of usage of our own
internal deprecated functions.

Change-Id: Ie088f77aa3f70d386a00166e783c66200fce781b
Reviewed-on: http://gerrit.cloudera.org:8080/7684
Tested-by: Todd Lipcon 
Reviewed-by: Alexey Serbin 
---
M CMakeLists.txt
M src/kudu/gutil/CMakeLists.txt
M src/kudu/gutil/endian.h
M src/kudu/gutil/hash/hash.cc
M src/kudu/gutil/hash/hash.h
M src/kudu/gutil/strings/serialize.cc
M src/kudu/gutil/strings/serialize.h
M src/kudu/gutil/strings/split.cc
M src/kudu/gutil/strings/split.h
9 files changed, 40 insertions(+), 126 deletions(-)

Approvals:
  Todd Lipcon: Verified
  Alexey Serbin: Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie088f77aa3f70d386a00166e783c66200fce781b
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Sailesh Mukil 
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon 


[kudu-CR] gutil: remove use of deprecated headers

2017-08-16 Thread Alexey Serbin (Code Review)
Alexey Serbin has posted comments on this change.

Change subject: gutil: remove use of deprecated headers
..


Patch Set 2: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie088f77aa3f70d386a00166e783c66200fce781b
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Sailesh Mukil 
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: No


[kudu-CR] gutil: remove use of deprecated headers

2017-08-16 Thread Todd Lipcon (Code Review)
Todd Lipcon has posted comments on this change.

Change subject: gutil: remove use of deprecated headers
..


Patch Set 2: Verified+1

some java flake

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie088f77aa3f70d386a00166e783c66200fce781b
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Sailesh Mukil 
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: No


[kudu-CR] gutil: remove use of deprecated headers

2017-08-16 Thread Todd Lipcon (Code Review)
Hello Kudu Jenkins,

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

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

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

Change subject: gutil: remove use of deprecated headers
..

gutil: remove use of deprecated headers

We've been on C++11 for a long time now. This commit removes usage of
ext/hash_map and ext/hash_set headers in favor of the now-standardized
unordered_map and unordered_set.

Additionally, it removes our specializations of __gnucxx::hash<> and
instead changes to specializing std::hash<> where appropriate. Some of
those specializations are now part of the standard and have been removed
as necessary to fix compilation.

This does not yet remove the -Wno-deprecated setting in the top-level
CMakeLists.txt, since it appears we have a lot of usage of our own
internal deprecated functions.

Change-Id: Ie088f77aa3f70d386a00166e783c66200fce781b
---
M CMakeLists.txt
M src/kudu/gutil/CMakeLists.txt
M src/kudu/gutil/endian.h
M src/kudu/gutil/hash/hash.cc
M src/kudu/gutil/hash/hash.h
M src/kudu/gutil/strings/serialize.cc
M src/kudu/gutil/strings/serialize.h
M src/kudu/gutil/strings/split.cc
M src/kudu/gutil/strings/split.h
9 files changed, 40 insertions(+), 126 deletions(-)


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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie088f77aa3f70d386a00166e783c66200fce781b
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Sailesh Mukil 
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon 


[kudu-CR] gutil: remove use of deprecated headers

2017-08-16 Thread Alexey Serbin (Code Review)
Alexey Serbin has posted comments on this change.

Change subject: gutil: remove use of deprecated headers
..


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7684/1/src/kudu/gutil/hash/hash.h
File src/kudu/gutil/hash/hash.h:

PS1, Line 214: #if defined(__GNUC__)
 : // Use our nice hash function for strings
 : template
 : struct hash > {
 :   size_t operator()(const std::basic_string<_CharT, _Traits, 
_Alloc>& k) const {
 : return HashTo32(k.data(), static_cast(k.length()));
 :   }
 : };
 : 
 : // they don't define a hash for const string at all
 : template<> struct hash {
 :   size_t operator()(const std::string& k) const {
 : return HashTo32(k.data(), static_cast(k.length()));
 :   }
 : };
 : #endif  // defined(__GNUC__)
> I guess this one causes problems when building with libc++ (worked ok with 
SGTM :)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie088f77aa3f70d386a00166e783c66200fce781b
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Sailesh Mukil 
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: Yes


[kudu-CR] gutil: remove use of deprecated headers

2017-08-16 Thread Todd Lipcon (Code Review)
Todd Lipcon has posted comments on this change.

Change subject: gutil: remove use of deprecated headers
..


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7684/1/src/kudu/gutil/hash/hash.h
File src/kudu/gutil/hash/hash.h:

PS1, Line 214: #if defined(__GNUC__)
 : // Use our nice hash function for strings
 : template
 : struct hash > {
 :   size_t operator()(const std::basic_string<_CharT, _Traits, 
_Alloc>& k) const {
 : return HashTo32(k.data(), static_cast(k.length()));
 :   }
 : };
 : 
 : // they don't define a hash for const string at all
 : template<> struct hash {
 :   size_t operator()(const std::string& k) const {
 : return HashTo32(k.data(), static_cast(k.length()));
 :   }
 : };
 : #endif  // defined(__GNUC__)
> Does it make sense to remove this as well?
I guess this one causes problems when building with libc++ (worked ok with 
libstdcxx). Will remove and cross fingers :)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie088f77aa3f70d386a00166e783c66200fce781b
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Sailesh Mukil 
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: Yes


[kudu-CR] gutil: remove use of deprecated headers

2017-08-16 Thread Alexey Serbin (Code Review)
Alexey Serbin has posted comments on this change.

Change subject: gutil: remove use of deprecated headers
..


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7684/1/src/kudu/gutil/hash/hash.h
File src/kudu/gutil/hash/hash.h:

PS1, Line 214: #if defined(__GNUC__)
 : // Use our nice hash function for strings
 : template
 : struct hash > {
 :   size_t operator()(const std::basic_string<_CharT, _Traits, 
_Alloc>& k) const {
 : return HashTo32(k.data(), static_cast(k.length()));
 :   }
 : };
 : 
 : // they don't define a hash for const string at all
 : template<> struct hash {
 :   size_t operator()(const std::string& k) const {
 : return HashTo32(k.data(), static_cast(k.length()));
 :   }
 : };
 : #endif  // defined(__GNUC__)
Does it make sense to remove this as well?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie088f77aa3f70d386a00166e783c66200fce781b
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Sailesh Mukil 
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes


[kudu-CR] gutil: remove use of deprecated headers

2017-08-16 Thread David Ribeiro Alves (Code Review)
David Ribeiro Alves has posted comments on this change.

Change subject: gutil: remove use of deprecated headers
..


Patch Set 1:

looks good to me, but clang doens't seem to agree :)

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie088f77aa3f70d386a00166e783c66200fce781b
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Sailesh Mukil 
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: No


[kudu-CR] gutil: remove use of deprecated headers

2017-08-15 Thread Todd Lipcon (Code Review)
Hello Sailesh Mukil, Alexey Serbin,

I'd like you to do a code review.  Please visit

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

to review the following change.

Change subject: gutil: remove use of deprecated headers
..

gutil: remove use of deprecated headers

We've been on C++11 for a long time now. This commit removes usage of
ext/hash_map and ext/hash_set headers in favor of the now-standardized
unordered_map and unordered_set.

Additionally, it removes our specializations of __gnucxx::hash<> and
instead changes to specializing std::hash<> where appropriate. Some of
those specializations are now part of the standard and have been removed
as necessary to fix compilation.

This does not yet remove the -Wno-deprecated setting in the top-level
CMakeLists.txt, since it appears we have a lot of usage of our own
internal deprecated functions.

Change-Id: Ie088f77aa3f70d386a00166e783c66200fce781b
---
M CMakeLists.txt
M src/kudu/gutil/CMakeLists.txt
M src/kudu/gutil/endian.h
M src/kudu/gutil/hash/hash.cc
M src/kudu/gutil/hash/hash.h
M src/kudu/gutil/strings/serialize.cc
M src/kudu/gutil/strings/serialize.h
M src/kudu/gutil/strings/split.cc
M src/kudu/gutil/strings/split.h
9 files changed, 40 insertions(+), 109 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie088f77aa3f70d386a00166e783c66200fce781b
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: Sailesh Mukil