This is an automated email from the ASF dual-hosted git repository.

ccondit pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/yunikorn-scheduler-interface.git


The following commit(s) were added to refs/heads/master by this push:
     new 07f5695  [YUNIKORN-2585] SI: Convert AllocationID to AllocationKey 
(#138)
07f5695 is described below

commit 07f5695119a10b3427e6c715b7faf73156828dfd
Author: Craig Condit <[email protected]>
AuthorDate: Thu Apr 25 13:29:41 2024 -0500

    [YUNIKORN-2585] SI: Convert AllocationID to AllocationKey (#138)
    
    Closes: #138
---
 lib/go/si/si.pb.go          | 63 +++++++++++++++------------------------------
 scheduler-interface-spec.md | 13 +++++-----
 si.proto                    | 13 +++++-----
 3 files changed, 33 insertions(+), 56 deletions(-)

diff --git a/lib/go/si/si.pb.go b/lib/go/si/si.pb.go
index d22ed80..437d04a 100644
--- a/lib/go/si/si.pb.go
+++ b/lib/go/si/si.pb.go
@@ -646,7 +646,7 @@ type AllocationRequest struct {
        sizeCache     protoimpl.SizeCache
        unknownFields protoimpl.UnknownFields
 
-       // New allocation requests or replace existing allocation request (if 
allocationID is same)
+       // New allocation requests or replace existing allocation request (if 
allocationKey is same)
        Asks []*AllocationAsk `protobuf:"bytes,1,rep,name=asks,proto3" 
json:"asks,omitempty"`
        // Allocations can be released.
        Releases *AllocationReleasesRequest 
`protobuf:"bytes,2,opt,name=releases,proto3" json:"releases,omitempty"`
@@ -1886,8 +1886,6 @@ type Allocation struct {
        // Is this a placeholder allocation (true) or a real allocation 
(false), defaults to false
        // ignored if the taskGroupName is not set
        Placeholder bool `protobuf:"varint,12,opt,name=placeholder,proto3" 
json:"placeholder,omitempty"`
-       // AllocationID of the allocation
-       AllocationID string `protobuf:"bytes,13,opt,name=allocationID,proto3" 
json:"allocationID,omitempty"`
        // Whether this allocation was the originator of this app
        Originator bool `protobuf:"varint,14,opt,name=originator,proto3" 
json:"originator,omitempty"`
        // The preemption policy for this allocation
@@ -1989,13 +1987,6 @@ func (x *Allocation) GetPlaceholder() bool {
        return false
 }
 
-func (x *Allocation) GetAllocationID() string {
-       if x != nil {
-               return x.AllocationID
-       }
-       return ""
-}
-
 func (x *Allocation) GetOriginator() bool {
        if x != nil {
                return x.Originator
@@ -2083,11 +2074,8 @@ type AllocationRelease struct {
        TerminationType TerminationType 
`protobuf:"varint,4,opt,name=terminationType,proto3,enum=si.v1.TerminationType" 
json:"terminationType,omitempty"`
        // human-readable message
        Message string `protobuf:"bytes,5,opt,name=message,proto3" 
json:"message,omitempty"`
-       // AllocationKey from AllocationAsk
+       // AllocationKey of the allocation to release, if not set all 
allocations are released for the applicationID
        AllocationKey string `protobuf:"bytes,6,opt,name=allocationKey,proto3" 
json:"allocationKey,omitempty"`
-       // AllocationID of the allocation to release, if not set all 
allocations are released for
-       // the applicationID
-       AllocationID string `protobuf:"bytes,7,opt,name=allocationID,proto3" 
json:"allocationID,omitempty"`
 }
 
 func (x *AllocationRelease) Reset() {
@@ -2157,13 +2145,6 @@ func (x *AllocationRelease) GetAllocationKey() string {
        return ""
 }
 
-func (x *AllocationRelease) GetAllocationID() string {
-       if x != nil {
-               return x.AllocationID
-       }
-       return ""
-}
-
 // Release ask
 type AllocationAskRelease struct {
        state         protoimpl.MessageState
@@ -3181,7 +3162,7 @@ var file_yunikorn_scheduler_interface_si_proto_rawDesc = 
[]byte{
        0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 
0x01, 0x20, 0x01, 0x28,
        0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x67, 
0x72, 0x6f, 0x75, 0x70,
        0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x67, 0x72, 0x6f, 
0x75, 0x70, 0x73, 0x22,
-       0xef, 0x04, 0x0a, 0x0a, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 
0x6f, 0x6e, 0x12, 0x24,
+       0xdf, 0x04, 0x0a, 0x0a, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 
0x6f, 0x6e, 0x12, 0x24,
        0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 
0x4b, 0x65, 0x79, 0x18,
        0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 
0x61, 0x74, 0x69, 0x6f,
        0x6e, 0x4b, 0x65, 0x79, 0x12, 0x4d, 0x0a, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 
0x63, 0x61, 0x74, 0x69,
@@ -3205,21 +3186,20 @@ var file_yunikorn_scheduler_interface_si_proto_rawDesc 
= []byte{
        0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x61, 0x73, 
0x6b, 0x47, 0x72, 0x6f,
        0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x6c, 
0x61, 0x63, 0x65, 0x68,
        0x6f, 0x6c, 0x64, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 
0x0b, 0x70, 0x6c, 0x61,
-       0x63, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 
0x61, 0x6c, 0x6c, 0x6f,
-       0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x0d, 0x20, 0x01, 
0x28, 0x09, 0x52, 0x0c,
-       0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 
0x12, 0x1e, 0x0a, 0x0a,
-       0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x0e, 
0x20, 0x01, 0x28, 0x08,
-       0x52, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 
0x12, 0x43, 0x0a, 0x10,
-       0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 
0x6c, 0x69, 0x63, 0x79,
-       0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x69, 0x2e, 
0x76, 0x31, 0x2e, 0x50,
-       0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 
0x69, 0x63, 0x79, 0x52,
-       0x10, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 
0x6f, 0x6c, 0x69, 0x63,
-       0x79, 0x1a, 0x41, 0x0a, 0x13, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 
0x69, 0x6f, 0x6e, 0x54,
-       0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 
0x6b, 0x65, 0x79, 0x18,
-       0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 
0x0a, 0x05, 0x76, 0x61,
-       0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 
0x61, 0x6c, 0x75, 0x65,
-       0x3a, 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a, 0x04, 
0x08, 0x03, 0x10, 0x04,
-       0x52, 0x09, 0x71, 0x75, 0x65, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 
0x04, 0x55, 0x55, 0x49,
+       0x63, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 
0x6f, 0x72, 0x69, 0x67,
+       0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 
0x52, 0x0a, 0x6f, 0x72,
+       0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x43, 0x0a, 0x10, 
0x70, 0x72, 0x65, 0x65,
+       0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 
0x18, 0x0f, 0x20, 0x01,
+       0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 
0x72, 0x65, 0x65, 0x6d,
+       0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 
0x10, 0x70, 0x72, 0x65,
+       0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 
0x79, 0x1a, 0x41, 0x0a,
+       0x13, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 
0x61, 0x67, 0x73, 0x45,
+       0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 
0x01, 0x20, 0x01, 0x28,
+       0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 
0x6c, 0x75, 0x65, 0x18,
+       0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 
0x3a, 0x02, 0x38, 0x01,
+       0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 
0x4a, 0x04, 0x08, 0x0d,
+       0x10, 0x0e, 0x52, 0x09, 0x71, 0x75, 0x65, 0x75, 0x65, 0x4e, 0x61, 0x6d, 
0x65, 0x52, 0x04, 0x55,
+       0x55, 0x49, 0x44, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 
0x69, 0x6f, 0x6e, 0x49,
        0x44, 0x22, 0xc0, 0x01, 0x0a, 0x19, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 
0x74, 0x69, 0x6f, 0x6e,
        0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 
0x65, 0x73, 0x74, 0x12,
        0x4c, 0x0a, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 
0x6e, 0x73, 0x54, 0x6f,
@@ -3232,7 +3212,7 @@ var file_yunikorn_scheduler_interface_si_proto_rawDesc = 
[]byte{
        0x2e, 0x73, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 
0x61, 0x74, 0x69, 0x6f,
        0x6e, 0x41, 0x73, 0x6b, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 
0x17, 0x61, 0x6c, 0x6c,
        0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x6b, 0x73, 0x54, 
0x6f, 0x52, 0x65, 0x6c,
-       0x65, 0x61, 0x73, 0x65, 0x22, 0x91, 0x02, 0x0a, 0x11, 0x41, 0x6c, 0x6c, 
0x6f, 0x63, 0x61, 0x74,
+       0x65, 0x61, 0x73, 0x65, 0x22, 0x81, 0x02, 0x0a, 0x11, 0x41, 0x6c, 0x6c, 
0x6f, 0x63, 0x61, 0x74,
        0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x24, 
0x0a, 0x0d, 0x70, 0x61,
        0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 
0x01, 0x20, 0x01, 0x28,
        0x09, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 
0x4e, 0x61, 0x6d, 0x65,
@@ -3246,10 +3226,9 @@ var file_yunikorn_scheduler_interface_si_proto_rawDesc = 
[]byte{
        0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 
0x65, 0x73, 0x73, 0x61,
        0x67, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 
0x74, 0x69, 0x6f, 0x6e,
        0x4b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 
0x6c, 0x6c, 0x6f, 0x63,
-       0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x22, 0x0a, 0x0c, 
0x61, 0x6c, 0x6c, 0x6f,
-       0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x07, 0x20, 0x01, 
0x28, 0x09, 0x52, 0x0c,
-       0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 
0x4a, 0x04, 0x08, 0x03,
-       0x10, 0x04, 0x52, 0x04, 0x55, 0x55, 0x49, 0x44, 0x22, 0xe4, 0x01, 0x0a, 
0x14, 0x41, 0x6c, 0x6c,
+       0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x4a, 0x04, 0x08, 0x03, 
0x10, 0x04, 0x4a, 0x04,
+       0x08, 0x07, 0x10, 0x08, 0x52, 0x04, 0x55, 0x55, 0x49, 0x44, 0x52, 0x0c, 
0x61, 0x6c, 0x6c, 0x6f,
+       0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0xe4, 0x01, 0x0a, 
0x14, 0x41, 0x6c, 0x6c,
        0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x6b, 0x52, 0x65, 
0x6c, 0x65, 0x61, 0x73,
        0x65, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 
0x6f, 0x6e, 0x4e, 0x61,
        0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x61, 
0x72, 0x74, 0x69, 0x74,
diff --git a/scheduler-interface-spec.md b/scheduler-interface-spec.md
index bc3be6b..ffe5469 100644
--- a/scheduler-interface-spec.md
+++ b/scheduler-interface-spec.md
@@ -249,7 +249,7 @@ Below is overview of how scheduler/RM keep connection and 
updates.
 
 ```protobuf
 message AllocationRequest {
-  // New allocation requests or replace existing allocation request (if 
allocationID is same)
+  // New allocation requests or replace existing allocation request (if 
allocationKey is same)
   repeated AllocationAsk asks = 1;
 
   // Allocations can be released.
@@ -538,8 +538,6 @@ message Allocation {
   // Is this a placeholder allocation (true) or a real allocation (false), 
defaults to false
   // ignored if the taskGroupName is not set
   bool placeholder = 12;
-  // AllocationID of the allocation
-  string allocationID = 13;
   // Whether this allocation was the originator of this app
   bool originator = 14;
   // The preemption policy for this allocation
@@ -549,6 +547,8 @@ message Allocation {
   reserved "queueName";
   reserved 3;
   reserved "UUID";
+  reserved 13;
+  reserved "allocationID";
 }
 ```
 
@@ -583,14 +583,13 @@ message AllocationRelease {
   TerminationType terminationType = 4;
   // human-readable message
   string message = 5;
-  // AllocationKey from AllocationAsk
+  // AllocationKey of the allocation to release, if not set all allocations 
are released for the applicationID
   string allocationKey = 6;
-  // AllocationID of the allocation to release, if not set all allocations are 
released for
-  // the applicationID
-  string allocationID = 7;
   
   reserved 3;
   reserved "UUID";
+  reserved 7;
+  reserved "allocationID";
 }
 
 // Release ask
diff --git a/si.proto b/si.proto
index ad6bc0a..d92d5d1 100644
--- a/si.proto
+++ b/si.proto
@@ -75,7 +75,7 @@ message RegisterResourceManagerResponse {
   // Intentionally empty.
 }
 message AllocationRequest {
-  // New allocation requests or replace existing allocation request (if 
allocationID is same)
+  // New allocation requests or replace existing allocation request (if 
allocationKey is same)
   repeated AllocationAsk asks = 1;
 
   // Allocations can be released.
@@ -288,8 +288,6 @@ message Allocation {
   // Is this a placeholder allocation (true) or a real allocation (false), 
defaults to false
   // ignored if the taskGroupName is not set
   bool placeholder = 12;
-  // AllocationID of the allocation
-  string allocationID = 13;
   // Whether this allocation was the originator of this app
   bool originator = 14;
   // The preemption policy for this allocation
@@ -299,6 +297,8 @@ message Allocation {
   reserved "queueName";
   reserved 3;
   reserved "UUID";
+  reserved 13;
+  reserved "allocationID";
 }
 message AllocationReleasesRequest {
   // The allocations to release
@@ -328,14 +328,13 @@ message AllocationRelease {
   TerminationType terminationType = 4;
   // human-readable message
   string message = 5;
-  // AllocationKey from AllocationAsk
+  // AllocationKey of the allocation to release, if not set all allocations 
are released for the applicationID
   string allocationKey = 6;
-  // AllocationID of the allocation to release, if not set all allocations are 
released for
-  // the applicationID
-  string allocationID = 7;
   
   reserved 3;
   reserved "UUID";
+  reserved 7;
+  reserved "allocationID";
 }
 
 // Release ask


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to