Skip to content

Commit

Permalink
change from string to int
Browse files Browse the repository at this point in the history
  • Loading branch information
yufansong committed Jan 25, 2024
1 parent b17c9c8 commit 5c27fc4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions proto/stream_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ message GetBackPressureRequest {
}

message BackPressureInfo {
string actor_id = 1;
string fragment_id = 2;
string downstream_fragment_id = 3;
uint32 actor_id = 1;
uint32 fragment_id = 2;
uint32 downstream_fragment_id = 3;
double value = 4;
}

Expand Down
7 changes: 4 additions & 3 deletions src/compute/src/rpc/service/stream_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,14 @@ impl StreamService for StreamServiceImpl {
let mut back_pressure_info = BackPressureInfo::default();
for label_pair in label_pairs.get_label() {
if label_pair.get_name() == "actor_id" {
back_pressure_info.actor_id = label_pair.get_value().to_string();
back_pressure_info.actor_id = label_pair.get_value().parse::<u32>().unwrap();
}
if label_pair.get_name() == "fragment_id" {
back_pressure_info.fragment_id = label_pair.get_value().to_string();
back_pressure_info.fragment_id = label_pair.get_value().parse::<u32>().unwrap();
}
if label_pair.get_name() == "downstream_fragment_id" {
back_pressure_info.downstream_fragment_id = label_pair.get_value().to_string();
back_pressure_info.downstream_fragment_id =
label_pair.get_value().parse::<u32>().unwrap();
}
}
back_pressure_info.value = label_pairs.get_counter().get_value();
Expand Down

0 comments on commit 5c27fc4

Please sign in to comment.