提交 c4f4ae86 编写于 作者: N neza2017 提交者: yefu.chen

Fix master

Signed-off-by: Nneza2017 <yefu.chen@zilliz.com>
上级 0b1c4f04
...@@ -12,6 +12,7 @@ import ( ...@@ -12,6 +12,7 @@ import (
dnc "github.com/zilliztech/milvus-distributed/internal/distributed/datanode" dnc "github.com/zilliztech/milvus-distributed/internal/distributed/datanode"
dsc "github.com/zilliztech/milvus-distributed/internal/distributed/dataservice" dsc "github.com/zilliztech/milvus-distributed/internal/distributed/dataservice"
msc "github.com/zilliztech/milvus-distributed/internal/distributed/masterservice" msc "github.com/zilliztech/milvus-distributed/internal/distributed/masterservice"
ms "github.com/zilliztech/milvus-distributed/internal/masterservice"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb" "github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2" "github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
) )
...@@ -32,6 +33,7 @@ func main() { ...@@ -32,6 +33,7 @@ func main() {
log.Println("Datanode is", dn.Params.NodeID) log.Println("Datanode is", dn.Params.NodeID)
// --- Master Service Client --- // --- Master Service Client ---
ms.Params.Init()
log.Println("Master service address:", dn.Params.MasterAddress) log.Println("Master service address:", dn.Params.MasterAddress)
masterClient, err := msc.NewGrpcClient(dn.Params.MasterAddress, 20*time.Second) masterClient, err := msc.NewGrpcClient(dn.Params.MasterAddress, 20*time.Second)
if err != nil { if err != nil {
......
...@@ -717,6 +717,18 @@ func (c *Core) GetComponentStates() (*internalpb2.ComponentStates, error) { ...@@ -717,6 +717,18 @@ func (c *Core) GetComponentStates() (*internalpb2.ComponentStates, error) {
StateCode: code, StateCode: code,
ExtraInfo: nil, ExtraInfo: nil,
}, },
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_SUCCESS,
Reason: "",
},
SubcomponentStates: []*internalpb2.ComponentInfo{
{
NodeID: int64(Params.NodeID),
Role: typeutil.MasterServiceRole,
StateCode: code,
ExtraInfo: nil,
},
},
}, nil }, nil
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册