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 7a8c21048f0aad9ecab686782c60eeb4985643e8 Author: Alexey Serbin <[email protected]> AuthorDate: Wed Mar 20 16:12:24 2019 -0700 [macos] fix build This is a follow-up to 39f4637559ac29791cc385308bd63d77a5f18e56. Change-Id: I6566d08de063676a8f810b63bcb8dfc7863c090b Reviewed-on: http://gerrit.cloudera.org:8080/12818 Reviewed-by: Adar Dembo <[email protected]> Tested-by: Kudu Jenkins --- src/kudu/cfile/block_cache.cc | 4 ++++ src/kudu/util/cache-test.cc | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/kudu/cfile/block_cache.cc b/src/kudu/cfile/block_cache.cc index 32587c4..bddaa08 100644 --- a/src/kudu/cfile/block_cache.cc +++ b/src/kudu/cfile/block_cache.cc @@ -76,8 +76,12 @@ Cache* CreateCache(int64_t capacity) { return NewCache<Cache::EvictionPolicy::LRU, Cache::MemoryType::DRAM>( capacity, "block_cache"); case Cache::MemoryType::NVM: +#if defined(HAVE_LIB_VMEM) return NewCache<Cache::EvictionPolicy::LRU, Cache::MemoryType::NVM>( capacity, "block_cache"); +#else + LOG(FATAL) << "cache of NVM memory type is not supported"; +#endif // #if defined(HAVE_LIB_VMEM) ... #else ... default: LOG(FATAL) << "unsupported LRU cache memory type: " << mem_type; return nullptr; diff --git a/src/kudu/util/cache-test.cc b/src/kudu/util/cache-test.cc index 6869296..5c2b526 100644 --- a/src/kudu/util/cache-test.cc +++ b/src/kudu/util/cache-test.cc @@ -140,9 +140,13 @@ class CacheBaseTest : public KuduTest, "cache_test")); break; case Cache::MemoryType::NVM: +#if defined(HAVE_LIB_VMEM) cache_.reset(NewCache<Cache::EvictionPolicy::LRU, Cache::MemoryType::NVM>(cache_size(), "cache_test")); +#else + FAIL() << "cache of NVM memory type is not supported"; +#endif // #if defined(HAVE_LIB_VMEM) ... #else ... break; default: FAIL() << mem_type << ": unrecognized cache memory type";
