Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
镜像
OpenAtomFoundation
pika
提交
bd01258d
pika
项目概览
镜像
/
OpenAtomFoundation
/
pika
11 个月 前同步成功
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
pika
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bd01258d
编写于
8月 09, 2016
作者:
W
wenduo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feature:can bind to specific network-interface now
上级
2a57a90a
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
17 addition
and
12 deletion
+17
-12
include/pika_binlog_receiver_thread.h
include/pika_binlog_receiver_thread.h
+1
-1
include/pika_dispatch_thread.h
include/pika_dispatch_thread.h
+1
-0
include/pika_heartbeat_thread.h
include/pika_heartbeat_thread.h
+1
-1
src/pika_binlog_receiver_thread.cc
src/pika_binlog_receiver_thread.cc
+2
-2
src/pika_dispatch_thread.cc
src/pika_dispatch_thread.cc
+4
-0
src/pika_heartbeat_thread.cc
src/pika_heartbeat_thread.cc
+2
-2
src/pika_server.cc
src/pika_server.cc
+3
-3
src/pika_trysync_thread.cc
src/pika_trysync_thread.cc
+1
-1
third/pink
third/pink
+1
-1
third/slash
third/slash
+1
-1
未找到文件。
include/pika_binlog_receiver_thread.h
浏览文件 @
bd01258d
...
...
@@ -13,7 +13,7 @@
class
PikaBinlogReceiverThread
:
public
pink
::
HolyThread
<
PikaMasterConn
>
{
public:
PikaBinlogReceiverThread
(
int
port
,
int
cron_interval
=
0
);
PikaBinlogReceiverThread
(
std
::
string
&
ip
,
int
port
,
int
cron_interval
=
0
);
virtual
~
PikaBinlogReceiverThread
();
virtual
void
CronHandle
();
virtual
bool
AccessHandle
(
std
::
string
&
ip
);
...
...
include/pika_dispatch_thread.h
浏览文件 @
bd01258d
...
...
@@ -9,6 +9,7 @@ class PikaDispatchThread : public pink::DispatchThread<PikaClientConn>
{
public:
PikaDispatchThread
(
int
port
,
int
work_num
,
PikaWorkerThread
**
pika_worker_thread
,
int
cron_interval
);
PikaDispatchThread
(
std
::
string
&
ip
,
int
port
,
int
work_num
,
PikaWorkerThread
**
pika_worker_thread
,
int
cron_interval
);
virtual
~
PikaDispatchThread
();
virtual
void
CronHandle
();
virtual
bool
AccessHandle
(
std
::
string
&
ip
);
...
...
include/pika_heartbeat_thread.h
浏览文件 @
bd01258d
...
...
@@ -7,7 +7,7 @@
class
PikaHeartbeatThread
:
public
pink
::
HolyThread
<
PikaHeartbeatConn
>
{
public:
PikaHeartbeatThread
(
int
port
,
int
cron_interval
=
0
);
PikaHeartbeatThread
(
std
::
string
&
ip
,
int
port
,
int
cron_interval
=
0
);
virtual
~
PikaHeartbeatThread
();
virtual
void
CronHandle
();
virtual
bool
AccessHandle
(
std
::
string
&
ip_port
);
...
...
src/pika_binlog_receiver_thread.cc
浏览文件 @
bd01258d
...
...
@@ -6,8 +6,8 @@
extern
PikaServer
*
g_pika_server
;
PikaBinlogReceiverThread
::
PikaBinlogReceiverThread
(
int
port
,
int
cron_interval
)
:
HolyThread
::
HolyThread
(
port
,
cron_interval
),
PikaBinlogReceiverThread
::
PikaBinlogReceiverThread
(
std
::
string
&
ip
,
int
port
,
int
cron_interval
)
:
HolyThread
::
HolyThread
(
ip
,
port
,
cron_interval
),
thread_querynum_
(
0
),
last_thread_querynum_
(
0
),
last_time_us_
(
slash
::
NowMicros
()),
...
...
src/pika_dispatch_thread.cc
浏览文件 @
bd01258d
...
...
@@ -11,6 +11,10 @@ PikaDispatchThread::PikaDispatchThread(int port, int work_num, PikaWorkerThread*
DispatchThread
::
DispatchThread
(
port
,
work_num
,
reinterpret_cast
<
pink
::
WorkerThread
<
PikaClientConn
>**>
(
pika_worker_thread
),
cron_interval
)
{
}
PikaDispatchThread
::
PikaDispatchThread
(
std
::
string
&
ip
,
int
port
,
int
work_num
,
PikaWorkerThread
**
pika_worker_thread
,
int
cron_interval
)
:
DispatchThread
::
DispatchThread
(
ip
,
port
,
work_num
,
reinterpret_cast
<
pink
::
WorkerThread
<
PikaClientConn
>**>
(
pika_worker_thread
),
cron_interval
)
{
}
PikaDispatchThread
::~
PikaDispatchThread
()
{
LOG
(
INFO
)
<<
"dispatch thread "
<<
thread_id
()
<<
" exit!!!"
;
}
...
...
src/pika_heartbeat_thread.cc
浏览文件 @
bd01258d
...
...
@@ -6,8 +6,8 @@
extern
PikaServer
*
g_pika_server
;
PikaHeartbeatThread
::
PikaHeartbeatThread
(
int
port
,
int
cron_interval
)
:
HolyThread
::
HolyThread
(
port
,
cron_interval
)
{
PikaHeartbeatThread
::
PikaHeartbeatThread
(
std
::
string
&
ip
,
int
port
,
int
cron_interval
)
:
HolyThread
::
HolyThread
(
ip
,
port
,
cron_interval
)
{
}
PikaHeartbeatThread
::~
PikaHeartbeatThread
()
{
...
...
src/pika_server.cc
浏览文件 @
bd01258d
...
...
@@ -66,9 +66,9 @@ PikaServer::PikaServer() :
pika_worker_thread_
[
i
]
=
new
PikaWorkerThread
(
1000
);
}
pika_dispatch_thread_
=
new
PikaDispatchThread
(
port_
,
worker_num_
,
pika_worker_thread_
,
3000
);
pika_binlog_receiver_thread_
=
new
PikaBinlogReceiverThread
(
port_
+
1000
,
1000
);
pika_heartbeat_thread_
=
new
PikaHeartbeatThread
(
port_
+
2000
,
1000
);
pika_dispatch_thread_
=
new
PikaDispatchThread
(
host_
,
port_
,
worker_num_
,
pika_worker_thread_
,
3000
);
pika_binlog_receiver_thread_
=
new
PikaBinlogReceiverThread
(
host_
,
port_
+
1000
,
1000
);
pika_heartbeat_thread_
=
new
PikaHeartbeatThread
(
host_
,
port_
+
2000
,
1000
);
pika_trysync_thread_
=
new
PikaTrysyncThread
();
monitor_thread_
=
new
PikaMonitorThread
();
...
...
src/pika_trysync_thread.cc
浏览文件 @
bd01258d
...
...
@@ -208,7 +208,7 @@ void* PikaTrysyncThread::ThreadMain() {
std
::
string
ip_port
=
slash
::
IpPortString
(
master_ip
,
master_port
);
// We append the master ip port after module name
// To make sure only data from current master is received
int
ret
=
slash
::
StartRsync
(
dbsync_path
,
kDBSyncModule
+
"_"
+
ip_port
,
g_pika_conf
->
port
()
+
3000
);
int
ret
=
slash
::
StartRsync
(
dbsync_path
,
kDBSyncModule
+
"_"
+
ip_port
,
g_pika_
server
->
host
(),
g_pika_
conf
->
port
()
+
3000
);
if
(
0
!=
ret
)
{
LOG
(
WARNING
)
<<
"Failed to start rsync, path:"
<<
dbsync_path
<<
" error : "
<<
ret
;
}
...
...
pink
@
14e45570
比较
59c89f03
...
14e45570
Subproject commit
59c89f037dfdbd252e5f5f46fa6fcddc6f5716ba
Subproject commit
14e45570276ca1663b7913a8c11c4ad065db2b2f
slash
@
f9c93459
比较
b75f13da
...
f9c93459
Subproject commit
b75f13dae2bbba609f948db4c83b16a8bf40f20b
Subproject commit
f9c93459fb035c852907ea64605fd3fb3624e5b9
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录