Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
Incubator Pegasus
提交
944093b8
Incubator Pegasus
项目概览
apache
/
Incubator Pegasus
通知
9
Star
5
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Incubator Pegasus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
944093b8
编写于
1月 20, 2020
作者:
W
Wu Tao
提交者:
neverchanje
3月 31, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(config): remove duplicated config items for cluster name (#462)
上级
83d2f015
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
9 addition
and
26 deletion
+9
-26
src/reporter/pegasus_counter_reporter.cpp
src/reporter/pegasus_counter_reporter.cpp
+4
-11
src/server/available_detector.cpp
src/server/available_detector.cpp
+2
-2
src/server/config.ini
src/server/config.ini
+0
-3
src/server/config.min.ini
src/server/config.min.ini
+1
-3
src/server/info_collector.cpp
src/server/info_collector.cpp
+2
-7
未找到文件。
src/reporter/pegasus_counter_reporter.cpp
浏览文件 @
944093b8
...
...
@@ -8,12 +8,11 @@
#include <ios>
#include <iomanip>
#include <iostream>
#include <fstream>
#include <unistd.h>
#include <dsn/utility/smart_pointers.h>
#include <dsn/cpp/service_app.h>
#include <dsn/dist/replication/duplication_common.h>
#include "base/pegasus_utils.h"
#include "pegasus_io_service.h"
...
...
@@ -22,10 +21,6 @@
#include <map>
#include <memory>
#include <string>
#include <thread>
#include <sstream>
#include <iterator>
#include <regex>
using
namespace
::
dsn
;
...
...
@@ -140,9 +135,7 @@ void pegasus_counter_reporter::start()
_app_name
=
dsn
::
service_app
::
current_service_app_info
().
full_name
;
_cluster_name
=
dsn_config_get_value_string
(
"pegasus.server"
,
"perf_counter_cluster_name"
,
""
,
"perf_counter_cluster_name"
);
dassert
(
_cluster_name
.
size
()
>
0
,
""
);
_cluster_name
=
dsn
::
replication
::
get_current_cluster_name
();
_update_interval_seconds
=
dsn_config_get_value_uint64
(
"pegasus.server"
,
"perf_counter_update_interval_seconds"
,
...
...
@@ -355,5 +348,5 @@ void pegasus_counter_reporter::on_report_timer(std::shared_ptr<boost::asio::dead
dassert
(
false
,
"pegasus report timer error!!!"
);
}
}
}
}
// namespace
}
// namespace server
}
// namespace
pegasus
src/server/available_detector.cpp
浏览文件 @
944093b8
...
...
@@ -7,6 +7,7 @@
#include <iomanip>
#include <algorithm>
#include <sstream>
#include <dsn/dist/replication/duplication_common.h>
#include "base/pegasus_key_schema.h"
#include "result_writer.h"
...
...
@@ -29,8 +30,7 @@ available_detector::available_detector()
_recent_minute_fail_times
(
0
)
{
// initialize information for available_detector.
_cluster_name
=
dsn_config_get_value_string
(
"pegasus.collector"
,
"cluster"
,
""
,
"cluster name"
);
dassert
(
_cluster_name
.
size
()
>
0
,
""
);
_cluster_name
=
dsn
::
replication
::
get_current_cluster_name
();
_app_name
=
dsn_config_get_value_string
(
"pegasus.collector"
,
"available_detect_app"
,
""
,
"available detector app name"
);
dassert
(
_app_name
.
size
()
>
0
,
""
);
...
...
src/server/config.ini
浏览文件 @
944093b8
...
...
@@ -287,7 +287,6 @@
manual_compact_min_interval_seconds
=
600
perf_counter_cluster_name
=
%{cluster.name}
perf_counter_update_interval_seconds
=
10
perf_counter_enable_logging
=
false
perf_counter_enable_falcon
=
false
...
...
@@ -303,8 +302,6 @@
prometheus_port
=
9091
[pegasus.collector]
cluster
=
%{cluster.name}
available_detect_app
=
temp
available_detect_alert_script_dir
=
./package/bin
available_detect_alert_email_address
=
...
...
src/server/config.min.ini
浏览文件 @
944093b8
...
...
@@ -100,6 +100,7 @@
mutation_2pc_min_replica_count
=
1
cold_backup_root
=
onebox
duplication_disabled
=
true
cluster_name
=
onebox
[meta_server.apps.@APP_NAME@]
app_name
=
@APP_NAME@
...
...
@@ -112,12 +113,9 @@
partition_count
=
4
[pegasus.server]
perf_counter_cluster_name
=
onebox
perf_counter_enable_logging
=
false
[pegasus.collector]
cluster
=
onebox
available_detect_app
=
@APP_NAME@
available_detect_alert_script_dir
=
./package/bin
usage_stat_app
=
stat
...
...
src/server/info_collector.cpp
浏览文件 @
944093b8
...
...
@@ -6,18 +6,14 @@
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <vector>
#include <chrono>
#include <functional>
#include <dsn/tool-api/group_address.h>
#include <dsn/dist/replication/duplication_common.h>
#include "base/pegasus_utils.h"
#include "base/pegasus_const.h"
#include "result_writer.h"
#define METRICSNUM 3
using
namespace
::
dsn
;
using
namespace
::
dsn
::
replication
;
...
...
@@ -42,8 +38,7 @@ info_collector::info_collector()
_meta_servers
.
group_address
()
->
add
(
ms
);
}
_cluster_name
=
dsn_config_get_value_string
(
"pegasus.collector"
,
"cluster"
,
""
,
"cluster name"
);
dassert
(
!
_cluster_name
.
empty
(),
""
);
_cluster_name
=
dsn
::
replication
::
get_current_cluster_name
();
_shell_context
.
current_cluster_name
=
_cluster_name
;
_shell_context
.
meta_list
=
meta_servers
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录