From 068bc37d35a041a8790f27a630eee043d4f75ec4 Mon Sep 17 00:00:00 2001 From: Suraj Naik Date: Sun, 19 Jul 2020 00:00:10 +0530 Subject: [PATCH 1/2] Make AsyncStream executor private --- .../src/main/native/libhdfspp/lib/common/async_stream.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/async_stream.h b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/async_stream.h index e9779e7558bec..ce5f70fa6df57 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/async_stream.h +++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/async_stream.h @@ -39,10 +39,11 @@ typedef boost::asio::const_buffers_1 ConstBuffer; * Threading model: async_read_some and async_write_some are not thread-safe. */ class AsyncStream { -public: +private: using executor_type = boost::asio::system_executor; executor_type executor_; +public: virtual void async_read_some(const MutableBuffer &buf, std::function handler) = 0; From 164176f75b124c7ac06710585c686a6982745006 Mon Sep 17 00:00:00 2001 From: Suraj Naik Date: Sun, 19 Jul 2020 14:04:00 +0530 Subject: [PATCH 2/2] Fix Build failures --- .../src/main/native/libhdfspp/lib/common/async_stream.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/async_stream.h b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/async_stream.h index ce5f70fa6df57..ad9ad64be6f04 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/async_stream.h +++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/async_stream.h @@ -39,11 +39,9 @@ typedef boost::asio::const_buffers_1 ConstBuffer; * Threading model: async_read_some and async_write_some are not thread-safe. */ class AsyncStream { -private: +public: using executor_type = boost::asio::system_executor; - executor_type executor_; -public: virtual void async_read_some(const MutableBuffer &buf, std::function handler) = 0; @@ -55,6 +53,10 @@ class AsyncStream { executor_type get_executor() { return executor_; } + +private: + executor_type executor_; + }; }