From c6b2e36423f5005582472a67940f85933a9724f4 Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Mon, 21 Aug 2023 19:06:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B6=85=E7=AE=97=E9=98=9F=E5=88=97=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 5c49999d9c0f44dadf1fe933d5e3070dfc0568c5 --- go.mod | 2 +- model/scqueuephyinfomodel_gen.go | 10 ++++++---- rpc/pb/pcmCore.proto | 2 ++ rpc/pcmCore/pcmCore.pb.go | 32 ++++++++++++++++++++++++++------ rpc/pcmCore/pcmCore_grpc.pb.go | 2 +- 5 files changed, 36 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index eb1f3188..6d947dbb 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module gitlink.org.cn/jcce-pcm/pcm-coordinator -go 1.19 +go 1.20 require ( github.com/Masterminds/squirrel v1.5.4 diff --git a/model/scqueuephyinfomodel_gen.go b/model/scqueuephyinfomodel_gen.go index 47f6df42..61b529fd 100755 --- a/model/scqueuephyinfomodel_gen.go +++ b/model/scqueuephyinfomodel_gen.go @@ -59,10 +59,12 @@ type ( QueMaxDcuPN string `db:"que_max_dcu_PN"` // 队列单作业最大DCU卡数 ParticipantId int64 `db:"participant_id"` // 集群动态信息id DeletedFlag int64 `db:"deleted_flag"` // 是否删除 - CreatedBy sql.NullInt64 `db:"created_by"` // 创建人 - CreatedTime time.Time `db:"created_time"` // 创建时间 - UpdatedBy sql.NullInt64 `db:"updated_by"` // 更新人 - UpdatedTime sql.NullTime `db:"updated_time"` // 更新时间 + QueNcpus string `db:"que_ncpus"` + QueFreeNcpus string `db:"que_free_ncpus"` + CreatedBy sql.NullInt64 `db:"created_by"` // 创建人 + CreatedTime time.Time `db:"created_time"` // 创建时间 + UpdatedBy sql.NullInt64 `db:"updated_by"` // 更新人 + UpdatedTime sql.NullTime `db:"updated_time"` // 更新时间 } ) diff --git a/rpc/pb/pcmCore.proto b/rpc/pb/pcmCore.proto index dd2f3be7..fe0eb384 100644 --- a/rpc/pb/pcmCore.proto +++ b/rpc/pb/pcmCore.proto @@ -187,6 +187,8 @@ message QueuePhyInfo { string queMaxGpuPN = 16; // 队列单作业最大GPU卡数 string queMaxWalltime = 17; // 队列最大运行时间 string queMaxDcuPN = 18; // 队列单作业最大DCU卡数 + string queNcpus = 19; //队列cpu数 + string queFreeNcpus = 20; //队列空闲cpu数 } // ParticipantHeartbeatReq 心跳请求 diff --git a/rpc/pcmCore/pcmCore.pb.go b/rpc/pcmCore/pcmCore.pb.go index 061579d8..da0abd1a 100644 --- a/rpc/pcmCore/pcmCore.pb.go +++ b/rpc/pcmCore/pcmCore.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v4.23.4 +// protoc v3.19.4 // source: pb/pcmCore.proto package pcmCore @@ -1452,6 +1452,8 @@ type QueuePhyInfo struct { QueMaxGpuPN string `protobuf:"bytes,16,opt,name=queMaxGpuPN,proto3" json:"queMaxGpuPN,omitempty"` // 队列单作业最大GPU卡数 QueMaxWalltime string `protobuf:"bytes,17,opt,name=queMaxWalltime,proto3" json:"queMaxWalltime,omitempty"` // 队列最大运行时间 QueMaxDcuPN string `protobuf:"bytes,18,opt,name=queMaxDcuPN,proto3" json:"queMaxDcuPN,omitempty"` // 队列单作业最大DCU卡数 + QueNcpus string `protobuf:"bytes,19,opt,name=queNcpus,proto3" json:"queNcpus,omitempty"` + QueFreeNcpus string `protobuf:"bytes,20,opt,name=queFreeNcpus,proto3" json:"queFreeNcpus,omitempty"` } func (x *QueuePhyInfo) Reset() { @@ -1612,6 +1614,20 @@ func (x *QueuePhyInfo) GetQueMaxDcuPN() string { return "" } +func (x *QueuePhyInfo) GetQueNcpus() string { + if x != nil { + return x.QueNcpus + } + return "" +} + +func (x *QueuePhyInfo) GetQueFreeNcpus() string { + if x != nil { + return x.QueFreeNcpus + } + return "" +} + // ParticipantHeartbeatReq 心跳请求 type ParticipantHeartbeatReq struct { state protoimpl.MessageState @@ -2079,9 +2095,9 @@ type ClientInfo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty" redis:"host"` - Port string `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty" redis:"port"` - ParticipantId int64 `protobuf:"varint,3,opt,name=participantId,proto3" json:"participantId,omitempty" redis:"participantId"` + Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` // @gotags: redis:"host" + Port string `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` // @gotags: redis:"port" + ParticipantId int64 `protobuf:"varint,3,opt,name=participantId,proto3" json:"participantId,omitempty"` // @gotags: redis:"participantId" } func (x *ClientInfo) Reset() { @@ -2350,7 +2366,7 @@ var file_pb_pcmCore_proto_rawDesc = []byte{ 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x63, 0x68, 0x46, 0x72, 0x65, 0x71, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x63, 0x68, 0x46, 0x72, - 0x65, 0x71, 0x22, 0xc6, 0x04, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x75, 0x65, 0x50, 0x68, 0x79, 0x49, + 0x65, 0x71, 0x22, 0x86, 0x05, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x75, 0x65, 0x50, 0x68, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x63, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x63, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x12, @@ -2386,7 +2402,11 @@ var file_pb_pcmCore_proto_rawDesc = []byte{ 0x69, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x71, 0x75, 0x65, 0x4d, 0x61, 0x78, 0x57, 0x61, 0x6c, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x71, 0x75, 0x65, 0x4d, 0x61, 0x78, 0x44, 0x63, 0x75, 0x50, 0x4e, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x71, 0x75, 0x65, 0x4d, 0x61, 0x78, 0x44, 0x63, 0x75, 0x50, 0x4e, 0x22, 0x59, 0x0a, 0x17, 0x50, + 0x71, 0x75, 0x65, 0x4d, 0x61, 0x78, 0x44, 0x63, 0x75, 0x50, 0x4e, 0x12, 0x1a, 0x0a, 0x08, 0x71, + 0x75, 0x65, 0x4e, 0x63, 0x70, 0x75, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, + 0x75, 0x65, 0x4e, 0x63, 0x70, 0x75, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x71, 0x75, 0x65, 0x46, 0x72, + 0x65, 0x65, 0x4e, 0x63, 0x70, 0x75, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x71, + 0x75, 0x65, 0x46, 0x72, 0x65, 0x65, 0x4e, 0x63, 0x70, 0x75, 0x73, 0x22, 0x59, 0x0a, 0x17, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x70, diff --git a/rpc/pcmCore/pcmCore_grpc.pb.go b/rpc/pcmCore/pcmCore_grpc.pb.go index eb63b990..3659c9e1 100644 --- a/rpc/pcmCore/pcmCore_grpc.pb.go +++ b/rpc/pcmCore/pcmCore_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.23.4 +// - protoc v3.19.4 // source: pb/pcmCore.proto package pcmCore