You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2019/10/05 07:12:46 UTC
[kudu] 01/02: [clock] update description of --time_source flag
This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
commit 8c439410df562979bb88f937771a144c4a6537f2
Author: Alexey Serbin <al...@apache.org>
AuthorDate: Fri Oct 4 10:59:12 2019 -0700
[clock] update description of --time_source flag
Update the description of the --time_source flag. In prior version it
might read as to be a test-only flag. Other minor modifications.
This patch does not contain any functional modifications.
Change-Id: I5a684fd3373724e09247106d35a23c225d16f366
Reviewed-on: http://gerrit.cloudera.org:8080/14374
Reviewed-by: Grant Henke <gr...@apache.org>
Tested-by: Kudu Jenkins
---
src/kudu/clock/hybrid_clock.cc | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/kudu/clock/hybrid_clock.cc b/src/kudu/clock/hybrid_clock.cc
index 39b1e59..9a8579a 100644
--- a/src/kudu/clock/hybrid_clock.cc
+++ b/src/kudu/clock/hybrid_clock.cc
@@ -56,22 +56,23 @@ TAG_FLAG(max_clock_sync_error_usec, advanced);
TAG_FLAG(max_clock_sync_error_usec, runtime);
DEFINE_bool(use_hybrid_clock, true,
- "Whether HybridClock should be used as the default clock"
- " implementation. This should be disabled for testing purposes only.");
+ "Whether HybridClock should be used as the default clock "
+ "implementation. This should be disabled for testing purposes only.");
TAG_FLAG(use_hybrid_clock, hidden);
DEFINE_string(time_source, "system",
- "The clock source that HybridClock should use. Must be one of "
- "'system', 'builtin', or 'mock' (for tests only)");
+ "The time source that HybridClock should use. Must be one of "
+ "'system', 'builtin', or 'mock' ('mock' is for tests only)");
TAG_FLAG(time_source, evolving);
-DEFINE_validator(time_source, [](const char* /* flag_name */, const string& value) {
+DEFINE_validator(time_source, [](const char* flag_name, const string& value) {
if (boost::iequals(value, "system") ||
boost::iequals(value, "builtin") ||
boost::iequals(value, "mock")) {
return true;
}
- LOG(ERROR) << "unknown value for 'time_source': '" << value << "'"
- << " (expected one of 'system', 'builtin', or 'mock')";
+ LOG(ERROR) << Substitute("unknown value for --$0 flag: '$1' "
+ "(expected one of 'system', 'builtin', or 'mock')",
+ flag_name, value);
return false;
});