[kudu-CR] KUDU-1696. Daemons should dump their version info to the INFO log at startup
Todd Lipcon has posted comments on this change. Change subject: KUDU-1696. Daemons should dump their version info to the INFO log at startup .. Patch Set 6: Code-Review+2 -- To view, visit http://gerrit.cloudera.org:8080/4733 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I846827c53e74ca364af61c690bf85af8a8f28601 Gerrit-PatchSet: 6 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Maxim SmyatkinGerrit-Reviewer: Dinesh Bhat Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Maxim Smyatkin Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon Gerrit-HasComments: No
[kudu-CR] KUDU-1696. Daemons should dump their version info to the INFO log at startup
Todd Lipcon has posted comments on this change. Change subject: KUDU-1696. Daemons should dump their version info to the INFO log at startup .. Patch Set 5: (1 comment) one tiny formatting nit, otherwise looks good! http://gerrit.cloudera.org:8080/#/c/4733/5/src/kudu/util/flags.cc File src/kudu/util/flags.cc: PS5, Line 373: flag.current_value != default_flag->second.current_value) { : if (!args.str().empty()) { : args << '\n'; : } : args << "--" << flag.name << '=' << flag.current_value; nit: indentation is off here -- the second line of the if() should line up with the first condition, and the body of the if is indented 2 spaces too many I think -- To view, visit http://gerrit.cloudera.org:8080/4733 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I846827c53e74ca364af61c690bf85af8a8f28601 Gerrit-PatchSet: 5 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Maxim SmyatkinGerrit-Reviewer: Dinesh Bhat Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Maxim Smyatkin Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon Gerrit-HasComments: Yes
[kudu-CR] KUDU-1696. Daemons should dump their version info to the INFO log at startup
Hello Kudu Jenkins, I'd like you to reexamine a change. Please visit http://gerrit.cloudera.org:8080/4733 to look at the new patch set (#5). Change subject: KUDU-1696. Daemons should dump their version info to the INFO log at startup .. KUDU-1696. Daemons should dump their version info to the INFO log at startup In addition to adding full version info on tserver and master startup, I've added logging of command line arguments as suggested in the ticket. Using flags before ParseCommandLineFlags() as defaults, I've been able to filter out from output any flags set explicitly in source code or values set to their defaults in command line. Here is what it looks like in ts log now, for example: I1016 23:17:21.764128 10547 tablet_server_main.cc:55] Tablet server executed with: --fs_data_dirs=/tmp/kudu/5VmpWrWo/ts --fs_wal_dir=/tmp/kudu/5VmpWrWo/ts --rpc_bind_addresses=127.0.0.1 --webserver_interface=localhost --webserver_port=8051 --tserver_master_addrs=127.0.0.1 --heap_profile_path=/tmp/kudu-tserver.7060 --unlock_experimental_flags=true --local_ip_for_outbound_sockets=127.0.0.1 --log_dir=/tmp/kudu/5VmpWrWo Tablet server version: kudu 1.1.0-SNAPSHOT revision de38975ba220d57f241416b61ac1ecb40f2de75a-dirty build type RELEASE built by max at 19 Oct 2016 00:56:30 MSK on destr-workspace Change-Id: I846827c53e74ca364af61c690bf85af8a8f28601 --- M src/kudu/master/master_main.cc M src/kudu/tserver/tablet_server_main.cc M src/kudu/util/CMakeLists.txt A src/kudu/util/flags-test.cc M src/kudu/util/flags.cc M src/kudu/util/flags.h M src/kudu/util/test_macros.h 7 files changed, 166 insertions(+), 0 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/33/4733/5 -- To view, visit http://gerrit.cloudera.org:8080/4733 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I846827c53e74ca364af61c690bf85af8a8f28601 Gerrit-PatchSet: 5 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Maxim SmyatkinGerrit-Reviewer: Dinesh Bhat Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Maxim Smyatkin Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon
[kudu-CR] KUDU-1696. Daemons should dump their version info to the INFO log at startup
Hello Kudu Jenkins, I'd like you to reexamine a change. Please visit http://gerrit.cloudera.org:8080/4733 to look at the new patch set (#4). Change subject: KUDU-1696. Daemons should dump their version info to the INFO log at startup .. KUDU-1696. Daemons should dump their version info to the INFO log at startup In addition to adding full version info on tserver and master startup, I've added logging of command line arguments as suggested in the ticket. Using flags before ParseCommandLineFlags() as defaults, I've been able to filter out from output any flags set explicitly in source code or values set to their defaults in command line. Here is what it looks like in ts log now, for example: I1016 23:17:21.764128 10547 tablet_server_main.cc:55] Tablet server executed with: --fs_data_dirs=/tmp/kudu/5VmpWrWo/ts --fs_wal_dir=/tmp/kudu/5VmpWrWo/ts --rpc_bind_addresses=127.0.0.1 --webserver_interface=localhost --webserver_port=8051 --tserver_master_addrs=127.0.0.1 --heap_profile_path=/tmp/kudu-tserver.7060 --unlock_experimental_flags=true --local_ip_for_outbound_sockets=127.0.0.1 --log_dir=/tmp/kudu/5VmpWrWo Tablet server version: kudu 1.1.0-SNAPSHOT revision de38975ba220d57f241416b61ac1ecb40f2de75a-dirty build type RELEASE built by max at 19 Oct 2016 00:56:30 MSK on destr-workspace Change-Id: I846827c53e74ca364af61c690bf85af8a8f28601 --- M src/kudu/master/master_main.cc M src/kudu/tserver/tablet_server_main.cc M src/kudu/util/CMakeLists.txt A src/kudu/util/flags-test.cc M src/kudu/util/flags.cc M src/kudu/util/flags.h M src/kudu/util/test_macros.h 7 files changed, 167 insertions(+), 0 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/33/4733/4 -- To view, visit http://gerrit.cloudera.org:8080/4733 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I846827c53e74ca364af61c690bf85af8a8f28601 Gerrit-PatchSet: 4 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Maxim SmyatkinGerrit-Reviewer: Dinesh Bhat Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Maxim Smyatkin Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon
[kudu-CR] KUDU-1696. Daemons should dump their version info to the INFO log at startup
Maxim Smyatkin has posted comments on this change. Change subject: KUDU-1696. Daemons should dump their version info to the INFO log at startup .. Patch Set 3: (3 comments) http://gerrit.cloudera.org:8080/#/c/4733/3/src/kudu/util/flags-test.cc File src/kudu/util/flags-test.cc: PS3, Line 90: ndefault > Is this a typo or did you intentionally put an invalid flagfile with 'ndefa typo, thanks http://gerrit.cloudera.org:8080/#/c/4733/3/src/kudu/util/flags.cc File src/kudu/util/flags.cc: PS3, Line 366: // This only means, that the flag have been rewritten. Doesn't mean, that : // it is done in command line or even that it's trully different from : // default value. > some grammar/spelling mistakes: Ok, thanks for rewriting :) Line 370: for (const auto& default_flag : default_flags) { > rather than the O(n^2) loop here, I think it would be better to capture the I was thinking about this, but it's done only once at startup anyways and if we replace it with a map construction, we will just trade this nested loop for: 1) creating a map (still having the temporary vector) 2) inserting into map, i.e. allocating space for flags, making copies and looking for the right spot with O(N*logN) 3) looking them up in map, yet another N*logN. It's probably not worth doing so unless we have several hundreds of flags. Still want me to change it? -- To view, visit http://gerrit.cloudera.org:8080/4733 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I846827c53e74ca364af61c690bf85af8a8f28601 Gerrit-PatchSet: 3 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Maxim SmyatkinGerrit-Reviewer: Dinesh Bhat Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Maxim Smyatkin Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon Gerrit-HasComments: Yes
[kudu-CR] KUDU-1696. Daemons should dump their version info to the INFO log at startup
Dinesh Bhat has posted comments on this change. Change subject: KUDU-1696. Daemons should dump their version info to the INFO log at startup .. Patch Set 3: (5 comments) http://gerrit.cloudera.org:8080/#/c/4733/3/src/kudu/master/master_main.cc File src/kudu/master/master_main.cc: PS3, Line 62: executed Nit: master is yet to start execution, so I suggest re-wording to avoid confusion while reading the logs. "Master server non-default flags:\n" might also keep it unambiguous I guess. http://gerrit.cloudera.org:8080/#/c/4733/3/src/kudu/tserver/tablet_server_main.cc File src/kudu/tserver/tablet_server_main.cc: PS3, Line 58: executed Nit: same comment as in master_main.cc http://gerrit.cloudera.org:8080/#/c/4733/3/src/kudu/util/flags-test.cc File src/kudu/util/flags-test.cc: PS3, Line 85: "--flagfile=", Nit: we can expect the whole string provided at L75 I guess. PS3, Line 90: ndefault Is this a typo or did you intentionally put an invalid flagfile with 'ndefault' ? I was expecting 'test_default_ff' here. http://gerrit.cloudera.org:8080/#/c/4733/3/src/kudu/util/flags.cc File src/kudu/util/flags.cc: PS3, Line 360: google:: Also I think namespace prefixes 'std::' and 'google::' are redundant since we have them as header inclusions and forward-decl'ed. -- To view, visit http://gerrit.cloudera.org:8080/4733 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I846827c53e74ca364af61c690bf85af8a8f28601 Gerrit-PatchSet: 3 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Maxim SmyatkinGerrit-Reviewer: Dinesh Bhat Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon Gerrit-HasComments: Yes
[kudu-CR] KUDU-1696. Daemons should dump their version info to the INFO log at startup
Todd Lipcon has posted comments on this change. Change subject: KUDU-1696. Daemons should dump their version info to the INFO log at startup .. Patch Set 3: (9 comments) http://gerrit.cloudera.org:8080/#/c/4733/3/src/kudu/util/flags-test.cc File src/kudu/util/flags-test.cc: PS3, Line 47: flagfile_path; - member variables should end in '_' - but this is only used in one function, so maybe just set it in the function? PS3, Line 56: WritableFileOptions opts; : gscoped_ptr writable_file; : CHECK_OK(Env::Default()->NewWritableFile(opts, flagfile_path, _file)); : : std::string flagfile_contents = "--test_nondefault_ff=nondefault\n" : "--test_default_ff=default"; : : CHECK_OK(writable_file->Append(Slice(flagfile_contents.data(), : flagfile_contents.size(; : CHECK_OK(writable_file->Close()); can use WriteStringToFile for this PS3, Line 67: std::string flagfile_flag = "--flagfile="; : flagfile_flag.append(flagfile_path); typically we'd use strings::Substitute("--flagfile=$0", flagfile_path) Line 78: char** casted_argv = const_cast(argv); no need for the intermediate variable here - just do the const cast on line 80 Line 96: EXPECT_TRUE(result.find(expected) != result.npos); can use ASSERT_STR_CONTAINS http://gerrit.cloudera.org:8080/#/c/4733/3/src/kudu/util/flags.cc File src/kudu/util/flags.cc: Line 360: string GetNonDefaultFlags(std::vector& default_flags) { should be a const ref PS3, Line 366: // This only means, that the flag have been rewritten. Doesn't mean, that : // it is done in command line or even that it's trully different from : // default value. some grammar/spelling mistakes: // This only means that the flag has been rewritten. It doesn't // mean that this has been done in the command line, or even // that it's truly different from the default value. Line 370: for (const auto& default_flag : default_flags) { rather than the O(n^2) loop here, I think it would be better to capture the default_flags in a map or unordered_map http://gerrit.cloudera.org:8080/#/c/4733/3/src/kudu/util/flags.h File src/kudu/util/flags.h: Line 52:default_flags); > warning: non-const reference parameter 'default_flags', make it const or us also wrapping here isn't necessary (we allow up to 100) -- To view, visit http://gerrit.cloudera.org:8080/4733 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I846827c53e74ca364af61c690bf85af8a8f28601 Gerrit-PatchSet: 3 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Maxim Smyatkin Gerrit-Reviewer: Dinesh Bhat Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon Gerrit-HasComments: Yes
[kudu-CR] KUDU-1696. Daemons should dump their version info to the INFO log at startup
Hello Kudu Jenkins, I'd like you to reexamine a change. Please visit http://gerrit.cloudera.org:8080/4733 to look at the new patch set (#3). Change subject: KUDU-1696. Daemons should dump their version info to the INFO log at startup .. KUDU-1696. Daemons should dump their version info to the INFO log at startup In addition to adding full version info on tserver and master startup, I've added logging of command line arguments as suggested in the ticket. Using flags before ParseCommandLineFlags() as defaults, I've been able to filter out from output any flags set explicitly in source code or values set to their defaults in command line. Here is what it looks like in ts log now, for example: I1016 23:17:21.764128 10547 tablet_server_main.cc:55] Tablet server executed with: --fs_data_dirs=/tmp/kudu/5VmpWrWo/ts --fs_wal_dir=/tmp/kudu/5VmpWrWo/ts --rpc_bind_addresses=127.0.0.1 --webserver_interface=localhost --webserver_port=8051 --tserver_master_addrs=127.0.0.1 --heap_profile_path=/tmp/kudu-tserver.7060 --unlock_experimental_flags=true --local_ip_for_outbound_sockets=127.0.0.1 --log_dir=/tmp/kudu/5VmpWrWo Tablet server version: kudu 1.1.0-SNAPSHOT revision de38975ba220d57f241416b61ac1ecb40f2de75a-dirty build type RELEASE built by max at 19 Oct 2016 00:56:30 MSK on destr-workspace Change-Id: I846827c53e74ca364af61c690bf85af8a8f28601 --- M src/kudu/master/master_main.cc M src/kudu/tserver/tablet_server_main.cc M src/kudu/util/CMakeLists.txt A src/kudu/util/flags-test.cc M src/kudu/util/flags.cc M src/kudu/util/flags.h 6 files changed, 168 insertions(+), 0 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/33/4733/3 -- To view, visit http://gerrit.cloudera.org:8080/4733 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I846827c53e74ca364af61c690bf85af8a8f28601 Gerrit-PatchSet: 3 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Maxim SmyatkinGerrit-Reviewer: Dinesh Bhat Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon
[kudu-CR] KUDU-1696. Daemons should dump their version info to the INFO log at startup
Todd Lipcon has posted comments on this change. Change subject: KUDU-1696. Daemons should dump their version info to the INFO log at startup .. Patch Set 2: (1 comment) http://gerrit.cloudera.org:8080/#/c/4733/2/src/kudu/util/flags.cc File src/kudu/util/flags.cc: Line 360: string FormatCommandLineFlags(int argc, char** argv) { the problem with this is that it won't dump flags that are specified from a flagsfile. For daemons, it's often the case that the only command line flag is --flagsfile /foo/bar, so it would be good to dump those, even if it means that we might also end up dumping a few things where we overrode default. -- To view, visit http://gerrit.cloudera.org:8080/4733 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I846827c53e74ca364af61c690bf85af8a8f28601 Gerrit-PatchSet: 2 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Maxim SmyatkinGerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon Gerrit-HasComments: Yes
[kudu-CR] KUDU-1696. Daemons should dump their version info to the INFO log at startup
Hello Kudu Jenkins, I'd like you to reexamine a change. Please visit http://gerrit.cloudera.org:8080/4733 to look at the new patch set (#2). Change subject: KUDU-1696. Daemons should dump their version info to the INFO log at startup .. KUDU-1696. Daemons should dump their version info to the INFO log at startup In addition to adding full version info on tserver and master startup, I've added logging of command line arguments as suggested in the ticket. Although the initial idea was to log only flags different from their defaults, I merely implemented logging of all given command line arguments (after they're successfully parsed by GFlags). The reasons are: a) some flags differ from their defaults explicitly, like FLAG_rpc_bind_addresses in master_main.cc, and b) others do it that way and it seems good enough, right? Here is what it looks like in ts log now, for example: I1016 23:17:21.764128 10547 tablet_server_main.cc:55] Tablet server executed with: --unlock_experimental_flags --log_dir=/tmp/kudu/whzdP6lK --fs_wal_dir=/tmp/kudu/whzdP6lK/ts --fs_data_dirs=/tmp/kudu/whzdP6lK/ts --rpc_bind_addresses=127.0.0.1 --local_ip_for_outbound_sockets=127.0.0.1 --webserver_interface=localhost --webserver_port=8051 --tserver_master_addrs=127.0.0.1 Tablet server version: kudu 1.1.0-SNAPSHOT revision 0c52f161b4504480adcb9e06b7bb0bc5b3e192b0-dirty build type RELEASE built by max at 16 Oct 2016 16:24:01 MSK on destr-workspace Change-Id: I846827c53e74ca364af61c690bf85af8a8f28601 --- M src/kudu/master/master_main.cc M src/kudu/tserver/tablet_server_main.cc M src/kudu/util/CMakeLists.txt A src/kudu/util/flags-test.cc M src/kudu/util/flags.cc M src/kudu/util/flags.h 6 files changed, 95 insertions(+), 0 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/33/4733/2 -- To view, visit http://gerrit.cloudera.org:8080/4733 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I846827c53e74ca364af61c690bf85af8a8f28601 Gerrit-PatchSet: 2 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Maxim SmyatkinGerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot
[kudu-CR] KUDU-1696. Daemons should dump their version info to the INFO log at startup
Maxim Smyatkin has uploaded a new change for review. http://gerrit.cloudera.org:8080/4733 Change subject: KUDU-1696. Daemons should dump their version info to the INFO log at startup .. KUDU-1696. Daemons should dump their version info to the INFO log at startup In addition to adding full version info on tserver and master startup, I've added logging of command line arguments as suggested in the ticket. Although the initial idea was to log only flags different from their defaults, I merely implemented logging of all given command line arguments (after they're successfully parsed by GFlags). The reasons are: a) some flags differ from their defaults explicitly, like FLAG_rpc_bind_addresses in master_main.cc, and b) others do it that way and it seems good enough, right? Here is what it looks like in ts log now, for example: I1016 23:17:21.764128 10547 tablet_server_main.cc:55] Tablet server executed with: --unlock_experimental_flags --log_dir=/tmp/kudu/whzdP6lK --fs_wal_dir=/tmp/kudu/whzdP6lK/ts --fs_data_dirs=/tmp/kudu/whzdP6lK/ts --rpc_bind_addresses=127.0.0.1 --local_ip_for_outbound_sockets=127.0.0.1 --webserver_interface=localhost --webserver_port=8051 --tserver_master_addrs=127.0.0.1 Tablet server version: kudu 1.1.0-SNAPSHOT revision 0c52f161b4504480adcb9e06b7bb0bc5b3e192b0-dirty build type RELEASE built by max at 16 Oct 2016 16:24:01 MSK on destr-workspace Change-Id: I846827c53e74ca364af61c690bf85af8a8f28601 --- M src/kudu/master/master_main.cc M src/kudu/tserver/tablet_server_main.cc M src/kudu/util/CMakeLists.txt A src/kudu/util/flags-test.cc M src/kudu/util/flags.cc M src/kudu/util/flags.h 6 files changed, 95 insertions(+), 0 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/33/4733/1 -- To view, visit http://gerrit.cloudera.org:8080/4733 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I846827c53e74ca364af61c690bf85af8a8f28601 Gerrit-PatchSet: 1 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Maxim Smyatkin