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 2020/01/17 00:45:46 UTC

[kudu] branch master updated: [metrics] fix compilation on macOS

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


The following commit(s) were added to refs/heads/master by this push:
     new f37afe2  [metrics] fix compilation on macOS
f37afe2 is described below

commit f37afe2578404716a7149221a69d8fc16c2f335c
Author: Alexey Serbin <al...@apache.org>
AuthorDate: Thu Jan 16 15:10:37 2020 -0800

    [metrics] fix compilation on macOS
    
    This is a follow-up to 926bca85827e597f2923652c3b3b017c7c071f3b.
    
    Change-Id: I8e7109aebec268db1d545e657c991e7791f85210
    Reviewed-on: http://gerrit.cloudera.org:8080/15055
    Tested-by: Kudu Jenkins
    Reviewed-by: Adar Dembo <ad...@cloudera.com>
---
 src/kudu/master/table_metrics.h  | 2 +-
 src/kudu/tablet/tablet_metrics.h | 2 +-
 src/kudu/util/metrics.h          | 5 -----
 3 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/kudu/master/table_metrics.h b/src/kudu/master/table_metrics.h
index 1bb17f6..0b18dbb 100644
--- a/src/kudu/master/table_metrics.h
+++ b/src/kudu/master/table_metrics.h
@@ -47,7 +47,7 @@ struct TableMetrics {
 
   scoped_refptr<AtomicGauge<uint64_t>> on_disk_size;
   scoped_refptr<AtomicGauge<uint64_t>> live_row_count;
-  scoped_refptr<AtomicGauge<uint64_t>> merged_entities_count_of_table;
+  scoped_refptr<AtomicGauge<size_t>> merged_entities_count_of_table;
 
   void AddTabletNoLiveRowCount(const std::string& tablet_id);
   void DeleteTabletNoLiveRowCount(const std::string& tablet_id);
diff --git a/src/kudu/tablet/tablet_metrics.h b/src/kudu/tablet/tablet_metrics.h
index febc959..1190b04 100644
--- a/src/kudu/tablet/tablet_metrics.h
+++ b/src/kudu/tablet/tablet_metrics.h
@@ -103,7 +103,7 @@ struct TabletMetrics {
   scoped_refptr<MeanGauge> average_diskrowset_height;
 
   // Static metrics.
-  scoped_refptr<AtomicGauge<uint64_t>> merged_entities_count_of_tablet;
+  scoped_refptr<AtomicGauge<size_t>> merged_entities_count_of_tablet;
 };
 
 } // namespace tablet
diff --git a/src/kudu/util/metrics.h b/src/kudu/util/metrics.h
index 899e2a7..752d382 100644
--- a/src/kudu/util/metrics.h
+++ b/src/kudu/util/metrics.h
@@ -325,16 +325,11 @@
 #define METRIC_DECLARE_histogram(name) \
   extern ::kudu::HistogramPrototype METRIC_##name
 
-#if defined(__APPLE__)
 #define METRIC_DEFINE_gauge_size(entity, name, label, unit, desc, level, ...) \
   ::kudu::GaugePrototype<size_t> METRIC_##name(                    \
       ::kudu::MetricPrototype::CtorArgs(#entity, #name, label, unit, desc, level, ## __VA_ARGS__))
 #define METRIC_DECLARE_gauge_size(name) \
   extern ::kudu::GaugePrototype<size_t> METRIC_##name
-#else
-#define METRIC_DEFINE_gauge_size METRIC_DEFINE_gauge_uint64
-#define METRIC_DECLARE_gauge_size METRIC_DECLARE_gauge_uint64
-#endif
 
 template <typename Type> class Singleton;