Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
Incubator Pegasus
提交
1f00a072
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 搜索 >>
提交
1f00a072
编写于
12月 12, 2017
作者:
W
WeijieSun
提交者:
neverchanje
5月 30, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
pegasus/*: fix accordingly as rpc_address's c interface is remove in rdsn
上级
0a5cdb98
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
18 addition
and
19 deletion
+18
-19
rdsn
rdsn
+1
-1
src/base/pegasus_utils.h
src/base/pegasus_utils.h
+1
-1
src/client_lib/pegasus_client_impl.cpp
src/client_lib/pegasus_client_impl.cpp
+6
-9
src/client_lib/pegasus_client_impl.h
src/client_lib/pegasus_client_impl.h
+1
-1
src/redis_protocol/proxy_lib/proxy_layer.cpp
src/redis_protocol/proxy_lib/proxy_layer.cpp
+2
-1
src/server/info_collector.cpp
src/server/info_collector.cpp
+3
-3
src/server/pegasus_counter_updater.cpp
src/server/pegasus_counter_updater.cpp
+1
-1
src/server/pegasus_server_impl.cpp
src/server/pegasus_server_impl.cpp
+1
-1
src/test/function_test/global_env.cpp
src/test/function_test/global_env.cpp
+2
-1
未找到文件。
rdsn
@
ee430052
比较
282694fa
...
ee430052
Subproject commit
282694fa61289f9182e99ec5343af33e36666e6a
Subproject commit
ee4300526975c773804ceaa26f3c4db060053477
src/base/pegasus_utils.h
浏览文件 @
1f00a072
...
...
@@ -8,7 +8,7 @@
#include <cctype>
#include <cstring>
#include <boost/lexical_cast.hpp>
#include <dsn/
cpp/
address.h>
#include <dsn/
tool-api/rpc_
address.h>
namespace
pegasus
{
namespace
utils
{
...
...
src/client_lib/pegasus_client_impl.cpp
浏览文件 @
1f00a072
...
...
@@ -8,6 +8,7 @@
#include <stdint.h>
#include <dsn/tool-api/auto_codes.h>
#include <dsn/tool-api/group_address.h>
#include <dsn/cpp/serialization_helper/dsn.layer2_types.h>
#include <rrdb/rrdb.code.definition.h>
#include <rrdb/rrdb.types.h>
...
...
@@ -29,8 +30,8 @@ pegasus_client_impl::pegasus_client_impl(const char *cluster_name, const char *a
:
_cluster_name
(
cluster_name
),
_app_name
(
app_name
)
{
_server_uri
=
"dsn://"
+
_cluster_name
+
"/"
+
_app_name
;
_server_
address
.
assign_uri
(
dsn_uri_build
(
_server_uri
.
c_str
()
));
_client
=
new
::
dsn
::
apps
::
rrdb_client
(
_server_address
);
_server_
uri_address
.
assign_uri
(
_server_uri
.
c_str
(
));
_client
=
new
::
dsn
::
apps
::
rrdb_client
(
_server_
uri_
address
);
std
::
string
section
=
"uri-resolver.dsn://"
+
_cluster_name
;
std
::
string
server_list
=
dsn_config_get_value_string
(
section
.
c_str
(),
"arguments"
,
""
,
""
);
...
...
@@ -51,17 +52,13 @@ pegasus_client_impl::pegasus_client_impl(const char *cluster_name, const char *a
"no meta server specified in config [%s].arguments"
,
section
.
c_str
());
_meta_server
.
assign_group
(
dsn_group_build
(
"meta-servers"
)
);
_meta_server
.
assign_group
(
"meta-servers"
);
for
(
auto
&
ms
:
meta_servers
)
{
dsn_group_add
(
_meta_server
.
group_handle
(),
ms
.
c_addr
()
);
_meta_server
.
group_address
()
->
add
(
ms
);
}
}
pegasus_client_impl
::~
pegasus_client_impl
()
{
delete
_client
;
dsn_uri_destroy
(
_server_address
.
group_handle
());
}
pegasus_client_impl
::~
pegasus_client_impl
()
{
delete
_client
;
}
const
char
*
pegasus_client_impl
::
get_cluster_name
()
const
{
return
_cluster_name
.
c_str
();
}
...
...
src/client_lib/pegasus_client_impl.h
浏览文件 @
1f00a072
...
...
@@ -249,7 +249,7 @@ private:
std
::
string
_cluster_name
;
std
::
string
_app_name
;
std
::
string
_server_uri
;
::
dsn
::
rpc_address
_server_address
;
::
dsn
::
rpc_address
_server_
uri_
address
;
::
dsn
::
rpc_address
_meta_server
;
::
dsn
::
apps
::
rrdb_client
*
_client
;
...
...
src/redis_protocol/proxy_lib/proxy_layer.cpp
浏览文件 @
1f00a072
...
...
@@ -2,6 +2,7 @@
// This source code is licensed under the Apache License Version 2.0, which
// can be found in the LICENSE file in the root directory of this source tree.
#include <dsn/tool-api/uri_address.h>
#include "proxy_layer.h"
namespace
pegasus
{
...
...
@@ -10,7 +11,7 @@ namespace proxy {
proxy_stub
::
proxy_stub
(
const
proxy_session
::
factory
&
factory
,
const
char
*
uri
)
:
serverlet
<
proxy_stub
>
(
"proxy_stub"
),
_factory
(
factory
)
{
_uri_address
.
assign_uri
(
dsn_uri_build
(
uri
)
);
_uri_address
.
assign_uri
(
uri
);
open_service
();
}
...
...
src/server/info_collector.cpp
浏览文件 @
1f00a072
...
...
@@ -3,6 +3,7 @@
// can be found in the LICENSE file in the root directory of this source tree.
#include "info_collector.h"
#include <dsn/tool-api/group_address.h>
#include <pegasus_utils.h>
#include <iostream>
#include <functional>
...
...
@@ -26,9 +27,9 @@ info_collector::info_collector()
std
::
vector
<::
dsn
::
rpc_address
>
meta_servers
;
replica_helper
::
load_meta_servers
(
meta_servers
);
_meta_servers
.
assign_group
(
dsn_group_build
(
"meta-servers"
)
);
_meta_servers
.
assign_group
(
"meta-servers"
);
for
(
auto
&
ms
:
meta_servers
)
{
dsn_group_add
(
_meta_servers
.
group_handle
(),
ms
.
c_addr
()
);
_meta_servers
.
group_address
()
->
add
(
ms
);
}
_cluster_name
=
dsn_config_get_value_string
(
"pegasus.collector"
,
"cluster"
,
""
,
"cluster name"
);
...
...
@@ -49,7 +50,6 @@ info_collector::~info_collector()
for
(
auto
kv
:
_app_stat_counters
)
{
delete
kv
.
second
;
}
dsn_group_destroy
(
_meta_servers
.
group_handle
());
}
void
info_collector
::
start
()
...
...
src/server/pegasus_counter_updater.cpp
浏览文件 @
1f00a072
...
...
@@ -187,7 +187,7 @@ void pegasus_counter_updater::start()
if
(
_report_timer
!=
nullptr
)
return
;
rpc_address
addr
(
(
dsn_address_t
)
dsn_primary_address
());
rpc_address
addr
(
dsn_primary_address
());
char
buf
[
1000
];
pegasus
::
utils
::
addr2host
(
addr
,
buf
,
1000
);
_local_host
=
buf
;
...
...
src/server/pegasus_server_impl.cpp
浏览文件 @
1f00a072
...
...
@@ -6,7 +6,7 @@
#include <pegasus_key_schema.h>
#include <pegasus_value_schema.h>
#include <pegasus_utils.h>
#include <dsn/
cpp
/smart_pointers.h>
#include <dsn/
utility
/smart_pointers.h>
#include <dsn/utility/utils.h>
#include <dsn/utility/filesystem.h>
#include <rocksdb/utilities/checkpoint.h>
...
...
src/test/function_test/global_env.cpp
浏览文件 @
1f00a072
...
...
@@ -9,6 +9,7 @@
#include <memory>
#include <dsn/utility/utils.h>
#include <dsn/tool-api/rpc_address.h>
#include <dsn/c/api_layer1.h>
#include <arpa/inet.h>
...
...
@@ -52,7 +53,7 @@ void global_env::get_dirs()
void
global_env
::
get_hostip
()
{
uint32_t
ip
=
dsn
_ipv4_local
(
""
);
uint32_t
ip
=
dsn
::
rpc_address
::
ipv4_from_network_interface
(
""
);
uint32_t
ipnet
=
htonl
(
ip
);
char
buffer
[
512
];
memset
(
buffer
,
0
,
sizeof
(
buffer
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录