Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
milvus
提交
de6d6823
milvus
项目概览
BaiXuePrincess
/
milvus
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
Star
4
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
de6d6823
编写于
8月 18, 2019
作者:
W
wxyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MS-375 Add Dump implementation for Event
Former-commit-id: c8518b48914da67bce45660866970c8c4eee915a
上级
40d81726
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
84 addition
and
0 deletion
+84
-0
cpp/CHANGELOG.md
cpp/CHANGELOG.md
+1
-0
cpp/src/scheduler/event/CopyCompletedEvent.h
cpp/src/scheduler/event/CopyCompletedEvent.h
+8
-0
cpp/src/scheduler/event/Event.h
cpp/src/scheduler/event/Event.h
+9
-0
cpp/src/scheduler/event/EventDump.cpp
cpp/src/scheduler/event/EventDump.cpp
+45
-0
cpp/src/scheduler/event/FinishTaskEvent.h
cpp/src/scheduler/event/FinishTaskEvent.h
+7
-0
cpp/src/scheduler/event/StartUpEvent.h
cpp/src/scheduler/event/StartUpEvent.h
+7
-0
cpp/src/scheduler/event/TaskTableUpdatedEvent.h
cpp/src/scheduler/event/TaskTableUpdatedEvent.h
+7
-0
未找到文件。
cpp/CHANGELOG.md
浏览文件 @
de6d6823
...
...
@@ -26,6 +26,7 @@ Please mark all change in change log and use the ticket from JIRA.
-
MS-371 - Add TaskTableUpdatedEvent
-
MS-373 - Add resource test
-
MS-374 - Add action definition
-
MS-375 - Add Dump implementation for Event
## New Feature
-
MS-343 - Implement ResourceMgr
...
...
cpp/src/scheduler/event/CopyCompletedEvent.h
浏览文件 @
de6d6823
...
...
@@ -18,6 +18,14 @@ public:
CopyCompletedEvent
(
std
::
weak_ptr
<
Resource
>
resource
,
TaskTableItemPtr
task_table_item
)
:
Event
(
EventType
::
COPY_COMPLETED
,
std
::
move
(
resource
)),
task_table_item_
(
std
::
move
(
task_table_item
))
{}
inline
std
::
string
Dump
()
const
override
{
return
"<CopyCompletedEvent>"
;
}
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
CopyCompletedEvent
&
event
);
public:
TaskTableItemPtr
task_table_item_
;
};
...
...
cpp/src/scheduler/event/Event.h
浏览文件 @
de6d6823
...
...
@@ -5,6 +5,8 @@
******************************************************************************/
#pragma once
#include <memory>
namespace
zilliz
{
namespace
milvus
{
namespace
engine
{
...
...
@@ -30,6 +32,13 @@ public:
return
type_
;
}
inline
virtual
std
::
string
Dump
()
const
{
return
"<Event>"
;
}
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
Event
&
event
);
public:
EventType
type_
;
std
::
weak_ptr
<
Resource
>
resource_
;
...
...
cpp/src/scheduler/event/EventDump.cpp
0 → 100644
浏览文件 @
de6d6823
/*******************************************************************************
* Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited.
* Proprietary and confidential.
******************************************************************************/
#include "Event.h"
#include "StartUpEvent.h"
#include "CopyCompletedEvent.h"
#include "FinishTaskEvent.h"
#include "TaskTableUpdatedEvent.h"
namespace
zilliz
{
namespace
milvus
{
namespace
engine
{
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
Event
&
event
)
{
out
<<
event
.
Dump
();
return
out
;
}
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
StartUpEvent
&
event
)
{
out
<<
event
.
Dump
();
return
out
;
}
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
CopyCompletedEvent
&
event
)
{
out
<<
event
.
Dump
();
return
out
;
}
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
FinishTaskEvent
&
event
)
{
out
<<
event
.
Dump
();
return
out
;
}
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
TaskTableUpdatedEvent
&
event
)
{
out
<<
event
.
Dump
();
return
out
;
}
}
}
}
cpp/src/scheduler/event/FinishTaskEvent.h
浏览文件 @
de6d6823
...
...
@@ -18,6 +18,13 @@ public:
:
Event
(
EventType
::
FINISH_TASK
,
std
::
move
(
resource
)),
task_table_item_
(
std
::
move
(
task_table_item
))
{}
inline
std
::
string
Dump
()
const
override
{
return
"<FinishTaskEvent>"
;
}
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
FinishTaskEvent
&
event
);
public:
TaskTableItemPtr
task_table_item_
;
};
...
...
cpp/src/scheduler/event/StartUpEvent.h
浏览文件 @
de6d6823
...
...
@@ -17,6 +17,13 @@ public:
explicit
StartUpEvent
(
std
::
weak_ptr
<
Resource
>
resource
)
:
Event
(
EventType
::
START_UP
,
std
::
move
(
resource
))
{}
inline
std
::
string
Dump
()
const
override
{
return
"<StartUpEvent>"
;
}
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
StartUpEvent
&
event
);
};
}
...
...
cpp/src/scheduler/event/TaskTableUpdatedEvent.h
浏览文件 @
de6d6823
...
...
@@ -17,6 +17,13 @@ public:
explicit
TaskTableUpdatedEvent
(
std
::
weak_ptr
<
Resource
>
resource
)
:
Event
(
EventType
::
TASK_TABLE_UPDATED
,
std
::
move
(
resource
))
{}
inline
std
::
string
Dump
()
const
override
{
return
"<TaskTableUpdatedEvent>"
;
}
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
TaskTableUpdatedEvent
&
event
);
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录