aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraozeritsky <aozeritsky@ydb.tech>2023-10-24 20:51:25 +0300
committeraozeritsky <aozeritsky@ydb.tech>2023-10-24 21:08:45 +0300
commit621ec2027f2f3c9ce8813fd72a39e29a89fc9bcb (patch)
treef64da51c7b516649290f0cd749e8e8513d09c230
parent623315504d982fbdc29eb377737d4ffcab4e5960 (diff)
downloadydb-621ec2027f2f3c9ce8813fd72a39e29a89fc9bcb.tar.gz
Fix service_node/worker_node dependencies
-rw-r--r--.mapping.json5
-rw-r--r--ydb/library/yql/providers/dq/CMakeLists.darwin-x86_64.txt1
-rw-r--r--ydb/library/yql/providers/dq/CMakeLists.linux-aarch64.txt1
-rw-r--r--ydb/library/yql/providers/dq/CMakeLists.linux-x86_64.txt1
-rw-r--r--ydb/library/yql/providers/dq/CMakeLists.windows-x86_64.txt1
-rw-r--r--ydb/library/yql/providers/dq/metrics/CMakeLists.darwin-x86_64.txt22
-rw-r--r--ydb/library/yql/providers/dq/metrics/CMakeLists.linux-aarch64.txt23
-rw-r--r--ydb/library/yql/providers/dq/metrics/CMakeLists.linux-x86_64.txt23
-rw-r--r--ydb/library/yql/providers/dq/metrics/CMakeLists.txt17
-rw-r--r--ydb/library/yql/providers/dq/metrics/CMakeLists.windows-x86_64.txt22
-rw-r--r--ydb/library/yql/providers/dq/metrics/metrics_pusher.cpp49
-rw-r--r--ydb/library/yql/providers/dq/metrics/metrics_pusher.h12
-rw-r--r--ydb/library/yql/providers/dq/metrics/ya.make19
-rw-r--r--ydb/library/yql/providers/dq/ya.make1
14 files changed, 197 insertions, 0 deletions
diff --git a/.mapping.json b/.mapping.json
index 9adbc7f04e..5b4c5e3cb0 100644
--- a/.mapping.json
+++ b/.mapping.json
@@ -7573,6 +7573,11 @@
"ydb/library/yql/providers/dq/local_gateway/CMakeLists.linux-aarch64.txt":"",
"ydb/library/yql/providers/dq/local_gateway/CMakeLists.linux-x86_64.txt":"",
"ydb/library/yql/providers/dq/local_gateway/CMakeLists.txt":"",
+ "ydb/library/yql/providers/dq/metrics/CMakeLists.darwin-x86_64.txt":"",
+ "ydb/library/yql/providers/dq/metrics/CMakeLists.linux-aarch64.txt":"",
+ "ydb/library/yql/providers/dq/metrics/CMakeLists.linux-x86_64.txt":"",
+ "ydb/library/yql/providers/dq/metrics/CMakeLists.txt":"",
+ "ydb/library/yql/providers/dq/metrics/CMakeLists.windows-x86_64.txt":"",
"ydb/library/yql/providers/dq/mkql/CMakeLists.darwin-x86_64.txt":"",
"ydb/library/yql/providers/dq/mkql/CMakeLists.linux-aarch64.txt":"",
"ydb/library/yql/providers/dq/mkql/CMakeLists.linux-x86_64.txt":"",
diff --git a/ydb/library/yql/providers/dq/CMakeLists.darwin-x86_64.txt b/ydb/library/yql/providers/dq/CMakeLists.darwin-x86_64.txt
index 1b2879cd08..a72600c8cf 100644
--- a/ydb/library/yql/providers/dq/CMakeLists.darwin-x86_64.txt
+++ b/ydb/library/yql/providers/dq/CMakeLists.darwin-x86_64.txt
@@ -15,6 +15,7 @@ add_subdirectory(expr_nodes)
add_subdirectory(global_worker_manager)
add_subdirectory(interface)
add_subdirectory(local_gateway)
+add_subdirectory(metrics)
add_subdirectory(mkql)
add_subdirectory(opt)
add_subdirectory(planner)
diff --git a/ydb/library/yql/providers/dq/CMakeLists.linux-aarch64.txt b/ydb/library/yql/providers/dq/CMakeLists.linux-aarch64.txt
index 1b2879cd08..a72600c8cf 100644
--- a/ydb/library/yql/providers/dq/CMakeLists.linux-aarch64.txt
+++ b/ydb/library/yql/providers/dq/CMakeLists.linux-aarch64.txt
@@ -15,6 +15,7 @@ add_subdirectory(expr_nodes)
add_subdirectory(global_worker_manager)
add_subdirectory(interface)
add_subdirectory(local_gateway)
+add_subdirectory(metrics)
add_subdirectory(mkql)
add_subdirectory(opt)
add_subdirectory(planner)
diff --git a/ydb/library/yql/providers/dq/CMakeLists.linux-x86_64.txt b/ydb/library/yql/providers/dq/CMakeLists.linux-x86_64.txt
index 1b2879cd08..a72600c8cf 100644
--- a/ydb/library/yql/providers/dq/CMakeLists.linux-x86_64.txt
+++ b/ydb/library/yql/providers/dq/CMakeLists.linux-x86_64.txt
@@ -15,6 +15,7 @@ add_subdirectory(expr_nodes)
add_subdirectory(global_worker_manager)
add_subdirectory(interface)
add_subdirectory(local_gateway)
+add_subdirectory(metrics)
add_subdirectory(mkql)
add_subdirectory(opt)
add_subdirectory(planner)
diff --git a/ydb/library/yql/providers/dq/CMakeLists.windows-x86_64.txt b/ydb/library/yql/providers/dq/CMakeLists.windows-x86_64.txt
index 8a3422b0d6..903aef46bf 100644
--- a/ydb/library/yql/providers/dq/CMakeLists.windows-x86_64.txt
+++ b/ydb/library/yql/providers/dq/CMakeLists.windows-x86_64.txt
@@ -14,6 +14,7 @@ add_subdirectory(counters)
add_subdirectory(expr_nodes)
add_subdirectory(global_worker_manager)
add_subdirectory(interface)
+add_subdirectory(metrics)
add_subdirectory(mkql)
add_subdirectory(opt)
add_subdirectory(planner)
diff --git a/ydb/library/yql/providers/dq/metrics/CMakeLists.darwin-x86_64.txt b/ydb/library/yql/providers/dq/metrics/CMakeLists.darwin-x86_64.txt
new file mode 100644
index 0000000000..dd25a89ad8
--- /dev/null
+++ b/ydb/library/yql/providers/dq/metrics/CMakeLists.darwin-x86_64.txt
@@ -0,0 +1,22 @@
+
+# This file was generated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+
+add_library(providers-dq-metrics)
+target_compile_options(providers-dq-metrics PRIVATE
+ -DUSE_CURRENT_UDF_ABI_VERSION
+)
+target_link_libraries(providers-dq-metrics PUBLIC
+ contrib-libs-cxxsupp
+ yutil
+ cpp-actors-core
+ providers-solomon-async_io
+)
+target_sources(providers-dq-metrics PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/library/yql/providers/dq/metrics/metrics_pusher.cpp
+)
diff --git a/ydb/library/yql/providers/dq/metrics/CMakeLists.linux-aarch64.txt b/ydb/library/yql/providers/dq/metrics/CMakeLists.linux-aarch64.txt
new file mode 100644
index 0000000000..64a4aab55d
--- /dev/null
+++ b/ydb/library/yql/providers/dq/metrics/CMakeLists.linux-aarch64.txt
@@ -0,0 +1,23 @@
+
+# This file was generated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+
+add_library(providers-dq-metrics)
+target_compile_options(providers-dq-metrics PRIVATE
+ -DUSE_CURRENT_UDF_ABI_VERSION
+)
+target_link_libraries(providers-dq-metrics PUBLIC
+ contrib-libs-linux-headers
+ contrib-libs-cxxsupp
+ yutil
+ cpp-actors-core
+ providers-solomon-async_io
+)
+target_sources(providers-dq-metrics PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/library/yql/providers/dq/metrics/metrics_pusher.cpp
+)
diff --git a/ydb/library/yql/providers/dq/metrics/CMakeLists.linux-x86_64.txt b/ydb/library/yql/providers/dq/metrics/CMakeLists.linux-x86_64.txt
new file mode 100644
index 0000000000..64a4aab55d
--- /dev/null
+++ b/ydb/library/yql/providers/dq/metrics/CMakeLists.linux-x86_64.txt
@@ -0,0 +1,23 @@
+
+# This file was generated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+
+add_library(providers-dq-metrics)
+target_compile_options(providers-dq-metrics PRIVATE
+ -DUSE_CURRENT_UDF_ABI_VERSION
+)
+target_link_libraries(providers-dq-metrics PUBLIC
+ contrib-libs-linux-headers
+ contrib-libs-cxxsupp
+ yutil
+ cpp-actors-core
+ providers-solomon-async_io
+)
+target_sources(providers-dq-metrics PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/library/yql/providers/dq/metrics/metrics_pusher.cpp
+)
diff --git a/ydb/library/yql/providers/dq/metrics/CMakeLists.txt b/ydb/library/yql/providers/dq/metrics/CMakeLists.txt
new file mode 100644
index 0000000000..f8b31df0c1
--- /dev/null
+++ b/ydb/library/yql/providers/dq/metrics/CMakeLists.txt
@@ -0,0 +1,17 @@
+
+# This file was generated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND NOT HAVE_CUDA)
+ include(CMakeLists.linux-aarch64.txt)
+elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+ include(CMakeLists.darwin-x86_64.txt)
+elseif (WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" AND NOT HAVE_CUDA)
+ include(CMakeLists.windows-x86_64.txt)
+elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND NOT HAVE_CUDA)
+ include(CMakeLists.linux-x86_64.txt)
+endif()
diff --git a/ydb/library/yql/providers/dq/metrics/CMakeLists.windows-x86_64.txt b/ydb/library/yql/providers/dq/metrics/CMakeLists.windows-x86_64.txt
new file mode 100644
index 0000000000..dd25a89ad8
--- /dev/null
+++ b/ydb/library/yql/providers/dq/metrics/CMakeLists.windows-x86_64.txt
@@ -0,0 +1,22 @@
+
+# This file was generated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+
+add_library(providers-dq-metrics)
+target_compile_options(providers-dq-metrics PRIVATE
+ -DUSE_CURRENT_UDF_ABI_VERSION
+)
+target_link_libraries(providers-dq-metrics PUBLIC
+ contrib-libs-cxxsupp
+ yutil
+ cpp-actors-core
+ providers-solomon-async_io
+)
+target_sources(providers-dq-metrics PRIVATE
+ ${CMAKE_SOURCE_DIR}/ydb/library/yql/providers/dq/metrics/metrics_pusher.cpp
+)
diff --git a/ydb/library/yql/providers/dq/metrics/metrics_pusher.cpp b/ydb/library/yql/providers/dq/metrics/metrics_pusher.cpp
new file mode 100644
index 0000000000..3074a85832
--- /dev/null
+++ b/ydb/library/yql/providers/dq/metrics/metrics_pusher.cpp
@@ -0,0 +1,49 @@
+#include "metrics_pusher.h"
+
+#include <library/cpp/actors/core/hfunc.h>
+#include <library/cpp/actors/http/http_proxy.h>
+#include <library/cpp/monlib/encode/format.h>
+
+#include <ydb/library/yql/utils/log/log.h>
+
+namespace NYql {
+ using namespace NActors;
+
+ class TCountersPrinter : public TActorBootstrapped<TCountersPrinter> {
+ public:
+ static constexpr char ActorName[] = "COUNTERS_PRINTER";
+
+ TCountersPrinter(TIntrusivePtr<NMonitoring::TDynamicCounters> counters, TDuration duration)
+ : TActorBootstrapped<TCountersPrinter>(), Counters(std::move(counters)), Duration(duration)
+ { }
+
+ void Bootstrap() {
+ Become(&TThis::Handler, Duration, new TEvents::TEvWakeup());
+ }
+
+ private:
+ STRICT_STFUNC(Handler,
+ {
+ cFunc(TEvents::TSystem::Wakeup, Handle);
+ cFunc(TEvents::TEvPoisonPill::EventType, PassAway);
+ });
+
+ void Handle() {
+ TString output;
+ {
+ TStringOutput ostream(output);
+ Counters->OutputPlainText(ostream);
+ }
+ YQL_CLOG(DEBUG, ProviderDq) << "Counters: " << output;
+ Schedule(Duration, new TEvents::TEvWakeup());
+ }
+
+ TIntrusivePtr <NMonitoring::TDynamicCounters> Counters;
+ TDuration Duration;
+ };
+
+ NActors::IActor* CreateMetricsPrinter(const NMonitoring::TDynamicCounterPtr& counters)
+ {
+ return new TCountersPrinter(counters, TDuration::Seconds(30));
+ };
+} // namespace NYql
diff --git a/ydb/library/yql/providers/dq/metrics/metrics_pusher.h b/ydb/library/yql/providers/dq/metrics/metrics_pusher.h
new file mode 100644
index 0000000000..5ec0140d25
--- /dev/null
+++ b/ydb/library/yql/providers/dq/metrics/metrics_pusher.h
@@ -0,0 +1,12 @@
+#pragma once
+
+#include <ydb/library/yql/providers/common/metrics/metrics_registry.h>
+
+#include <library/cpp/actors/core/actor_bootstrapped.h>
+
+
+namespace NYql {
+
+NActors::IActor* CreateMetricsPrinter(const NMonitoring::TDynamicCounterPtr& counters);
+
+} // namespace NYql
diff --git a/ydb/library/yql/providers/dq/metrics/ya.make b/ydb/library/yql/providers/dq/metrics/ya.make
new file mode 100644
index 0000000000..402ba1b2a4
--- /dev/null
+++ b/ydb/library/yql/providers/dq/metrics/ya.make
@@ -0,0 +1,19 @@
+LIBRARY()
+
+SET(
+ SOURCE
+ metrics_pusher.cpp
+)
+
+SRCS(
+ ${SOURCE}
+)
+
+PEERDIR(
+ library/cpp/actors/core
+ ydb/library/yql/providers/solomon/async_io
+)
+
+YQL_LAST_ABI_VERSION()
+
+END()
diff --git a/ydb/library/yql/providers/dq/ya.make b/ydb/library/yql/providers/dq/ya.make
index b134a0eeef..e44cf18b62 100644
--- a/ydb/library/yql/providers/dq/ya.make
+++ b/ydb/library/yql/providers/dq/ya.make
@@ -16,4 +16,5 @@ RECURSE(
task_runner
task_runner_actor
worker_manager
+ metrics
)