This is an automated email from the ASF dual-hosted git repository.
isapego pushed a commit to branch ignite-17607
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/ignite-17607 by this push:
new f53c897511 IGNITE-17607 Clang-format
f53c897511 is described below
commit f53c8975110e549fa59cb169d590cfa359ee6300
Author: Igor Sapego <[email protected]>
AuthorDate: Mon Mar 20 09:01:36 2023 -0700
IGNITE-17607 Clang-format
---
.../cpp/ignite/client/compute/compute.cpp | 12 ++--
.../platforms/cpp/ignite/client/compute/compute.h | 29 ++++-----
.../ignite/client/detail/argument_check_utils.h | 4 +-
.../ignite/client/detail/compute/compute_impl.cpp | 75 +++++++++++-----------
.../ignite/client/detail/compute/compute_impl.h | 7 +-
.../ignite/client/detail/ignite_client_impl.cpp | 4 +-
.../cpp/ignite/client/detail/ignite_client_impl.h | 2 +-
.../cpp/ignite/client/detail/table/table_impl.h | 6 +-
.../platforms/cpp/ignite/client/detail/utils.cpp | 4 +-
modules/platforms/cpp/ignite/client/detail/utils.h | 1 -
.../platforms/cpp/ignite/client/ignite_client.cpp | 5 +-
.../cpp/ignite/client/network/cluster_node.h | 12 +---
modules/platforms/cpp/ignite/client/primitive.h | 4 +-
.../cpp/ignite/client/table/record_view.cpp | 2 +-
.../network/detail/linux/connecting_context.h | 4 +-
.../network/detail/linux/linux_async_client.h | 2 +-
.../detail/linux/linux_async_worker_thread.h | 4 +-
.../ignite/network/detail/win/win_async_client.h | 2 +-
.../cpp/tests/client-test/compute_test.cpp | 22 +++----
19 files changed, 92 insertions(+), 109 deletions(-)
diff --git a/modules/platforms/cpp/ignite/client/compute/compute.cpp
b/modules/platforms/cpp/ignite/client/compute/compute.cpp
index 3bf267bbba..75b4c5dc6d 100644
--- a/modules/platforms/cpp/ignite/client/compute/compute.cpp
+++ b/modules/platforms/cpp/ignite/client/compute/compute.cpp
@@ -39,16 +39,16 @@ typename T::value_type get_random_element(const T &cont) {
return cont[distrib(gen)];
}
-void compute::execute_async(const std::vector<cluster_node>& nodes,
std::string_view job_class_name,
- const std::vector<primitive>& args,
ignite_callback<std::optional<primitive>> callback) {
+void compute::execute_async(const std::vector<cluster_node> &nodes,
std::string_view job_class_name,
+ const std::vector<primitive> &args,
ignite_callback<std::optional<primitive>> callback) {
detail::arg_check::container_non_empty(nodes, "Nodes container");
detail::arg_check::container_non_empty(job_class_name, "Job class name");
m_impl->execute_on_one_node(get_random_element(nodes), job_class_name,
args, std::move(callback));
}
-void compute::broadcast_async(const std::set<cluster_node>& nodes,
std::string_view job_class_name,
- const std::vector<primitive>& args,
+void compute::broadcast_async(const std::set<cluster_node> &nodes,
std::string_view job_class_name,
+ const std::vector<primitive> &args,
ignite_callback<std::map<cluster_node,
ignite_result<std::optional<primitive>>>> callback) {
typedef std::map<cluster_node, ignite_result<std::optional<primitive>>>
result_type;
@@ -56,7 +56,9 @@ void compute::broadcast_async(const std::set<cluster_node>&
nodes, std::string_v
detail::arg_check::container_non_empty(job_class_name, "Job class name");
struct result_group {
- explicit result_group(std::int32_t cnt, ignite_callback<result_type>
&&cb) : m_cnt(cnt), m_callback(cb) {}
+ explicit result_group(std::int32_t cnt, ignite_callback<result_type>
&&cb)
+ : m_cnt(cnt)
+ , m_callback(cb) {}
std::mutex m_mutex;
result_type m_res_map;
diff --git a/modules/platforms/cpp/ignite/client/compute/compute.h
b/modules/platforms/cpp/ignite/client/compute/compute.h
index 1ef28478b0..a75e7fa559 100644
--- a/modules/platforms/cpp/ignite/client/compute/compute.h
+++ b/modules/platforms/cpp/ignite/client/compute/compute.h
@@ -24,11 +24,11 @@
#include "ignite/common/config.h"
#include "ignite/common/ignite_result.h"
+#include <map>
#include <memory>
+#include <set>
#include <utility>
#include <vector>
-#include <map>
-#include <set>
namespace ignite {
@@ -54,8 +54,8 @@ public:
* @param args Job arguments.
* @param callback A callback called on operation completion with job
execution result.
*/
- IGNITE_API void execute_async(const std::vector<cluster_node>& nodes,
std::string_view job_class_name,
- const std::vector<primitive>& args,
ignite_callback<std::optional<primitive>> callback);
+ IGNITE_API void execute_async(const std::vector<cluster_node> &nodes,
std::string_view job_class_name,
+ const std::vector<primitive> &args,
ignite_callback<std::optional<primitive>> callback);
/**
* Executes a compute job represented by the given class on one of the
specified nodes.
@@ -66,7 +66,7 @@ public:
* @return Job execution result.
*/
IGNITE_API std::optional<primitive> execute(
- const std::vector<cluster_node>& nodes, std::string_view
job_class_name, const std::vector<primitive>& args) {
+ const std::vector<cluster_node> &nodes, std::string_view
job_class_name, const std::vector<primitive> &args) {
return sync<std::optional<primitive>>([this, nodes, job_class_name,
args](auto callback) mutable {
execute_async(nodes, job_class_name, args, std::move(callback));
});
@@ -80,8 +80,8 @@ public:
* @param args Job arguments.
* @param callback A callback called on operation completion with jobs
execution result.
*/
- IGNITE_API void broadcast_async(const std::set<cluster_node>& nodes,
std::string_view job_class_name,
- const std::vector<primitive>& args,
+ IGNITE_API void broadcast_async(const std::set<cluster_node> &nodes,
std::string_view job_class_name,
+ const std::vector<primitive> &args,
ignite_callback<std::map<cluster_node,
ignite_result<std::optional<primitive>>>> callback);
/**
@@ -93,11 +93,10 @@ public:
* @return Job execution result.
*/
IGNITE_API std::map<cluster_node, ignite_result<std::optional<primitive>>>
broadcast(
- const std::set<cluster_node>& nodes, std::string_view job_class_name,
const std::vector<primitive>& args) {
+ const std::set<cluster_node> &nodes, std::string_view job_class_name,
const std::vector<primitive> &args) {
return sync<std::map<cluster_node,
ignite_result<std::optional<primitive>>>>(
- [this, nodes, job_class_name, args](auto callback) mutable {
- broadcast_async(nodes, job_class_name, args,
std::move(callback));
- });
+ [this, nodes, job_class_name, args](
+ auto callback) mutable { broadcast_async(nodes,
job_class_name, args, std::move(callback)); });
}
/**
@@ -109,8 +108,8 @@ public:
* @param args Job arguments.
* @param callback A callback called on operation completion with job
execution result.
*/
- IGNITE_API void execute_colocated_async(std::string_view table_name, const
ignite_tuple& key,
- std::string_view job_class_name, const std::vector<primitive>& args,
+ IGNITE_API void execute_colocated_async(std::string_view table_name, const
ignite_tuple &key,
+ std::string_view job_class_name, const std::vector<primitive> &args,
ignite_callback<std::optional<primitive>> callback);
/**
@@ -122,8 +121,8 @@ public:
* @param args Job arguments.
* @return Job execution result.
*/
- IGNITE_API std::optional<primitive> execute_colocated(std::string_view
table_name, const ignite_tuple& key,
- std::string_view job_class_name, const std::vector<primitive>& args) {
+ IGNITE_API std::optional<primitive> execute_colocated(std::string_view
table_name, const ignite_tuple &key,
+ std::string_view job_class_name, const std::vector<primitive> &args) {
return sync<std::optional<primitive>>([this, &table_name, &key,
job_class_name, &args](auto callback) mutable {
execute_colocated_async(table_name, key, job_class_name, args,
std::move(callback));
});
diff --git a/modules/platforms/cpp/ignite/client/detail/argument_check_utils.h
b/modules/platforms/cpp/ignite/client/detail/argument_check_utils.h
index fac3b86e45..8c159ccfe7 100644
--- a/modules/platforms/cpp/ignite/client/detail/argument_check_utils.h
+++ b/modules/platforms/cpp/ignite/client/detail/argument_check_utils.h
@@ -28,7 +28,7 @@ namespace ignite::detail::arg_check {
*
* @param key Key tuple.
*/
-void inline tuple_non_empty(const ignite_tuple &value, const std::string&
title) {
+void inline tuple_non_empty(const ignite_tuple &value, const std::string
&title) {
if (0 == value.column_count())
throw ignite_error(title + " can not be empty");
}
@@ -57,7 +57,7 @@ void inline value_tuple_non_empty(const ignite_tuple &value) {
* @param value Value tuple.
*/
template<typename T>
-void inline container_non_empty(const T &cont, const std::string& title) {
+void inline container_non_empty(const T &cont, const std::string &title) {
if (cont.empty())
throw ignite_error(title + " can not be empty");
}
diff --git
a/modules/platforms/cpp/ignite/client/detail/compute/compute_impl.cpp
b/modules/platforms/cpp/ignite/client/detail/compute/compute_impl.cpp
index eec73996a8..d3edf24873 100644
--- a/modules/platforms/cpp/ignite/client/detail/compute/compute_impl.cpp
+++ b/modules/platforms/cpp/ignite/client/detail/compute/compute_impl.cpp
@@ -27,7 +27,7 @@ namespace ignite::detail {
* @param writer Writer to use.
* @param args Arguments.
*/
-void write_primitives_as_binary_tuple(protocol::writer &writer, const
std::vector<primitive>& args) {
+void write_primitives_as_binary_tuple(protocol::writer &writer, const
std::vector<primitive> &args) {
auto args_num = std::int32_t(args.size());
writer.write(args_num);
@@ -64,7 +64,7 @@ std::optional<primitive>
read_primitive_from_binary_tuple(protocol::reader &read
}
void compute_impl::execute_on_one_node(cluster_node node, std::string_view
job_class_name,
- const std::vector<primitive>& args,
ignite_callback<std::optional<primitive>> callback) {
+ const std::vector<primitive> &args,
ignite_callback<std::optional<primitive>> callback) {
auto writer_func = [&node, job_class_name, args](protocol::writer &writer)
{
writer.write(node.get_name());
@@ -85,41 +85,42 @@ void compute_impl::execute_on_one_node(cluster_node node,
std::string_view job_c
void compute_impl::execute_colocated_async(std::string_view table_name, const
ignite_tuple &key, std::string_view job,
const std::vector<primitive> &args,
ignite_callback<std::optional<primitive>> callback) {
- m_tables->get_table_async(table_name, [table_name =
std::string(table_name), callback = std::move(callback),
- key, job = std::string(job), args, conn = m_connection]
- (auto &&res) mutable {
- if (res.has_error()) {
- callback({std::move(res.error())});
- return;
- }
- auto &table_opt = res.value();
- if (!table_opt) {
- callback({ignite_error("Table does not exist: '" + table_name +
"'")});
- return;
- }
-
- auto table = table_impl::from_facade(*table_opt);
- table->template
with_latest_schema_async<std::optional<primitive>>(std::move(callback),
- [table, key = std::move(key), job = std::move(job), args =
std::move(args), conn] // NOLINT(performance-move-const-arg)
- (const schema& sch, auto callback) mutable {
- auto writer_func = [&key, &sch, &table, &job,
&args](protocol::writer &writer) {
- writer.write(table->get_id());
- writer.write(sch.version);
- write_tuple(writer, sch, key, true);
- writer.write(job);
- write_primitives_as_binary_tuple(writer, args);
- };
-
- auto reader_func = [](protocol::reader &reader) ->
std::optional<primitive> {
- if (reader.try_read_nil())
- return std::nullopt;
-
- return read_primitive_from_binary_tuple(reader);
- };
-
- conn->perform_request<std::optional<primitive>>(
- client_operation::COMPUTE_EXECUTE_COLOCATED, writer_func,
std::move(reader_func), std::move(callback));
- });
+ m_tables->get_table_async(table_name,
+ [table_name = std::string(table_name), callback = std::move(callback),
key, job = std::string(job), args,
+ conn = m_connection](auto &&res) mutable {
+ if (res.has_error()) {
+ callback({std::move(res.error())});
+ return;
+ }
+ auto &table_opt = res.value();
+ if (!table_opt) {
+ callback({ignite_error("Table does not exist: '" + table_name
+ "'")});
+ return;
+ }
+
+ auto table = table_impl::from_facade(*table_opt);
+ table->template
with_latest_schema_async<std::optional<primitive>>(std::move(callback),
+ [table, key = std::move(key), job = std::move(job), args =
std::move(args),
+ conn] // NOLINT(performance-move-const-arg)
+ (const schema &sch, auto callback) mutable {
+ auto writer_func = [&key, &sch, &table, &job,
&args](protocol::writer &writer) {
+ writer.write(table->get_id());
+ writer.write(sch.version);
+ write_tuple(writer, sch, key, true);
+ writer.write(job);
+ write_primitives_as_binary_tuple(writer, args);
+ };
+
+ auto reader_func = [](protocol::reader &reader) ->
std::optional<primitive> {
+ if (reader.try_read_nil())
+ return std::nullopt;
+
+ return read_primitive_from_binary_tuple(reader);
+ };
+
+
conn->perform_request<std::optional<primitive>>(client_operation::COMPUTE_EXECUTE_COLOCATED,
+ writer_func, std::move(reader_func),
std::move(callback));
+ });
});
}
diff --git a/modules/platforms/cpp/ignite/client/detail/compute/compute_impl.h
b/modules/platforms/cpp/ignite/client/detail/compute/compute_impl.h
index f7a29200e9..122be3c66f 100644
--- a/modules/platforms/cpp/ignite/client/detail/compute/compute_impl.h
+++ b/modules/platforms/cpp/ignite/client/detail/compute/compute_impl.h
@@ -53,7 +53,7 @@ public:
* @param args Job arguments.
* @param callback A callback called on operation completion with job
execution result.
*/
- void execute_on_one_node(cluster_node node, std::string_view
job_class_name, const std::vector<primitive>& args,
+ void execute_on_one_node(cluster_node node, std::string_view
job_class_name, const std::vector<primitive> &args,
ignite_callback<std::optional<primitive>> callback);
/**
@@ -65,9 +65,8 @@ public:
* @param args Job arguments.
* @param callback A callback called on operation completion with job
execution result.
*/
- void execute_colocated_async(std::string_view table_name, const
ignite_tuple& key,
- std::string_view job_class_name, const std::vector<primitive>& args,
- ignite_callback<std::optional<primitive>> callback);
+ void execute_colocated_async(std::string_view table_name, const
ignite_tuple &key, std::string_view job_class_name,
+ const std::vector<primitive> &args,
ignite_callback<std::optional<primitive>> callback);
private:
/** Cluster connection. */
diff --git a/modules/platforms/cpp/ignite/client/detail/ignite_client_impl.cpp
b/modules/platforms/cpp/ignite/client/detail/ignite_client_impl.cpp
index e5cffefcb9..9e1e324e0e 100644
--- a/modules/platforms/cpp/ignite/client/detail/ignite_client_impl.cpp
+++ b/modules/platforms/cpp/ignite/client/detail/ignite_client_impl.cpp
@@ -35,8 +35,8 @@ void
ignite_client_impl::get_cluster_nodes_async(ignite_callback<std::vector<clu
auto host = protocol::unpack_object<std::string>(fields.ptr[2]);
auto port = protocol::unpack_object<std::int32_t>(fields.ptr[3]);
- nodes.emplace_back(std::move(id), std::move(name),
- network::end_point{std::move(host), std::uint16_t(port)});
+ nodes.emplace_back(
+ std::move(id), std::move(name),
network::end_point{std::move(host), std::uint16_t(port)});
});
return nodes;
diff --git a/modules/platforms/cpp/ignite/client/detail/ignite_client_impl.h
b/modules/platforms/cpp/ignite/client/detail/ignite_client_impl.h
index 6357252e50..65fe6a0a42 100644
--- a/modules/platforms/cpp/ignite/client/detail/ignite_client_impl.h
+++ b/modules/platforms/cpp/ignite/client/detail/ignite_client_impl.h
@@ -17,8 +17,8 @@
#pragma once
-#include <ignite/client/detail/compute/compute_impl.h>
#include <ignite/client/detail/cluster_connection.h>
+#include <ignite/client/detail/compute/compute_impl.h>
#include <ignite/client/detail/sql/sql_impl.h>
#include <ignite/client/detail/table/tables_impl.h>
#include <ignite/client/detail/transaction/transactions_impl.h>
diff --git a/modules/platforms/cpp/ignite/client/detail/table/table_impl.h
b/modules/platforms/cpp/ignite/client/detail/table/table_impl.h
index 5b88f3b29b..4a6395910a 100644
--- a/modules/platforms/cpp/ignite/client/detail/table/table_impl.h
+++ b/modules/platforms/cpp/ignite/client/detail/table/table_impl.h
@@ -294,16 +294,14 @@ public:
* @param tb Table.
* @return Implementation.
*/
- [[nodiscard]] static std::shared_ptr<table_impl> from_facade(table& tb);
+ [[nodiscard]] static std::shared_ptr<table_impl> from_facade(table &tb);
/**
* Get table ID.
*
* @return ID.
*/
- [[nodiscard]] uuid get_id() const {
- return m_id;
- }
+ [[nodiscard]] uuid get_id() const { return m_id; }
private:
/**
diff --git a/modules/platforms/cpp/ignite/client/detail/utils.cpp
b/modules/platforms/cpp/ignite/client/detail/utils.cpp
index 7e66c97ab0..6f1fab8f02 100644
--- a/modules/platforms/cpp/ignite/client/detail/utils.cpp
+++ b/modules/platforms/cpp/ignite/client/detail/utils.cpp
@@ -282,7 +282,7 @@ void claim_primitive_with_type(binary_tuple_builder
&builder, const primitive &v
break;
}
case column_type::DECIMAL: {
- const auto& dec_value = value.get<big_decimal>();
+ const auto &dec_value = value.get<big_decimal>();
claim_type_and_scale(builder, ignite_type::DECIMAL,
dec_value.get_scale());
builder.claim_number(dec_value);
break;
@@ -385,7 +385,7 @@ void append_primitive_with_type(binary_tuple_builder
&builder, const primitive &
break;
}
case column_type::DECIMAL: {
- const auto& dec_value = value.get<big_decimal>();
+ const auto &dec_value = value.get<big_decimal>();
append_type_and_scale(builder, ignite_type::DECIMAL,
dec_value.get_scale());
builder.append_number(dec_value);
break;
diff --git a/modules/platforms/cpp/ignite/client/detail/utils.h
b/modules/platforms/cpp/ignite/client/detail/utils.h
index 62f640d0e0..6715cb409f 100644
--- a/modules/platforms/cpp/ignite/client/detail/utils.h
+++ b/modules/platforms/cpp/ignite/client/detail/utils.h
@@ -74,7 +74,6 @@ void append_primitive_with_type(binary_tuple_builder
&builder, const primitive &
*/
[[nodiscard]] ignite_tuple concat(const ignite_tuple &left, const ignite_tuple
&right);
-
/**
* Write tuple using table schema and writer.
*
diff --git a/modules/platforms/cpp/ignite/client/ignite_client.cpp
b/modules/platforms/cpp/ignite/client/ignite_client.cpp
index 09475940d0..16743e5bd9 100644
--- a/modules/platforms/cpp/ignite/client/ignite_client.cpp
+++ b/modules/platforms/cpp/ignite/client/ignite_client.cpp
@@ -87,9 +87,8 @@ void
ignite_client::get_cluster_nodes_async(ignite_callback<std::vector<cluster_
}
std::vector<cluster_node> ignite_client::get_cluster_nodes() {
- return sync<std::vector<cluster_node>>([this](auto callback) mutable {
- get_cluster_nodes_async(std::move(callback));
- });
+ return sync<std::vector<cluster_node>>(
+ [this](auto callback) mutable {
get_cluster_nodes_async(std::move(callback)); });
}
detail::ignite_client_impl &ignite_client::impl() noexcept {
diff --git a/modules/platforms/cpp/ignite/client/network/cluster_node.h
b/modules/platforms/cpp/ignite/client/network/cluster_node.h
index 4e0a5f6e08..047ed443e7 100644
--- a/modules/platforms/cpp/ignite/client/network/cluster_node.h
+++ b/modules/platforms/cpp/ignite/client/network/cluster_node.h
@@ -51,27 +51,21 @@ public:
*
* @return Local node id.
*/
- [[nodiscard]] const std::string& get_id() const {
- return m_id;
- }
+ [[nodiscard]] const std::string &get_id() const { return m_id; }
/**
* Gets the unique name of the cluster member. Does not change after node
restart.
*
* @return Unique name of the cluster member.
*/
- [[nodiscard]] const std::string& get_name() const {
- return m_name;
- }
+ [[nodiscard]] const std::string &get_name() const { return m_name; }
/**
* Gets the node address.
*
* @return Node address.
*/
- [[nodiscard]] const network::end_point& get_address() const {
- return m_address;
- }
+ [[nodiscard]] const network::end_point &get_address() const { return
m_address; }
/**
* Compare to another instance.
diff --git a/modules/platforms/cpp/ignite/client/primitive.h
b/modules/platforms/cpp/ignite/client/primitive.h
index a4a9f3b9b7..f9ecd689f4 100644
--- a/modules/platforms/cpp/ignite/client/primitive.h
+++ b/modules/platforms/cpp/ignite/client/primitive.h
@@ -253,9 +253,7 @@ public:
*
* @return Value indicating whether element is null.
*/
- [[nodiscard]] bool is_null() const noexcept {
- return m_value.index() == 0;
- }
+ [[nodiscard]] bool is_null() const noexcept { return m_value.index() == 0;
}
/**
* Get primitive type.
diff --git a/modules/platforms/cpp/ignite/client/table/record_view.cpp
b/modules/platforms/cpp/ignite/client/table/record_view.cpp
index a21ffe01b7..7b6236b161 100644
--- a/modules/platforms/cpp/ignite/client/table/record_view.cpp
+++ b/modules/platforms/cpp/ignite/client/table/record_view.cpp
@@ -16,8 +16,8 @@
*/
#include "ignite/client/table/record_view.h"
-#include "ignite/client/detail/table/table_impl.h"
#include "ignite/client/detail/argument_check_utils.h"
+#include "ignite/client/detail/table/table_impl.h"
namespace ignite {
diff --git
a/modules/platforms/cpp/ignite/network/detail/linux/connecting_context.h
b/modules/platforms/cpp/ignite/network/detail/linux/connecting_context.h
index a1a6e28023..6cd9e9098d 100644
--- a/modules/platforms/cpp/ignite/network/detail/linux/connecting_context.h
+++ b/modules/platforms/cpp/ignite/network/detail/linux/connecting_context.h
@@ -17,9 +17,9 @@
#pragma once
-#include "ignite/network/tcp_range.h"
-#include "ignite/network/detail/linux/linux_async_client.h"
#include "ignite/common/end_point.h"
+#include "ignite/network/detail/linux/linux_async_client.h"
+#include "ignite/network/tcp_range.h"
#include <cstdint>
#include <memory>
diff --git
a/modules/platforms/cpp/ignite/network/detail/linux/linux_async_client.h
b/modules/platforms/cpp/ignite/network/detail/linux/linux_async_client.h
index 1bb5b9351c..4b771f38ce 100644
--- a/modules/platforms/cpp/ignite/network/detail/linux/linux_async_client.h
+++ b/modules/platforms/cpp/ignite/network/detail/linux/linux_async_client.h
@@ -19,10 +19,10 @@
#include "sockets.h"
+#include "ignite/common/end_point.h"
#include "ignite/network/async_handler.h"
#include "ignite/network/codec.h"
#include "ignite/network/tcp_range.h"
-#include "ignite/common/end_point.h"
#include <cstdint>
#include <deque>
diff --git
a/modules/platforms/cpp/ignite/network/detail/linux/linux_async_worker_thread.h
b/modules/platforms/cpp/ignite/network/detail/linux/linux_async_worker_thread.h
index 71a264a068..845c26ab3e 100644
---
a/modules/platforms/cpp/ignite/network/detail/linux/linux_async_worker_thread.h
+++
b/modules/platforms/cpp/ignite/network/detail/linux/linux_async_worker_thread.h
@@ -17,11 +17,11 @@
#pragma once
+#include "ignite/common/end_point.h"
+#include "ignite/network/async_handler.h"
#include "ignite/network/detail/linux/connecting_context.h"
#include "ignite/network/detail/linux/linux_async_client.h"
-#include "ignite/network/async_handler.h"
#include "ignite/network/tcp_range.h"
-#include "ignite/common/end_point.h"
#include <cstdint>
#include <ctime>
diff --git a/modules/platforms/cpp/ignite/network/detail/win/win_async_client.h
b/modules/platforms/cpp/ignite/network/detail/win/win_async_client.h
index 741c2a97a9..b27235216f 100644
--- a/modules/platforms/cpp/ignite/network/detail/win/win_async_client.h
+++ b/modules/platforms/cpp/ignite/network/detail/win/win_async_client.h
@@ -19,10 +19,10 @@
#include "sockets.h"
+#include "ignite/common/end_point.h"
#include "ignite/network/async_handler.h"
#include "ignite/network/codec.h"
#include "ignite/network/tcp_range.h"
-#include "ignite/common/end_point.h"
#include <cstdint>
#include <deque>
diff --git a/modules/platforms/cpp/tests/client-test/compute_test.cpp
b/modules/platforms/cpp/tests/client-test/compute_test.cpp
index 85623fd138..9734c4d7f6 100644
--- a/modules/platforms/cpp/tests/client-test/compute_test.cpp
+++ b/modules/platforms/cpp/tests/client-test/compute_test.cpp
@@ -51,9 +51,8 @@ protected:
*/
cluster_node get_node(size_t id) {
auto nodes = m_client.get_cluster_nodes();
- std::sort(nodes.begin(), nodes.end(), [] (const auto &n1, const auto
&n2) {
- return n1.get_name() < n2.get_name();
- });
+ std::sort(
+ nodes.begin(), nodes.end(), [](const auto &n1, const auto &n2) {
return n1.get_name() < n2.get_name(); });
return nodes[id];
}
@@ -100,9 +99,8 @@ protected:
TEST_F(compute_test, get_cluster_nodes) {
auto cluster_nodes = m_client.get_cluster_nodes();
- std::sort(cluster_nodes.begin(), cluster_nodes.end(), [] (const auto &n1,
const auto &n2) {
- return n1.get_name() < n2.get_name();
- });
+ std::sort(cluster_nodes.begin(), cluster_nodes.end(),
+ [](const auto &n1, const auto &n2) { return n1.get_name() <
n2.get_name(); });
ASSERT_EQ(2, cluster_nodes.size());
@@ -176,8 +174,9 @@ TEST_F(compute_test, job_error_propagates_to_client) {
m_client.get_compute().execute(cluster_nodes, ERROR_JOB,
{"unused"});
} catch (const ignite_error &e) {
EXPECT_THAT(e.what_str(), testing::HasSubstr("Custom job
error"));
- EXPECT_THAT(e.what_str(), testing::HasSubstr(
-
"org.apache.ignite.internal.runner.app.client.ItThinClientComputeTest$CustomException"));
+ EXPECT_THAT(e.what_str(),
+ testing::HasSubstr(
+
"org.apache.ignite.internal.runner.app.client.ItThinClientComputeTest$CustomException"));
EXPECT_THAT(e.what_str(), testing::HasSubstr("IGN-TBL-3"));
throw;
}
@@ -241,12 +240,7 @@ TEST_F(compute_test, all_arg_types) {
}
TEST_F(compute_test, execute_colocated) {
- std::map<std::int32_t, std::string> nodes_for_values = {
- {1, ""},
- {2, "_2"},
- {3, ""},
- {5, "_2"}
- };
+ std::map<std::int32_t, std::string> nodes_for_values = {{1, ""}, {2,
"_2"}, {3, ""}, {5, "_2"}};
for (const auto &var : nodes_for_values) {
SCOPED_TRACE("key=" + std::to_string(var.first) + ", node=" +
var.second);