Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
milvus
提交
a1f7b766
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,发现更多精彩内容 >>
提交
a1f7b766
编写于
8月 30, 2019
作者:
W
wxyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MS-445 Rename CopyCompleted to LoadCompleted
Former-commit-id: 99d0df4b53e6daa19d91db1e058eaa99c77d980a
上级
d2d20b51
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
16 addition
and
16 deletion
+16
-16
cpp/CHANGELOG.md
cpp/CHANGELOG.md
+1
-0
cpp/src/scheduler/Scheduler.cpp
cpp/src/scheduler/Scheduler.cpp
+4
-4
cpp/src/scheduler/Scheduler.h
cpp/src/scheduler/Scheduler.h
+1
-1
cpp/src/scheduler/event/Event.h
cpp/src/scheduler/event/Event.h
+1
-1
cpp/src/scheduler/event/EventDump.cpp
cpp/src/scheduler/event/EventDump.cpp
+2
-2
cpp/src/scheduler/event/LoadCompletedEvent.h
cpp/src/scheduler/event/LoadCompletedEvent.h
+5
-5
cpp/src/scheduler/resource/Resource.cpp
cpp/src/scheduler/resource/Resource.cpp
+1
-2
cpp/src/scheduler/resource/Resource.h
cpp/src/scheduler/resource/Resource.h
+1
-1
未找到文件。
cpp/CHANGELOG.md
浏览文件 @
a1f7b766
...
...
@@ -68,6 +68,7 @@ Please mark all change in change log and use the ticket from JIRA.
-
MS-428 - Add PushTaskByDataLocality in scheduler
-
MS-440 - Add DumpTaskTables in sdk
-
MS-442 - Merge Knowhere
-
MS-445 - Rename CopyCompleted to LoadCompleted
## New Feature
-
MS-343 - Implement ResourceMgr
...
...
cpp/src/scheduler/Scheduler.cpp
浏览文件 @
a1f7b766
...
...
@@ -76,8 +76,8 @@ Scheduler::Process(const EventPtr &event) {
OnStartUp
(
event
);
break
;
}
case
EventType
::
COPY
_COMPLETED
:
{
On
Copy
Completed
(
event
);
case
EventType
::
LOAD
_COMPLETED
:
{
On
Load
Completed
(
event
);
break
;
}
case
EventType
::
FINISH_TASK
:
{
...
...
@@ -108,8 +108,8 @@ Scheduler::OnFinishTask(const EventPtr &event) {
}
void
Scheduler
::
On
Copy
Completed
(
const
EventPtr
&
event
)
{
auto
load_completed_event
=
std
::
static_pointer_cast
<
Copy
CompletedEvent
>
(
event
);
Scheduler
::
On
Load
Completed
(
const
EventPtr
&
event
)
{
auto
load_completed_event
=
std
::
static_pointer_cast
<
Load
CompletedEvent
>
(
event
);
if
(
auto
resource
=
event
->
resource_
.
lock
())
{
resource
->
WakeupExecutor
();
...
...
cpp/src/scheduler/Scheduler.h
浏览文件 @
a1f7b766
...
...
@@ -82,7 +82,7 @@ private:
* Pull task from neighbours;
*/
void
On
Copy
Completed
(
const
EventPtr
&
event
);
On
Load
Completed
(
const
EventPtr
&
event
);
/*
* Process task table updated events, which happened on task_table->put;
...
...
cpp/src/scheduler/event/Event.h
浏览文件 @
a1f7b766
...
...
@@ -13,7 +13,7 @@ namespace engine {
enum
class
EventType
{
START_UP
,
COPY
_COMPLETED
,
LOAD
_COMPLETED
,
FINISH_TASK
,
TASK_TABLE_UPDATED
};
...
...
cpp/src/scheduler/event/EventDump.cpp
浏览文件 @
a1f7b766
...
...
@@ -6,7 +6,7 @@
#include "Event.h"
#include "StartUpEvent.h"
#include "
Copy
CompletedEvent.h"
#include "
Load
CompletedEvent.h"
#include "FinishTaskEvent.h"
#include "TaskTableUpdatedEvent.h"
...
...
@@ -25,7 +25,7 @@ std::ostream &operator<<(std::ostream &out, const StartUpEvent &event) {
return
out
;
}
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
Copy
CompletedEvent
&
event
)
{
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
Load
CompletedEvent
&
event
)
{
out
<<
event
.
Dump
();
return
out
;
}
...
...
cpp/src/scheduler/event/
Copy
CompletedEvent.h
→
cpp/src/scheduler/event/
Load
CompletedEvent.h
浏览文件 @
a1f7b766
...
...
@@ -13,18 +13,18 @@ namespace zilliz {
namespace
milvus
{
namespace
engine
{
class
Copy
CompletedEvent
:
public
Event
{
class
Load
CompletedEvent
:
public
Event
{
public:
Copy
CompletedEvent
(
std
::
weak_ptr
<
Resource
>
resource
,
TaskTableItemPtr
task_table_item
)
:
Event
(
EventType
::
COPY
_COMPLETED
,
std
::
move
(
resource
)),
Load
CompletedEvent
(
std
::
weak_ptr
<
Resource
>
resource
,
TaskTableItemPtr
task_table_item
)
:
Event
(
EventType
::
LOAD
_COMPLETED
,
std
::
move
(
resource
)),
task_table_item_
(
std
::
move
(
task_table_item
))
{}
inline
std
::
string
Dump
()
const
override
{
return
"<
Copy
CompletedEvent>"
;
return
"<
Load
CompletedEvent>"
;
}
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
Copy
CompletedEvent
&
event
);
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
Load
CompletedEvent
&
event
);
public:
TaskTableItemPtr
task_table_item_
;
...
...
cpp/src/scheduler/resource/Resource.cpp
浏览文件 @
a1f7b766
...
...
@@ -113,10 +113,9 @@ void Resource::loader_function() {
break
;
}
LoadFile
(
task_item
->
task
);
// TODO: wrapper loaded
task_item
->
Loaded
();
if
(
subscriber_
)
{
auto
event
=
std
::
make_shared
<
Copy
CompletedEvent
>
(
shared_from_this
(),
task_item
);
auto
event
=
std
::
make_shared
<
Load
CompletedEvent
>
(
shared_from_this
(),
task_item
);
subscriber_
(
std
::
static_pointer_cast
<
Event
>
(
event
));
}
}
...
...
cpp/src/scheduler/resource/Resource.h
浏览文件 @
a1f7b766
...
...
@@ -14,7 +14,7 @@
#include "../event/Event.h"
#include "../event/StartUpEvent.h"
#include "../event/
Copy
CompletedEvent.h"
#include "../event/
Load
CompletedEvent.h"
#include "../event/FinishTaskEvent.h"
#include "../event/TaskTableUpdatedEvent.h"
#include "../TaskTable.h"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录