mirror of https://github.com/milvus-io/milvus.git
parent
0b1c4f0420
commit
c4f4ae8627
|
@ -12,6 +12,7 @@ import (
|
|||
dnc "github.com/zilliztech/milvus-distributed/internal/distributed/datanode"
|
||||
dsc "github.com/zilliztech/milvus-distributed/internal/distributed/dataservice"
|
||||
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/internalpb2"
|
||||
)
|
||||
|
@ -32,6 +33,7 @@ func main() {
|
|||
log.Println("Datanode is", dn.Params.NodeID)
|
||||
|
||||
// --- Master Service Client ---
|
||||
ms.Params.Init()
|
||||
log.Println("Master service address:", dn.Params.MasterAddress)
|
||||
masterClient, err := msc.NewGrpcClient(dn.Params.MasterAddress, 20*time.Second)
|
||||
if err != nil {
|
||||
|
|
|
@ -717,6 +717,18 @@ func (c *Core) GetComponentStates() (*internalpb2.ComponentStates, error) {
|
|||
StateCode: code,
|
||||
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue