You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by ad...@apache.org on 2019/03/29 04:18:46 UTC
[kudu] 01/03: trace: fully qualify namespace in macros
This is an automated email from the ASF dual-hosted git repository.
adar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
commit d486737b3f8820cb8a67d657a5755e657f76700d
Author: Todd Lipcon <to...@apache.org>
AuthorDate: Thu Mar 21 21:41:12 2019 -0700
trace: fully qualify namespace in macros
Impala imports kudu/util/ but most of the Impala code is not in the
'kudu' namespace. In order for Impala to use the TRACE() macros, it's
thus necessary for them to fully qualify 'kudu::Trace' rather than
assume the macro is being used in a context where 'kudu::' is in scope.
Change-Id: I6365e08e85caa485611a8fdf2c329509911d49ab
Reviewed-on: http://gerrit.cloudera.org:8080/12834
Tested-by: Kudu Jenkins
Reviewed-by: Grant Henke <gr...@apache.org>
---
src/kudu/util/trace.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/kudu/util/trace.h b/src/kudu/util/trace.h
index 1c29fa9..c7ecbe4 100644
--- a/src/kudu/util/trace.h
+++ b/src/kudu/util/trace.h
@@ -48,7 +48,7 @@ class Trace;
// TRACE("Acquired timestamp $0", timestamp);
#define TRACE(format, substitutions...) \
do { \
- kudu::Trace* _trace = Trace::CurrentTrace(); \
+ kudu::Trace* _trace = kudu::Trace::CurrentTrace(); \
if (_trace) { \
_trace->SubstituteAndTrace(__FILE__, __LINE__, (format), \
##substitutions); \
@@ -78,7 +78,7 @@ class Trace;
// parameters.
#define TRACE_COUNTER_INCREMENT(counter_name, val) \
do { \
- kudu::Trace* _trace = Trace::CurrentTrace(); \
+ kudu::Trace* _trace = kudu::Trace::CurrentTrace(); \
if (_trace) { \
_trace->metrics()->Increment(counter_name, val); \
} \